0

如何为网页提供用户名和密码,用于云上的 Web 性能和负载测试(基于 URL)?

大家好,

我正在使用 Visual Studio 企业版 2017 创建 Web 性能和负载测试。我的 Web 应用程序在登录屏幕上有用户名和密码字段。提供用户名和密码后;用户需要点击“登录”按钮。

请让我知道如何设计我的测试以包括登录功能。

我正在参考https://www.visualstudio.com/en-us/docs/test/performance-testing/getting-started/get-started-simple-cloud-load-test这个 URL 以供参考和设计我的基本测试. 现在我想为我的应用程序创建 Web 性能和负载测试。但是,登录功能没有说明。

谢谢。

4

1 回答 1

1

I think you are learning this tool. About the tool, it is just simulate the browser requests which is got recorded during your navigation. Hence, to test your scenario you can follow below steps.

1. Create web test in visual studio.
2. Open that web test and there is record button. Click on that.
3. Record your workflow step by step. Once you are done stop the recording.
4. Step 3 will give you raw script that means the requests that you recorded will have hard-coded parameters like user name and password. that you need to parameterize it.
5. the script will be now available for loadtest, now you need to add load test file and define load pattern.

Now your loadtest file is ready to test.

于 2017-04-04T03:56:39.380 回答