假设我想并行将多个用户的请求(例如登录请求)发送到服务器?
是否可以使用黄瓜和剩余保险?我应该为此使用多线程还是还有其他方法?我应该为每个用户创建功能文件吗?
以下是我到目前为止所尝试的。但是如何将两个会话分开?
Scenario Outline: Multiple Logins - logouts scenario
Given Request specifications are set with base uri "https://172.17.176.2" and port 443
When Login succeeded with credentials <username> and <password>
Then Verify Status Code is 200
And jsessionid isn't empty
When logout
Then Verify Status Code is 200
Examples:
| username | password |
| "user1" | "pass1" |
| "user2" | "pass2" |
步骤定义为
@When("Login succeeded with credentials (.*) and (.*)")
public void login_to_Succeeded_with_credentials(String username, String password) {
//someLoginMethod();
}
谢谢!