This video shows how to test a website with multiple user logins when Form authentication is used. Learn the four-step process to add multiple credentials to the test configuration.
In the next video you will learn how to test a web application with multiple user logins when Server authentication is used. Watch Test With Multiple Logins: Server Authentication Duration 2:37
Welcome to StresStimulus video training. In this video, I will show you how to configure multiple logins in a load test. When recording a test script for an application that requires login, you will typically enter the credentials of a single user. To realistically test the performance of such applications, the tool would need to emulate multiple users with different credentials. Let's learn how to parameterize user credentials in the applications using form authentication. There are 4 steps to parameterizing credentials: creating a data-set with the credentials, finding the request that should be parameterized, creating parameters and verifying that the multi-user authentication works. Let's begin. In the video called "Recording a Test Case", we recorded a script with the username: "user at e-store dot com". I opened this script. Step 1: in the "source variables" section, select Data-sets and click "Create Authentication Data-set". A new data-set called "Credentials" will be created. It has two fields: Username and Password. I’m going to paste a set of credentials into the data-set. Alternatively, you can open a CSV file with user credentials. Step 2: next, to find which request to parameterize, in the test case tree, click "Find Sessions by Content", or hit Control-F. Then type the recorded username, change the search scope to "Requests" and click "Find All". Request number 11 with the recorded username will be highlighted. Step 3: to create a parameter, select this request and click the "Parameters" node in the workflow tree. Select the "body" tab to see the request form fields. There is an "Email" field which contains the username. I need to replace it with the data-set variable we created. Click the "replace with" column to display the variable picker. Expand the data-sets node, the Credentials variable, and the Username field. Then select the VU-bound data binding method. This binding method will ensure each VU will use the same credentials on all test iterations. I will do the same for the password field. Step 4: let’s run "Verify" to ensure that we created the parameters correctly. By default, the first virtual user will replay the script, but you can change it. Verify is completed with no errors. Let’s make sure that request 11 was replayed with different credentials. I double-click it to open the "session compare inspector" and click on the web form tab. The recorded session is on the left, and the replayed session is on the right. As you can see, StresStimulus used the credentials from the first row of the data-set instead of the recorded credentials. In the next video we will learn how to parameterize user credentials with other types of authentications. Thank you for watching.