Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

seq_task does not work #937

Closed
ShaolongHu opened this issue Dec 20, 2018 · 3 comments
Closed

seq_task does not work #937

ShaolongHu opened this issue Dec 20, 2018 · 3 comments

Comments

@ShaolongHu
Copy link

ShaolongHu commented Dec 20, 2018

seq_task does not work, with following code and cmd, locust 0.9.0:

locust -f test.py --host=http://127.0.0.1:81 --no-web -c 1
from locust import HttpLocust, TaskSet, task
from locust import seq_task

class MyTaskSet(TaskSet):
    def on_start(self):
        print "start"

    @seq_task(1)
    def step1(self):
        print "step 1"


    @seq_task(2)
    @task(2)
    def setp2(self):
        print "step 2"

    @seq_task(3)
    @task(3)
    def step3(self):
        print "step 3"

class MyLocust(HttpLocust):
    task_set = MyTaskSet
@ShaolongHu
Copy link
Author

ShaolongHu commented Dec 20, 2018

sequence is random, no pattern, remove @task() with only @seq_task() left makes no difference

@Ramshell Cloud you help check? Thanks

@Ramshell
Copy link
Contributor

I think you should use TaskSquence instead of TaskSet as the super class.

@ShaolongHu
Copy link
Author

I think you should use TaskSquence instead of TaskSet as the super class.

My mistake, thx, close this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants