stestr slowest Command

Show the longest running tests in the repository.

class stestr.commands.slowest.Slowest(app, app_args, cmd_name=None)[source]

Show the slowest tests from the last test run.

This command shows a table, with the longest running tests at the top.

get_parser(prog_name)[source]

Return an argparse.ArgumentParser.

take_action(parsed_args)[source]

Override to do something useful.

The returned value will be returned by the program.

stestr.commands.slowest.slowest(repo_type='file', repo_url=None, show_all=False, stdout=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'>)[source]

Print the slowest times from the last run in the repository

This function will print to STDOUT the 10 slowests tests in the last run. Optionally, using the show_all argument, it will print all the tests, instead of just 10. sorted by time.

Parameters:
  • 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.
  • show_all (bool) – Show timing for all tests.
  • stdout (file) – The output file to write all output to. By default this is sys.stdout
Return return_code:
 

The exit code for the command. 0 for success and > 0 for failures.

Return type:

int