use of testframework.CustomTestFramework in project teamscale-jacoco-agent by cqse.
the class TiaClientTiaModeHttpSystemTest method systemTest.
@Test
public void systemTest() throws Exception {
CustomTestFramework customTestFramework = new CustomTestFramework(AGENT_PORT);
customTestFramework.runTestsWithTia();
assertThat(customTestFramework.testInfos.stream().map(TiaClientTiaModeHttpSystemTest::getCoverageString)).containsExactlyInAnyOrder("SystemUnderTest.java:4,13", "SystemUnderTest.java:4,8");
}
use of testframework.CustomTestFramework in project teamscale-jacoco-agent by cqse.
the class TiaClientSystemTest method systemTest.
@Test
public void systemTest() throws Exception {
TeamscaleMockServer teamscaleMockServer = new TeamscaleMockServer(FAKE_TEAMSCALE_PORT, "testFoo", "testBar");
CustomTestFramework customTestFramework = new CustomTestFramework(AGENT_PORT);
customTestFramework.runTestsWithTia();
assertThat(teamscaleMockServer.uploadedReports).hasSize(1);
TestwiseCoverageReport report = teamscaleMockServer.parseUploadedTestwiseCoverageReport(0);
assertThat(report.tests).hasSize(2);
assertAll(() -> {
assertThat(report.tests).extracting(test -> test.uniformPath).containsExactlyInAnyOrder("testBar", "testFoo");
assertThat(report.tests).extracting(test -> test.result).containsExactlyInAnyOrder(ETestExecutionResult.FAILURE, ETestExecutionResult.PASSED);
assertThat(report.tests).extracting(TiaClientSystemTest::getCoverageString).containsExactlyInAnyOrder("SystemUnderTest.java:4,13", "SystemUnderTest.java:4,8");
});
}
Aggregations