Last active
December 28, 2020 03:00
-
-
Save ashsepra/a13769808cea2ad53f81cf95851126d0 to your computer and use it in GitHub Desktop.
Sample web load testing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Author [email protected] | |
# This load test for example | |
# Scope on load test at wikipedia | |
import time | |
from locust import HttpUser, TaskSet, task, between | |
class SubClassTest(TaskSet): | |
@task | |
def main_page(self): | |
self.client.get('/wiki/Halaman_Utama') | |
@task(2) | |
def perihal_page(self): | |
self.client.get('/wiki/Wikipedia:Perihal') | |
class MainClassTest(HttpUser): | |
tasks = [SubClassTest] | |
wait_time = between(5, 10) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment