开发者

How can i distinguish the XML results of two python tests (using nosetests as test runner) with the same name but with different context

开发者 https://www.devze.com 2023-03-16 05:43 出处:网络
I have a test footest.py which runs with mysql database, and the same test runs on psql database, is there a way to disti开发者_运维技巧nguish this difference in an XML result file between the two tes

I have a test footest.py which runs with mysql database, and the same test runs on psql database, is there a way to disti开发者_运维技巧nguish this difference in an XML result file between the two tests.


Why not trying to create a base_test_class.py with a base test class class BaseSQLTest(unittest.TestCase) that contains all your tests, and 2 other files mysqltest.py and psqltest.py that contains 2 inherited classes (class MySQLTest(BaseSQLTest) and class PSQLTest(BaseSQLTest)) for your MySQL and PSQL tests.

Doing this will split your tests in the resulting XML.

0

精彩评论

暂无评论...
验证码 换一张
取 消