I can't seem to find an answer to this anywhere, but it's probably right in front of me (usually is).
For my project: using PHPUnit, I have many tests, in several files, but there are a few tests that (deliberately) take a long time to run so I have them marked as 'skipped' by default.
What I'd like is a means to run ALL my tests (apart from the skipped tests) using the default command line instruction, but if the filter term is specifically for the skipped tests, then only those tests are run, (or they are included in the main run) and the skipped instruction is ignored.
I can achieve this if I can access the term used in --filter
but I can't see if that's possible or not.
I'm aware that I could use test-suites and may well have to switch to that paradigm, but if it's possible not to, then I'd prefer that as it means I can use the default test command 99% of the time instead of having to specify the suite every time.
For reference I have my test
command as an alias (to project\vendor\bin\phpunit), which makes for a fast instruction.
Unfortunately, setting a @group
value and using that in the default alias ( project\vendor\bin\phpunit --exclude-group
), then using $ test --group
doesn't work (the two parameters cancel each other out).