我试图在我的工作场所使用Restassured来展示宁静,并告诉他们与使用jasmine.js相比,它是多么棒和容易使用
我怎么会在我试图做的基本测试中遇到一些问题
我的测试说
Given we have valid credentials for the client using this test
When we try to serach for a medicine ''
Then we get a valid '' response with search results
|medicine|perflabel|
|Salbutamol|perflabel1|
|Panadol|perflabel2|
|Salbutamol (GA)|perflabel3|
当我进入下一步
@When("we try to serach for a medicine '(.*)' ")
public void tryToSearchUsingEquals(String medicine)
{
tsApiActions.requestServiceSearchWhichEquals(medicine);
}
In my Step method
@Step
public void requestServiceSearchWhichEquals(String medicine)
{
host = "http://www.int.abc.com.au/api/cs/v1/terminology-service/trade-product/search-summary?offset=0&limit=20&prefLabel=eq "+medicine+"&sort=prefLabel DESC&cache=false";
requestSend(host);
}
我的问题是
>我如何将变量(沙丁胺醇,Panadol)注入uri?
>如何将此URI放入单独的属性文件中并在Step方法中调用它?
任何帮助都非常感谢
谢谢