Skip to content

Commit

Permalink
updated BaseTest by adding filter for RestAssured in beforeTest()
Browse files Browse the repository at this point in the history
  • Loading branch information
“Dorokhin committed Jun 2, 2024
1 parent c34100f commit 0879647
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/test/java/com/example/teamcity/api/BaseTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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();
Expand All @@ -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
Expand Down

0 comments on commit 0879647

Please sign in to comment.