What about adding some totals to the report?

It should account for @BeforeAll, @AfterAll, @BeforeEach, @AfterEach
Sidenote: individual test times currently include @AfterAll and I don't think they should. Perhaps I should file a separate issue on that one?
/*
* This Java source file was generated by the Gradle 'init' task.
*/
package test.times;
import static org.junit.jupiter.api.Assertions.assertTrue;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
class LibraryTest {
@BeforeAll
static void beforeAll() throws InterruptedException {
Thread.sleep(4000); // 4 secs startup
}
@AfterAll
static void afterAll() throws InterruptedException {
Thread.sleep(3000); //3 secs shutown
}
@BeforeEach
void beforeEach() throws InterruptedException {
Thread.sleep(1000); // 1 secs for each test
}
@AfterEach
void afterEach() throws InterruptedException {
Thread.sleep(2000); // 2 secs for each test
}
@Test
void testSomeLibraryMethod() {
Library classUnderTest = new Library();
assertTrue(classUnderTest.someLibraryMethod(), "someLibraryMethod should return 'true'");
}
}
/*
* This Java source file was generated by the Gradle 'init' task.
*/
package test.times;
import static org.junit.jupiter.api.Assertions.assertTrue;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
class LibraryTest2 {
@BeforeAll
static void beforeAll() throws InterruptedException {
Thread.sleep(1000); // 1 secs startup
}
@AfterAll
static void afterAll() throws InterruptedException {
Thread.sleep(1000); // 1 secs shutown
}
@BeforeEach
void beforeEach() throws InterruptedException {
Thread.sleep(1000); // 1 secs for each test
}
@AfterEach
void afterEach() throws InterruptedException {
Thread.sleep(1000); // 1 secs for each test
}
@Test
void testSomeLibraryMethod() {
Library classUnderTest = new Library();
assertTrue(classUnderTest.someLibraryMethod(), "someLibraryMethod should return 'true'");
}
}
What about adding some totals to the report?
It should account for
@BeforeAll,@AfterAll,@BeforeEach,@AfterEachSidenote: individual test times currently include
@AfterAlland I don't think they should. Perhaps I should file a separate issue on that one?