BAEL-3236 Determine the execution time of JUnit Tests (#7985)
* BAEL3236 Execution time Junit * BAEL3236 Execution time Junit * BAEL3236 Added more test cases * BAEL3236 Added more test cases * BAEL3236 Renaming to integration test * BAEL3236 Temporary enabling * BAEL3236 Reverting Integration tests * BAEL3236 Refactoring TCs * BAEL3236 Refactoring TCs * BAEL3236 Removing now unused spring and http client deps * BAEL3236 Fixing test cases and updating the missed version in pom.xml * BAEL3236 throwing Exception in TCs
This commit is contained in:
parent
b46dc7a07b
commit
0451f008be
@ -124,9 +124,13 @@
|
||||
<mainClass>com.baeldung.TestLauncher</mainClass>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-report-plugin</artifactId>
|
||||
<version>${surefire.report.plugin}</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<properties>
|
||||
<junit.jupiter.version>5.4.2</junit.jupiter.version>
|
||||
<mockito.junit.jupiter.version>2.23.0</mockito.junit.jupiter.version>
|
||||
@ -137,6 +141,7 @@
|
||||
<maven-surefire-plugin.version>2.22.0</maven-surefire-plugin.version>
|
||||
<exec-maven-plugin.version>1.6.0</exec-maven-plugin.version>
|
||||
<spring.version>5.0.1.RELEASE</spring.version>
|
||||
<surefire.report.plugin>3.0.0-M3</surefire.report.plugin>
|
||||
</properties>
|
||||
|
||||
</project>
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user