testbench icon indicating copy to clipboard operation
testbench copied to clipboard

Support parameterized tests with ParallelRunner

Open Artur- opened this issue 7 years ago • 0 comments

It should be possible (and easy) to create parameterized tests and run them using ParallelRunner.

A simple use case: "Test that login works for users 'foo','bar' and 'baz'"

In the unit test, this could be expressed as something like

public class MyTest extends TestBenchTestCase {

private String username;

public void setUsername(String username) {
this.username = username;
}

@Parameters
public static Collection<String> getUsernames() {
        return Arrays.asList(new String[] { "foo","bar","baz});
}

@Test
public void testLogin() {
...
$(TextFieldElement.class).id("login").setValue(username);
...
}


Artur- avatar Nov 23 '16 07:11 Artur-