Reputation: 51
I have some junit5 tests in my project, I have used the @Tag annotations for some of the classes. I am successfully able to run those classes from Intellij via configuring the Run/Debug like below. This looks good when I use single type of tag eg. suite-three Image-1
The problem I am facing is, Now I want to run classes with two different tags at the same time, since I am executing the some tests Parallelly. Inorder to achieve this I have created an intermediate Bootstrap kind of class where I am using @SelectClasses annotations class to pass this 2 Test classes which I wish to execute like this Image-2 . So here when I configure the Tags from Intellij like below screenshot Image-3
Notice I am sending two different tags, but Intellij doesnt executes the Test class and it keeps on giving me this message "No Tests Found".
Any help would be mighty helpful to me.
Upvotes: 1
Views: 1950
Reputation: 51
We can use | pipes for running multiple classes together viz. tag-1 | tag-2
this will run all the classes which are tagged with tag-1 OR tag-2. I am running this classes parallelly with JUnit5's new method with usage of junit.jupiter.execution.parallel.enabled = true
Upvotes: 2