Using JUnit with Wicket Page Test

In your pom.xml, add JUnit instead of TestNG as the dependency:

<project ...>

Create a test suite:

import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;

import com.ttdev.wicketpagetest.WebPageTestBasicContext;

@SuiteClasses( { BookmarkablePageTest.class })
public class MyTestSuite {
        static public void setUp() throws Exception {

        static public void tearDown() throws Exception {


Here, it is assumed that you only have one test class (BookmarkablePageTest). Add more such test classes as needed.

Tell Maven to run this suite only during the test phase:

<project ...>

Everything else is the same as when using TestNG.