Forum Discussion

AlexKaras's avatar
AlexKaras
Champion Level 3
9 years ago

Record scenarion in one shot or in a small chunks - what is recommended ?

Hi,

 

Given there is a complex web application with a wide functionality provided and the necessity to have several load scenarios aimed to be combined in the tests that imitate different end-user use cases, what is the best practice for scenarios recording according to your experience?

An example of use cases: "login - browse for some entity - check entity's properties - logout", "login - create entity - add and attach some child entities - logout"; "login - browse for some entity - add and attach some child entity(-ies) - logout", etc. with the possible execution of the sequences within login-logout block one or more times.

Possible recording approaches:

a) Using custom paging, record a long scenario that includes all or the most of the needed actions. Let LoadComplete parameterize it, verify and save a copy of the created big scenario (master scenario). Then remove everything but the login sequence from the initial scenario and save it as a scenario named, say, Login. Add the copy of the saved master scenario and remove everything but the browsing sequence and so on until the logout sequence is saved as a scenario.

b) Record every small use case separately.

 

The expected benefit from the approach a) is that all (or the most of the) parameterization is done by LoadComplete and this parameterization remains in place when recorded scenario is cleaned from the not necessary requests, so it is expected that it will be easy to combine a set of scenarios into different tests. The price for this is the necessity to plan a long initial recording sequence and the necessity to be very attentive while recording.

On the other hand, the recording of small and simple sequences according to the approach b) seems to be an easy task. But at the price of the necessity to find in every small recorded sequence all places that require parameterization and do a proper parameterization so that all small scenarios play smoothly when combined into the test.

 

I will really appreciate any experience sharing: what approach did you use, whether or not you were satisfied with the chosen one and are you going to use it in the future or try another one?

  • AlexeyKryuchkov's avatar
    AlexeyKryuchkov
    SmartBear Alumni (Retired)
    Hi Alex,

    Personally, I prefer not to reuse any scenarios at all. I’d rather record scenarios of any complexity at once, no matter whether there will be any "reusable" parts like login, logout etc. This frees me from the jigsaw puzzle of combining atomic scenarios into a complex one. I think that I have such an opinion as being a support engineer I've never had any big load testing tasks, and I don't really understand the value of reusing scenarios =)

    So, I have to perform a mental experiment. If I had to create scenario chunks, I would still start with recording a long scenario as I'd need to learn the logic in the HTTP traffic. Only then I would try to extract any simpler scenarios from it.
    • AlexKaras's avatar
      AlexKaras
      Champion Level 3

      Hi Alexey,

       

      Thank you a lot for your comments.

      I have to say that in general they correspond to my current vision. :)

      I hope that I will have a chance to verify this my vision in some near future and get a more practical experience of how well it works for me.