Versions Compared

Key

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

...



Note
Also I think its important to mention a large reason for preference of locust is the rapid speed at which we can prototype/develop tests. The minimal investment means that down the road when we either invest in creating our own performance testing framework and/or find a suitable long term solution these can be easily ported and thrown away.

An example of locust which I choose as prime cantidatepersonally would use: in 34 ~30 lines of code

Code Block
languagepy
themeDJango
titleintrigue-load-test.py
import locust
from locust import task


class IntrigueTasks(locust.TaskSet):
    def on_start(self):
        self.client.verify = False
        
    @task
    def index(self):
        self.client.get('/search/catalog/')

    @task
    def sources(self):
        self.client.get('/services/catalog/sources')

    @task
    def catalogid(self):
        self.client.get('/search/catalog/internal/localcatalogid')

    @task
    def workspace(self):
        self.client.get('/search/catalog/internal/enumerations/metacardtype/workspace')


class IntrigueUser(locust.HttpLocust):
    task_set = IntrigueTasks
    min_wait = 5000
    max_wait = 10000
    host = "https://example.com:8993"

...