Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Report displays test methods alphabetically instead of the order they were run in #81

Open
dragojs opened this issue Feb 17, 2021 · 1 comment

Comments

@dragojs
Copy link

dragojs commented Feb 17, 2021

  • 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)

image

@dragojs
Copy link
Author

dragojs commented Feb 18, 2021

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.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant