We've just released automatic anomaly detection for all LoadForge tests! Now, LoadForge automatically analyzes the last 5 runs of any test to establish a performance baseline. It then monitors for significant deviations in key metrics.
A fast-loading site keeps users engaged, drives higher conversion rates, and even improves search engine rankings. This guide will walk you through a practical approach to load testing a WordPress site hosted on Rapyd Cloud using LoadForge.
TLDR: LoadForge has introduced enhanced file management features, enabling users to upload, create, and manage data files easily for more realistic and effective load testing. The system supports CSV, JSON, and TXT files, and integrates seamlessly with scripts to facilitate data-driven testing.
•2 min read
We're excited to announce a powerful new addition to LoadForge: enhanced file management capabilities for your load tests. This feature allows you to upload, create, and manage data files that can be seamlessly integrated into your load testing scripts.
Why We Added File Management
Load testing often requires realistic data to simulate user behavior accurately. Whether you're testing authentication systems with thousands of user credentials, submitting forms with varied input data, or configuring complex API test scenarios, having access to structured data files can significantly improve the quality and realism of your tests.
Based on your feedback, we've implemented a robust file management system that makes it easy to incorporate data-driven testing into your LoadForge projects.
How It Works
Files uploaded through our intuitive interface are automatically distributed to all your load generators and stored in a dedicated files/ directory. Your Locust scripts can then access these files using standard file operations, making it simple to:
Load user credentials from JSON files
Read test data from CSV files
Configure test parameters using configuration files
Support for Multiple Formats: Upload CSV, JSON, or TXT files (up to 5MB)
Intelligent Editing: Our system recognizes file types and provides appropriate editing capabilities (CSV editor for .csv files, etc.)
Seamless Integration: Files are automatically available on all load generators without any additional configuration
Persistent Storage: Your files remain available for future test runs
Practical Examples
Here's a quick example of how you might use a JSON file containing user credentials in your Locust test:
def on_start(self):
# Load user credentials from the uploaded JSON file
with open('files/userlist.json', 'r') as f:
self.users = json.load(f)
<pre><code># Select a random user for this test
user_data = random.choice(self.users)
self.username = user_data['username']
self.password = user_data['password']