stestr list Command¶
List the tests from a project and show them.
-
class
stestr.commands.list.
List
(app, app_args, cmd_name=None)[source]¶ List the tests for a project.
You can use a filter just like with the run command to see exactly what tests match.
-
stestr.commands.list.
list_command
(config='.stestr.conf', repo_type='file', repo_url=None, test_path=None, top_dir=None, group_regex=None, blacklist_file=None, whitelist_file=None, black_regex=None, filters=None, stdout=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>)[source]¶ Print a list of test_ids for a project
This function will print the test_ids for tests in a project. You can filter the output just like with the run command to see exactly what will be run.
- Parameters
config (str) – The path to the stestr config file. Must be a string.
repo_type (str) – This is the type of repository to use. Valid choices are ‘file’ and ‘sql’.
repo_url (str) – The url of the repository to use.
test_path (str) – Set the test path to use for unittest discovery. If both this and the corresponding config file option are set, this value will be used.
top_dir (str) – The top dir to use for unittest discovery. This takes precedence over the value in the config file. (if one is present in the config file)
group_regex (str) – Set a group regex to use for grouping tests together in the stestr scheduler. If both this and the corresponding config file option are set this value will be used.
blacklist_file (str) – Path to a blacklist file, this file contains a separate regex exclude on each newline.
whitelist_file (str) – Path to a whitelist file, this file contains a separate regex on each newline.
black_regex (str) – Test rejection regex. If a test cases name matches on re.search() operation, it will be removed from the final test list.
filters (list) – A list of string regex filters to initially apply on the test list. Tests that match any of the regexes will be used. (assuming any other filtering specified also uses it)
stdout (file) – The output file to write all output to. By default this is sys.stdout