JUnit parameterized tests: how do I run only 1 specific test from IntelliJ/Eclipse?

前端 未结 5 957
名媛妹妹
名媛妹妹 2021-02-03 20:06

I have a @Parameterized junit test that spawns 50 tests:

@RunWith(Parameterized.class)
public class NurseRosteringSolveAllTurtleTest ... {

    @Par         


        
5条回答
  •  忘了有多久
    2021-02-03 20:42

    Not sure if it will help, but you can try a trick which I used with Eclipse and JUnit parameterized tests.

    In JUnit launch configuration in "Test method" field you can write the full name of parameterized test, in your example it should be something like this 'solveDataFile[28: /path/to/your/file]'. Eclipse will complain that method does not exist but will still lunch it successfully.

提交回复
热议问题