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

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

    For a subset of tests ex( 27 & 28 ) Just add:

    `.subList( startInclusive, stopExclusive );`
    

    before returning your parameters collection.

    Non consecutive subsets:

    Collection c = Arrays.asList( data ).subList( startInclusive, stopExclusive );
    c.add( another subset );
    return c;
    

提交回复
热议问题