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

Number of users reduce after running for 1min #1031

Closed
GuoTengda1993 opened this issue Jun 21, 2019 · 1 comment
Closed

Number of users reduce after running for 1min #1031

GuoTengda1993 opened this issue Jun 21, 2019 · 1 comment

Comments

@GuoTengda1993
Copy link

Description of issue

I start a new locust test, set user number 10, swarm 5; after 1min, the user number reduce to 0, but RPS is stable.

Expected behavior

stable test

Actual behavior

image

Environment settings

  • OS: Windows
  • Python version: 3.7
  • Locust version: 0.11.1

Steps to reproduce (for bug reports)

Any websit to test, set user 10, swarm 5

class PressureTest(TaskSet):

    def setup(self):
        global headers
        headers = [{"Content-Type": "application/json"}]

    @task(100)
    def test1(self):
        query = {}
        with self.client.get('https://www.baidu.com', headers=headers, params=query, verify=False, catch_response=True) as resp:
            if resp.status_code == 200:
                if b'b' not in resp.content:
                    resp.failure('Error: wrong response --  ' + resp.content.decode('utf-8'))
                else:
                    resp.success()
            else:
                resp.failure('Error: wrong status code -- ' + str(resp.status_code))



class ApiTest(HttpLocust):
    host = ''
    task_set = PressureTest
    min_wait = 300
    max_wait = 500
    stop_timeout = 60

@GuoTengda1993
Copy link
Author

Misunderstanding "stop_timeout", it's not the time to assert failure when response time exceed it.

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

1 participant