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:
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user