Skip to content

Locust compatibility/example #362

@fescobar

Description

@fescobar

Hi @leszekhanusz
First I would like to thank you for this great project.
I'm planning to create a client with gql where I'm going to create multiple methods (mutations/queries) to facilitate the integration with my graphql server.

I would like to reuse theses methods from the client to test the performance of the application. One of the most used tools for that is Locust (https://docs.locust.io/en/stable/quickstart.html).
I'm trying to reuse the methods from the GQL client created but Locust has a different type of Client to work properly.

I wanted to know if there is any way to achieve that? and if that is possible if there is an example

This is the basic implementation from Locust.

from locust import HttpUser, task

class HelloWorldUser(HttpUser):
    @task
    def hello_world(self):
        self.client.get("/hello")
        self.client.get("/world")

Thank you in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions