zlorb / locust.replay

Record and playback Locust.io tests with MITMproxy
58 stars 16 forks source link

Issues with Locust 1.3.1 #13

Closed jjoynsonerwin closed 3 years ago

jjoynsonerwin commented 4 years ago

Hi, I have just set this up with the latest Mitmproxy (v5.2) and latest Locust v1.3.1 and have a few issues with the generated Locust code.

ImportError: The HttpLocust class has been renamed to HttpUser in version 1.0. For more info see: https://docs.locust.io/en/latest/changelog.html#changelog-1-0

I updated the above manually and then got: DeprecationWarning: Usage of User.task_set is deprecated since version 1.0. Set the tasks attribute instead (tasks = [UserBehavior]) which I am assuming is related to the error it throws:

line 415, in get_next_task
    raise Exception("No tasks defined. use the @task decorator or set the tasks property of the User")
Exception: No tasks defined. use the @task decorator or set the tasks property of the User

What version of Locust does this support? Is support for the latest version likely? Thanks, Jack

chrismarch commented 3 years ago

I've created a pull request to add compatibility with the latest locust release (1.5.3): https://github.com/zlorb/locust.replay/pull/14

zlorb commented 3 years ago

Closing the issue, with the above PR merged. Please file a new ticket if seeing any issue.