Debugging Load Tests
Keep your test scripts modular by separating test logic, data, and configuration. This makes debugging easier and allows for better test maintenance.
1. Use the Test Debugger
LoadForge provides a built-in test debugger that runs your test and attempts to send requests through it. This is the easiest way to diagnose common issues. 👉 Head over to the Test Debugger to get started.If your test isn’t running, the debugger will highlight syntax errors, request failures, or misconfigurations in real time.
2. Test Locally
Before running a test in LoadForge, you can validate your Locustfile locally to catch syntax errors.Check for Syntax Errors
To ensure your test script is correctly formatted, save it as a Python file (example.py
) and run:
Run a Local Locust Test
To execute your test locally, first install Locust and its dependencies:If your test runs locally but fails in LoadForge, check for network restrictions, authentication issues, or host validation problems.
3. Additional Debugging Tips
Use ChatGPT for Debugging
LoadForge test scripts follow a Locust-based format, which ChatGPT understands well. If you’re stuck, try:- Copy-pasting your Locustfile into ChatGPT and asking it to check for errors.
- Describing your issue and asking for debugging advice.
- Requesting optimizations to improve script performance.
ChatGPT can help debug syntax errors, request failures, and suggest improvements to your load test.
Enable Logging in Locust
If you’re unsure what’s failing, enable verbose logging by modifying your script:Check LoadForge Errors & Logs
If your test fails in LoadForge, check:- Run Results Page for error messages.
- Response time metrics to see if timeouts are occurring.
- Error logs for HTTP status codes (e.g.,
401 Unauthorized
,500 Internal Server Error
).
4. Request Support
If you still need help, contact LoadForge support:- Email: hello@loadforge.com
- Live Chat: Available directly in the LoadForge dashboard.
If you’re unsure what’s wrong, share your test script and error logs with LoadForge support for faster troubleshooting.