Forum Discussion

quangtran's avatar
quangtran
New Contributor
2 years ago

How to setup the test in ReadyAPI to avoid multiple logins to the application in a LoadUI scenario.

When running my load test if I have my login and logout inside of a test case and then run as a load scenario, it will trigger many logins and logout request in a load test.

 

The script has the following steps.

 

Login

Action1

Action2

Action3

Logout

 

There is a token that gets passed to Action1, Action2, Action3, and Logout.

How do I setup the test case or scenario in loadUI, so that I only need to run Login once and then loop through Action1 - Action3 before Logout at the end.

 

 

  • KarelHusa's avatar
    KarelHusa
    Champion Level 2

    quangtran,

    you can put the login and action steps into two separate test cases:

    • Login Test Case
    • Action Test Case 

     

    Then, you can:

    • execute the Login test case manually and thus set up the authorization data.
    • execute a load test with the Action Test Case.

     

    • quangtran's avatar
      quangtran
      New Contributor
      This doesn't work as I am trying to simulate different users logging in for each VU I am running.




      Quang Tran
      Test Automation Lead
      Email: quang.tran@dyedurham.com
      www.dyedurham.com<>

      [cid:ddprimarymasterbrand_c09dcc02-546b-4bb9-82d2-ca94d3045e96.png]<>

      The information contained in this email may be privileged, confidential, and protected from disclosure. If you are not the intended recipient, or an employee, or an agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this email in error, please notify the sender immediately by replying to this email and you must delete this email from your computer.
      • KarelHusa's avatar
        KarelHusa
        Champion Level 2

        quangtran, so the test case could be designed the following way:

        • login
        • data source
        • activities
        • data source loop
        • logout

         

        The activities would be repeated multiple times and login/logout just once.