diff --git a/src/test/java/com/example/teamcity/api/BaseTest.java b/src/test/java/com/example/teamcity/api/BaseTest.java index c0d2aa6..f63ad0e 100644 --- a/src/test/java/com/example/teamcity/api/BaseTest.java +++ b/src/test/java/com/example/teamcity/api/BaseTest.java @@ -4,13 +4,14 @@ import com.example.teamcity.api.requests.CheckedRequests; import com.example.teamcity.api.requests.UncheckedRequests; import com.example.teamcity.api.spec.Specifications; +import com.github.viclovsky.swagger.coverage.SwaggerCoverageRestAssured; +import io.restassured.RestAssured; import org.assertj.core.api.SoftAssertions; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeMethod; public class BaseTest { protected SoftAssertions softy; - public TestDataStorage testDataStorage; /* * Due to we always have access to Supper User and always can work with it @@ -22,11 +23,6 @@ public class BaseTest { public UncheckedRequests uncheckedWithSuperUser = new UncheckedRequests(Specifications.getSpec().superUserSpec()); -// @BeforeMethod -// public void setupTest() { -// testDataStorage = TestDataStorage.getStorage(); -// } - @AfterMethod public void cleanTest() { testDataStorage.delete(); @@ -36,6 +32,10 @@ public void cleanTest() { public void beforeTest() { testDataStorage = TestDataStorage.getStorage(); softy = new SoftAssertions(); + /* + * Фильтр создаст папку по умолчанию swagger-coverage-output с метаинформацией для построения отчета о покрытии. + * */ + RestAssured.given().filter(new SwaggerCoverageRestAssured()); } @AfterMethod