expliot.core.ui.cli¶
Package Contents¶
-
class
expliot.core.ui.cli.TestSuite(pkgname='expliot.plugins')¶ Bases:
dictTestSuite class inherits from dict and stores all the test cases from plugins package name specified in __init__()
-
testcls¶
-
import_plugins(self, pkgname)¶ Imports all tests from the specified Package into a dict :param pkgname: The package to load all test case plugins from :return: void
-
-
class
expliot.core.ui.cli.Cli(prompt=None, intro=None)¶ Bases:
cmd2.CmdCli - The main command line interpreter for Expliot console. It inherits Cmd2 package for commandline functionality and adds expliot specific commands. It also initializes the plugins for execution. Current Expliot commands defined are: 1. list - to list available plugins (test cases) 2. run - Execute a specific plugin (test case) 3. exit - An alias for Cmd2 quit command
-
do_exit¶
-
del_defaultcmds(self)¶ Delete/remove the default commands from cmd2 which are not required for expliot
Returns:
-
do_list(self, args)¶ List the available test cases
-
do_run(self, arglist)¶ Execute a specific plugin/test case
Parameters: arglist – Argument list (array) passed from the console Returns:
-
complete_run(self, text, line, start_index, end_index)¶ Tab completion method for run command. It shows the list of available plugins that match the subcommand specified by the user
Parameters: - text – run subcommand string specified by the user
- line – The whole run command string typed by the user
- start_index – Start index subcommand in the line
- end_index – End index of the subcommand in the line
Returns: List of matching subcommands(plugins)
-
runtest(self, name, arglist)¶ Runs a single test case from the TestSuite if it exists :param name: Name of the test case to run :param arglist: Argument list to be passed to the test for parsing :return: void
-