How to use dict_task_2 method in locust

Best Python code snippet using locust

test_env.py

Source:test_env.py Github

copy

Full Screen

...85 # Testing task assignment via dict86 class DictTaskSet(TaskSet):87 def dict_task_1():88 pass89 def dict_task_2():90 pass91 def dict_task_3():92 pass93 tasks = {94 dict_task_1: 5,95 dict_task_2: 3,96 dict_task_3: 1,97 }98 class MyUser4(User):99 tasks = [DictTaskSet, SingleTaskSet, SingleTaskSet]100 # Assign user tasks in dict101 environment = Environment(user_classes=[MyUser4])102 environment.assign_equal_weights()103 u = environment.user_classes[0]...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run locust automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful