google / mobly

E2E test framework for tests with complex environment requirements.
https://github.com/google/mobly
Apache License 2.0
638 stars 178 forks source link

suite-runner: try to mimic test-runner cli #875

Closed uael closed 1 year ago

uael commented 1 year ago

As of the test runner:

Also, do not force test name to only contains one dot . by passing maxsplit=1 to test_name.split. This allow for more complex generated test names.


This change is Reviewable

uael commented 1 year ago

@xpconanfan I just added two commits before the suite runner one in order to support using _pre_run instead of setup_generated_tests when retrieving test names :+1: Please see commit messages for details.

uael commented 1 year ago

Added _clean_up :+1:

uael commented 1 year ago

I copy/pasted the parser and group from teet_runner.py, I would prefer to not diverge both implementation even if that make sense. Also, in avatar we use a parameterized decorator, is this something we can consider in future for generated tests instead of the logic in the base test class? It could reduce complexity a bit.

About the two _print_test_names calls, the two functions run_suite_class and run_suite are independents from each other and both parse arguments/load config and run tests so it make sense to me for them to behave the same way.