You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

For DistributedTest example, see CreateAndLocalDestroyInTXRegressionTest.

1) Add these imports:

import junitparams.JUnitParamsRunner;
import junitparams.Parameters;
import junitparams.naming.TestCaseName;

2) Add this to your test class:

@RunWith(JUnitParamsRunner.class)

3) Use both `@Parameters` and `@TestCaseName` on test method(s) using parameters:

@Test
@Parameters({"true", "false"})
@TestCaseName("{method}({params})")
public void testSomeBehavior(final boolean value) throws Exception {

This results in nicer test names in the results:

ClientDeserializationCopyOnReadRegressionTest (org.apache.geode.cache)
    testCopyOnReadWithBridgeServer(true)
    testCopyOnReadWithBridgeServer(false)

 

 

  • No labels