如何在REST保证框架中使用数据结构以JSON格式文件传递输入和验证?
如何使用数据结构在REST保证框架中以JSON格式文件传递输入和验证。在下面的文件中,我将用户名和密码作为有效负载作为输入,并从JSON响应中验证不同的用户类型。
基本上,我想避免从Cucumber示例关键字和Excel文件传递数据。我希望数据从JSON格式文件传递。需要有关如何完成此操作的输入
{
Login_Pass_1:
{
Input:
Username:paulproux
password: xyz123
Verification:
Usertype: admin
}
Login_Pass_2:
{
Input:
Username:johnrossu
password: abc456
Verification:
Usertype: reviewer
}
Login_Pass_3:
{
Input: Username:johnrossu
password: sdf234
Verification:
Usertype: moderator
}
}
How to use data structures to pass Input and Verification in JSON format file in the Rest Assured framework. In the below file I am passing the Username and password as the input as the payload and verifying different User types from the JSON response.
Basically I want to avoid passing the data from Cucumber Example keyword and excel files. I want the data to be passed from JSON format file. Need inputs on how to get this done
{
Login_Pass_1:
{
Input:
Username:paulproux
password: xyz123
Verification:
Usertype: admin
}
Login_Pass_2:
{
Input:
Username:johnrossu
password: abc456
Verification:
Usertype: reviewer
}
Login_Pass_3:
{
Input: Username:johnrossu
password: sdf234
Verification:
Usertype: moderator
}
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论