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

前端 未结 5 963
名媛妹妹
名媛妹妹 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:38

    Similarly to Miguel's answer, if you are using the JUnit 5's

    @ParameterizedTest
    @CsvFileSource(resources = arrayOf("/sender.csv"))
    

    you can go to your csv file and "comment out" some lines by prepending the # character to them.

提交回复
热议问题