有没有办法不执行beforeEach函数只对某些测试('它'块).假设我有10个块,我不希望beforeEach为两个块执行.可能吗?
假设我正在开发一个聊天应用程序,其中用户 (X) 可以登录到该应用程序并向另一个用户 (Y) 发送消息。
我现在正在尝试通过以下步骤自动发送和接收消息的测试:
1. X Logs in with his username/password.
2. Selects Y from a list and sends a "Test Message" to Y.
3. X signs out.
4. Y logs in with his username/password.
5. Checks if he has received the message from X.
6. Y replies to X with "Reply to Test Message".
7. Y signs out.
8. X logs in, and checks if he got the reply.
Run Code Online (Sandbox Code Playgroud)
如果我要手动执行此操作,我只需打开两个窗口(其中一个在隐身模式下),一个登录为 X,另一个登录为 Y 并验证结果。
那么,几个问题: 1. 量角器是否允许一种无需点击任何地方即可打开新窗口的方式?只是一个以编程方式生成新窗口的函数?2. 是否可以让这些窗口不共享用户的会话(有点像隐身)?