HtmlTestRunner
HtmlTestRunner copied to clipboard
Report displays test methods alphabetically instead of the order they were run in
- HtmlTestRunner version: 1.2.1
- Python version: 3.8.6
- Operating System: windows 10
Description
I manually added some methods from multiple TestCases. They are run in the order that I add them in, but the HTML report displays them in an alphabetical order.
What I Did
loader = unittest.TestLoader()
suite = unittest.TestSuite()
suite.addTest(TestStringMethods("test_split"))
suite.addTest(TestStringMethods("test_isupper"))
suite.addTest(MyTestCase("test_maybe_skipped"))
suite.addTest(MyTestCase("test_format"))
HtmlTestRunner.HTMLTestRunner(combine_reports = True, open_in_browser = True, descriptions = False, report_title = "Report").run(suite)

It appears that the TestClasses themselves are also not displayed in the order they were run; In the scenario from this pic, I added suite.addTest(TestMainMenu("test_inbox_text_when_empty")) at the bottom, after all the other tests, but It's displayed right in the middle.
