enable unit test results for selenium

This commit is contained in:
Andrew Dolgov 2023-12-02 12:44:21 +03:00
parent eac9e7c103
commit dbb6e7291e
No known key found for this signature in database
GPG Key ID: 1A56B4FA25D4AF2A
2 changed files with 7 additions and 1 deletions

View File

@ -95,6 +95,10 @@ selenium:
- python3 tests/integration/selenium_test.py
needs:
- job: phpunit-integration
artifacts:
when: always
reports:
junit: selenium-report.xml
ttrss-web-nginx:publish:
stage: publish

View File

@ -2,6 +2,7 @@
import os
import unittest
import xmlrunner
from selenium import webdriver
from selenium.webdriver.common.by import By
@ -67,4 +68,5 @@ class SeleniumTest(unittest.TestCase):
assert self.driver.find_element(by=By.CSS_SELECTOR, value="#feedTree").is_displayed()
unittest.main()
with open('selenium-results.xml', 'wb') as output:
unittest.main(testRunner=xmlrunner.XMLTestRunner(output=output))