在 API 中使用从 excel 中读取的参数

Using the parameters that are read from excel in the API

我有两个参数[用户名和密码]。这两个可以从excel读入API。但是当我在 API 中使用这些值时,我无法在 API 中得到响应。请帮我解决问题。提前致谢。

我正在使用excel读取参数。

println ("...Fetching Username         : "+Username)
println (".. Fetching Password         : "+Password)
WS.sendRequest(findTestObject('SIT_BDA/LoginAPI',[ ('Username'): Username, ('Password') : Password]))

我想使用从 excel 中读取的用户名和密码,并在 API 中获得响应。

要阅读 XLS,您可以在 Katalon Studio 中使用 Data Files。创建一个新的并设置输入文件。 要编写 XLS 文件,您可以使用 Apache POI Java API,您可以在自定义关键字中设置它。有详细的tutorial.