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


i have @parameterized junit test spawns 50 tests:

@runwith(parameterized.class) public class nurserosteringsolveallturtletest ... {      @parameterized.parameters(name = "{index}: {0}")     public static collection<object[]> getsolutionfilesasparameters() {         return ... // returns 50 files.     }      public nurserosteringsolveallturtletest(file unsolveddatafile) {         ...     }      ...      @test     public void solvedatafile() {         ...     }  } 

running takes hour (and it's impossible shorten time, integration tests). test 28 fails.

how run test 28 alone, without running other 49 tests? without changing actual code, configuring -d or similar in intellij's (or eclipse's) run configuration.

eclipse (as of mars m4 release) able run not single test parameterized test class kind of subtree.

this can be:

  • all methods single data set returned @parameterized-method
  • all datasets single @test-method

and mentioned, test can specified entering tests name "method" text filed within launch configuration. there marker indicating method doesn't exist, test run anyway.

see this blog post details.


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -