Skip to main content
Version: 1.0.0

Integrate with Junit (v1.0.0)

  • Add below code in your unit testfile, say, Sample_Test.java in test/java directory.
          @Test
public void TestKeploy() throws InterruptedException {

CountDownLatch countDownLatch = HaltThread.getInstance().getCountDownLatch();
mode.setTestMode();
new Thread(() -> {
SamplesJavaApplication.main(new String[]{""});
countDownLatch.countDown();
}).start();

countDownLatch.await();
}
  • Run mvn test

Questions? 🤔💭

For any support please join keploy slack community to get help from fellow users, or book a demo if you're exploring enterprise use cases.