【发布时间】:2020-08-14 03:47:48
【问题描述】:
我正在尝试在第二个功能文件中调用 API,并从第一个功能文件传递参数。说从第一个 API 响应返回的令牌和当前页面值。这些必须作为第二个 API 的参数传递
* def activeDetails =
"""
function(times){
for(i=0;i<=times;i++){
karate.log('Run test round: '+(i+1));
karate.call('getActiveRouteDetails.feature', { token: token, currentPage: i });
}
java.lang.Thread.sleep(1*1000);
}
"""
* call activeDetails totalPages
在我的第二个功能中,我能够打印传递的值,但无法传递参数。你能帮帮我吗
And print currentPage
And print token
And param pageNumber = '#currentPage'
And param token = token
【问题讨论】:
标签: automation cucumber karate web-api-testing