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