20 lines
452 B
Python
20 lines
452 B
Python
from locust import HttpUser, task, between
|
|
import random
|
|
import urllib3
|
|
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
|
|
|
|
|
|
class MojServisUser(HttpUser):
|
|
"""
|
|
Simulira korisnika koji koristi moj-servis API.
|
|
"""
|
|
|
|
wait_time = between(1, 3)
|
|
|
|
@task(5)
|
|
def health(self):
|
|
self.client.get("/health", name="GET /health", verify=False)
|
|
|
|
def on_start(self):
|
|
print(f"Novi virtualni korisnik startan")
|