I'm new to Locust and need to write my first test. How do I define user behavior, and what's the basic structure of a `locustfile.py`? Also, I want to simulate users making HTTP requests; how do I define those requests within my test script?
Navigate to 'docs.locust.io'. Click on the 'Writing a locustfile' link (ID 103). Identify the basic structure of a `locustfile.py` and how user behavior is defined (e.g., using the `User` class and `tasks`). Locate examples or explanations on how to define HTTP requests within the test script, specifically using the `HttpUser` class or similar constructs. Summarize the key components for defining user behavior and making HTTP requests.
The agent successfully navigates to the 'Writing a locustfile' page. The agent identifies that user behavior is defined within a `User` class (or `HttpUser` for HTTP testing). The agent identifies that tasks (actions users perform) are defined using the `@task` decorator or within a `TaskSet`. The agent demonstrates understanding of how to make HTTP requests, likely by mentioning the `HttpUser` class and its client attribute (e.g., `self.client.get('/')`).