I want to add a Run Configuration in IntelliJ IDEA which allows me to only run unit tests and ignores two other types of tests present in the project: integration tests and frontend tests.
The integration tests in our project follow the naming pattern NameOfTestClassIT, whereas the frontend tests follow the naming pattern T00_00_NameOfTestClass.
I've found a nice solution here to exclude integration tests from being executed and I wanted to extend the RegEx ^(?!.*IT$).*$ with an alternation to exclude the other naming pattern as well.
I tried a lot of different combinations and it resulted in this RegEx: ^(?!(.*IT$)|T[0-9]{2}).*$
I tried to use a RegEx checker to prove that the expression works, and it works perfectly. But when I execute the Run Configuration with this pattern, integration tests are skipped, but not so the frontend tests. Are there any limitations set by IntelliJ that it simply doesn't work or is my RegEx not doing what it should?
I would be glad if someone could help me on that!