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

Locust test results #639

Closed
liuchang6 opened this issue Aug 1, 2017 · 2 comments
Closed

Locust test results #639

liuchang6 opened this issue Aug 1, 2017 · 2 comments

Comments

@liuchang6
Copy link

liuchang6 commented Aug 1, 2017

Hello, I tested the POST interface with Locust. As a result, is there something wrong with me?
0q7vbllw 3 49roc wqlerm
ytk 2z2 xq9 h_4so 5ygh
e3 8z xe71 _6 `jxb59sn5

from locust import HttpLocust,TaskSet,task,Locust


class WebsiteTasks(TaskSet):
    @task()
    def go(self):
        header = {'Content-Type': 'application/json',
                   'Authorization': 'eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJCTUtQIiwidiI6MSwasdiMTM2IiwiaWF0IjoxNTAxNDadJjbGFpbXMiOnsicm9sZSadaXZlciIsInBob25lIjoiMTU4Mjc2MjgxMzkiLCJ0eXBlIjoiYW5kcm9pZCIsInZlcnNpb24iOiI0LjAuMCJ9LCJhZG1pbiI6ZmFsc2UsImV4cCI6MTUwMjc3NzI5NH0.k-Con5IkURvaus-HXkxVY5w6ihaHzMNmlLb77IrQyNE'
                   }

        self.client.post("/wyc/v400/zebra/walker/setPos",header, {
                    "speed": 0.0,
                    "orderId": "421",
                    "walkerPhone": "15827631231",
                    "latitude": "30.478699",
                    "deviceKey": "3a4fe19f001fdf30",
                    "longtitude": "114.427418",
                    "drvId": 58,
                    "direction": 0
                })

class WebsiteUser(HttpLocust):
    task_set = WebsiteTasks
    host = 'https://xx.xx.xx'
    min_wait = 1000
    max_wait = 2000
@aldenpeterson-wf
Copy link
Contributor

I don't understand your question, what are you asking?

@heyman
Copy link
Member

heyman commented Sep 19, 2017

If you're not getting the performance you're expecting (I'm guessing here) I must refer you to this note from the documentation:

image

You can't use Locust on Windows to perform any real test with many users. You could maybe get a decent performance if you run it through Docker on Windows (though I have not tested this).

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

4 participants