I have a question. Is it possible to change the name test in output, using python unittests?
For example, my test:
from selenium import webdriver
import unittest
from data.readData import Data
from actions.actions import Actions
from pages.notificationsPage import NotificationsPage
class NotificationsTest(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.driver = webdriver.Chrome(executable_path=Data.driver)
cls.driver.implicitly_wait(10)
cls.driver.maximize_window()
def test_order_confirmation(self):
Actions.login(self, Data.email, Data.password)
driver = self.driver
driver.get(Data.website + "Admin/Configuration/Message")
notify = NotificationsPage(driver)
notify.order_confirmation()
@classmethod
def tearDownClass(cls):
cls.driver.close()
cls.driver.quit()
if __name__ == '__main__':
unittest.main()
And my output:
I want to change the marked one test name to own string here, in this output, and also in result file in res.xml (I think it is the same value).
Is it possible?