Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Added Recording FF activities and transform them to locustfile.py

...

Error rate increases as soon as system is overloaded


03 Really hard test scenarios: Recording workflow steps in FireFox to generate script for Locust

Creating a Locust configuration file from scratch is sometimes difficult, especially when complex workflows and work steps need to be analysed. 

One solution is to record typical work steps in the browser and save them in HAR format (
 https://en.wikipedia.org/wiki/HAR_(file_format)). This, in turn, can be created with the tool har2locust (
 https://github.com/SvenskaSpel/har2locust) into locustfile.py configuration files and an analysis as described above is ready to go.

The procedure:   

...

  • read the notes on

...

  • [locust]$ pip3.11 install har2locust

Record FF session:   

  • Open DS7 page in browser

...

  • Menu / Tools for developers | right mouse button + Examine

...

  • Network analysis tab, click on

...

  • trash basket symbol (delete) - from then on the recording of the activities runs

...

  • Execute DS7 actions (Login, MyDSpace, ... Logout)

...

  • In the end goto column "File", click right mouse button, "Save as Har-File" and save the recording

...

  • sftp Har-File => SERVER

...

  • [locust]$ har2locust x1.har > locustfile.py

...

  • [locust]$ locust --tls-cert /etc/pki/tls/certs/SERVERNAME/cert.pem --tls-key /etc/pki/tls/certs/SERVERNAME/privkey.pem

...