diff --git a/testing-modules/junit-5/pom.xml b/testing-modules/junit-5/pom.xml index 96944b4dc6..a27e4da61b 100644 --- a/testing-modules/junit-5/pom.xml +++ b/testing-modules/junit-5/pom.xml @@ -124,9 +124,13 @@ com.baeldung.TestLauncher + + org.apache.maven.plugins + maven-surefire-report-plugin + ${surefire.report.plugin} + - 5.4.2 2.23.0 @@ -137,6 +141,7 @@ 2.22.0 1.6.0 5.0.1.RELEASE + 3.0.0-M3 diff --git a/testing-modules/junit-5/src/test/java/com/baeldung/execution/time/SampleExecutionTimeUnitTest.java b/testing-modules/junit-5/src/test/java/com/baeldung/execution/time/SampleExecutionTimeUnitTest.java new file mode 100644 index 0000000000..7d43d1a560 --- /dev/null +++ b/testing-modules/junit-5/src/test/java/com/baeldung/execution/time/SampleExecutionTimeUnitTest.java @@ -0,0 +1,38 @@ +package com.baeldung.execution.time; + +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertTrue; + +class SampleExecutionTimeUnitTest { + + @Test + void someUnitTest() { + + assertTrue(doSomething()); + } + +// @Test +// void someIntegrationTest() throws Exception { +// +// //simulate an operation that may take 5 seconds +// Thread.sleep(5000); +// +// assertTrue(doSomething()); +// } +// +// @Test +// void someEndToEndTest() throws Exception { +// +// //simulate an operation that may take 10 seconds +// Thread.sleep(10000); +// +// assertTrue(doSomething()); +// +// } + + private boolean doSomething() { + return true; + } +}