i have a suite that calls multiple suites and many functions for 开发者_开发技巧LOG,REPORT and Execution if i m trying the same 'Group or Filter' pattern its executes all the test cases without executing the selected single test cases.
Edit: I am using an array suite as follows,
$suite->addTestSuite('adminSuite');
$suite->addTestSuite('staffSuite');
$suite->addTestSuite('merchantSuite');
// Run the test
PHPUnit_TextUI_TestRunner::run($suite, array(
'junitLogfile' => $path_log
));
I am calling this file through ant.
From the code you've added, it does exactly what you ask for. As you're running the tests with coded configuration, you would need to take care for filtering or selecting groups on your own as well. The regex based filter for test names is set with the run
method as a parameter (in the parameter array). Interesting parameters for you might be: filter
, groups
and excludeGroups
. Example:
// Run the test
PHPUnit_TextUI_TestRunner::run($suite, array(
'junitLogfile' => $path_log,
'filter' => $yourFilter,
));
精彩评论