Forum Discussion

jawed's avatar
jawed
Occasional Contributor
7 years ago

How to configure mix scenario by reusing script

Hello,

I want to designed a scenario,

 

Total user are 10 out of that :

ScenarioUsers
Login100%
Search80%
Create20%
Logout100%

 

 also explain how to reuse the scenario/script, data correlation between two scenario

7 Replies

  • baxatob's avatar
    baxatob
    Community Hero

    How we do it:

     

    1. Create short scenarios (blocks), which logically cover one process: Login, Search, Create, Logout in your case

    2. Create global scenarios from blocks, like: Login_Search_Logout, Login_Create_Logout

    3. Create load test, which contains required global scenarios:

     

  • baxatob's avatar
    baxatob
    Community Hero

    About data correlation.

     

    We record ONE big scenario, e.g. Login_Search_Create_Logout

     

    Then we make all necessary correlations, data replacing, assign variables etc., and divide this scenario on blocks, like I said above.

    • AlexKaras's avatar
      AlexKaras
      Champion Level 3

      baxatob:

       

      Hi,

       

      Thank you a lot for describing the way you are going - this is something that I have interest in.

      I will appreciate it if you also can answer these questions:

      a) If, say, login sequence changes, do you prefer re-record just it and than make data correlation to match the already existing one made initially or do you prefer to re-record the whole big scenario ?

      b) Do you have any processes/enforcing rules/etc. that you follow to guarantee that, say, login sequence recorded a week ago still corresponds to reality? I.e. that requests were not added or removed during past week and that the data sent and received have the same format and contents? Any better practice other than re-record the sequence and compare it with the existing one? Maybe you have something to comment for the https://community.smartbear.com/t5/LoadComplete-Feature-Requests/Make-it-possible-to-compare-and-synchronize-requests-for/idi-p/138803 feature request?

      • baxatob's avatar
        baxatob
        Community Hero

        Hi Alex,

         

        First of all I want to clarify, that we perform load testing mostly to control changes outside of API of our applications. E.g. new encryption module was integrated or database version was upgraded or something else. I mean that API itself is rather stable for a very long period. For example authentication calls in our CRM system were not changed for the last 2 years or even more. So I think it easier for us to re-record scenario in the case of significant API changes. Small changes can be fixed manually.

         

        As for your second question. We have a number of API tests, which cover basic functionality and check data structure. We run them before performing load testing to be sure that the application works at all.

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    Hi,

     

    Are those 20% who do Create execute Search as well? Or do they immediately proceed with Create?

    I.e. do you have one sequence like this:

    Login(100%) -> Search (100%) -> Create(20%) -> Logout(100%)

    or two sequences like this:

    Login(80%) -> Search (80%) -> Logout(80%)

    Login(20%) -> Create(20%) -> Logout(20%)

    ?