I want to execute few selected test cases from my class of multiple test cases using php unit with ease.
As my 1-2 test cases are failing from bunch of test cases and also finding difficult to execute whole test suite again for these two, is there any method without adding comment to the others or copying these two methods in different suite.
Thanks to all in advance
You may run single test cases or single test classes from your suites using the –filter cli option:
--filterruns tests whose name matches the given pattern. The pattern can be either the name of a single test or a regular expression that matches multiple test names.Example
Take the following example test class
BlaTestcontaining test casestestSameandtestElsein fileBlaTest.php:Running all test cases within
BlaTestThis filter matches the test class name.
Running a single test case within
BlaTestThis filter matches the test case name, then indicates to run this filter across file BlaTest.php.