宁静报告没有任何REST查询

时间:2018-08-22 12:41:58

标签: serenity-bdd cucumber-serenity

我们有一个宁静而放心的项目。

但是测试报告不会生成RESTQuery按钮来检查请求响应

我们查询with given().when().body().get(APIURL)

响应来了,但是没有找到剩余查询。

pom.xml

跑步者班

package test_suite;

import cucumber.api.CucumberOptions;
import net.serenitybdd.cucumber.CucumberWithSerenity;
import org.junit.runner.RunWith;

@RunWith(CucumberWithSerenity.class)
@CucumberOptions(
        features = "src/test/resources/features",
        plugin = {"pretty"},
        glue = {"steps"}
)
public class CucumberTestSuite {


}

api对象

@Step
    public void HTTPRequest(String ****, String ***8){
        String ApiUrl = method(somestring, somestring);
        response = given().when().log().body().get(ApiUrl); 
        //response = RestAssured.get(ApiUrl);
        //response = SerenityRest.when().get(ApiUrl);
    }

使用SerenityRest检查时出错

 net.serenitybdd.core.exceptions.SerenityManagedException: net.serenitybdd.rest.decorators.request.RequestSpecificationDecorated.getDefinedFilters()Ljava/util/List;

IT现在可以使用宁静版本1.9.26

IT现在可以使用宁静版本1.9.26

0 个答案:

没有答案