Exemplo n.º 1
0
}
/* list test cases */
if ($opt_caselist) {
    $cases = RemoteTestManager::getTestCaseList($opt_url);
    fwrite(STDOUT, "Available tests tests:\n");
    foreach (array_keys($cases) as $case) {
        fwrite(STDOUT, $case . "\n");
    }
}
/* exit if we've displayed a list */
if ($opt_grouplist || $opt_caselist) {
    exit(0);
}
/* run a test case given it's URL */
if ($opt_caseurl) {
    RemoteTestManager::runTestUrl($opt_caseurl, new CLIReporter($opt_separator), $opt_url);
    exit(0);
}
/* run a test case by id*/
if ($opt_caseid) {
    RemoteTestManager::runTestCase($opt_caseid, new CLIReporter($opt_separator), $opt_url);
    exit(0);
}
/* run a grouptest */
if ($opt_groupfile) {
    RemoteTestManager::runGroupTest($opt_groupfile, new CLIReporter($opt_separator), $opt_url);
    exit(0);
}
/* run all tests */
RemoteTestManager::runAllTests(new CLIReporter($opt_separator), $opt_url);
exit(0);