mobly icon indicating copy to clipboard operation
mobly copied to clipboard

Allow passing args to BaseTest.setup_class() via cmd line

Open ktkopone opened this issue 7 years ago • 1 comments

At the moment, the only way to get custom args into the BaseTest appear to be setting TestParams in the config file, or hacking them in with global vars.

It would be nice if custom args specified via command line or generated in the parent script could be passed into the test_runner.main() call and from there into BaseTest.setup_class() (and/or any other ways of getting args into BaseTest that come to mind).

ktkopone avatar Sep 20 '18 13:09 ktkopone

This can be done today already. If you are calling TestRunner APIs directly in your own suite, you can already do this by adding more logic in argparse block in your own suite.

In this particular issue, we will track implementing this for the default entry point of test_runner.main.

xpconanfan avatar Sep 22 '18 00:09 xpconanfan