Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

According to the requirements from ticket

Jira Legacy
serverSystem JIRA
serverId01505d01-b853-3c2e-90f1-ee9b165564fc
keyPERF-495
script was created.
It consists of 4 workflows and has configurable parameters depending on each script's needs.
Workflow probabilities will be configured with additional script for inside workflow distribution (for example Check-in Checkout script - BranchSelectorRandomizerScript.gvy) or have .csv config files and configurable number of users and workflows run count.
It is able to run jobs with long duration or big file sizes using different configurable thread groups for each workflow.
Script location https://github.com/folio-org/perf-testing/tree/master/workflows-scripts/master-jmeter-script

JMeter can be used as the main load tool for the Master Script

We have a prototype script for 4 workflows now. To add a new workflow to JMeter use the steps:

  1. Merge new workflow to the existing JMerer script
    Image Added
  2. The new workflow should be added as 1 new thread (transform it if needed).
  3. Transform all Module controllers in the thread to Transaction controllers or Simple controllers to avoid future problems with script support (the new name of the test plan can cause all Module controllers unmapped)
  4. Ensure that all config elements are the same for all workflows and delete duplicates. If there are distinct, special ones for the new workflow move them inside the workflow thread.
    Image Added
  5. Configure thread parameters with variables named with prefixes according to the workflow naming. Example duration for check-in/check-out - CICO_duration.
    Add this variable to User Defined Variables as a Property to be able config settings for test runs from Jenkins.
    Image Added
  6. Prepare JMeter-supported data files: Define which data should be distinct and prepare specific files and place them in the jmeter-supported-data folder. The jmeter-supported-data folder should have the same location as the .jmx file.

General recommendations for script creation

  1. Avoid using Module controllers
  2. Sharing mode for CSV data set config in JMeter: Current thread or Current thread group. The reason is in other cases all thread groups will take 1 of the parameters but not use it and we will reach the end of the file with parameters too soon.
  3. Use prefixes according to the workflow naming for variables. Example duration for check-in/check-out - CICO_duration.
  4. For data preparation: make sure that for loan renewal, CICO, and for items bulk editing (the list can be increased) we need unique items and users' barcodes.
  5. Use HTTP Header Manager in the test plan config and avoid duplicates in the Thread Group and samplers.
  6. Remove unnecessary pre and post-processors (previously used for debugging).
  7. Parametrise URL using Sent Parameters With the Request option.
  8. Create parent sampler for transactions to avoid mess in the results.
  9. Change the Result Status Action Handler parameters to "Go to the next iteration of Current loop", "Break Current loop", or "Stop Thread" (not a Thread Group or all test). To avoid test stop on 1 Thread error.
  10. Remove suffix _all from JSON Extractor
  11. log.info should be changed to something useful in Carrier.io
  12. Need to analyze the distribution for each of the workflows
  13. If we will need to test the periodical increase of the virtual users it is recommended to use JMeter - "Ultimate thread group". Adding additional duplicated thread groups will be not useful for us because we are not able to share data between different threads (See 2.) so the test will fail.

Database population script should be prepared

As an example of the script, we can use the existing one for the check-in/checkout workflow on Carrier.io.

Drawio
bordertrue
diagramNameWorkflows Diagram
simpleViewerfalse
width
linksauto
tbstyletop
lboxtrue
diagramWidth1251
revision3