Welcome to the Load-Stress-Test-Automation repository! This project contains automated scripts for load and stress testing to assess and optimize application performance. The repository provides tools and configurations for simulating various load conditions and stress scenarios to ensure system robustness and reliability.
- Load Testing: Simulate normal and peak load conditions using JMeter or Python
pytestto evaluate application performance under typical usage. - Stress Testing: Assess system behavior under extreme conditions using JMeter or Python
pytestto identify potential breaking points and performance degradation. - Comprehensive Reporting: Generate detailed reports with JMeter and
pytestto analyze performance metrics and identify bottlenecks. - Customizable Configurations: Easily adjust testing parameters and scenarios to fit different applications and environments.
- Integration with Pytest: Utilize
pytestfor running additional custom tests and generating reports.
- JMeter: For creating and running load and stress tests.
- Python: For custom scripts and integrations.
- Page Object Model (POM): Used for structuring test automation in a maintainable and scalable way.
- pytest: Framework for running Python tests and generating reports.
- Requests Library: For making HTTP requests in Python tests.
git clone https://github.com/Only1JohnN/Load-Stress-Test-Automation.git cd Load-Stress-Test-AutomationTo avoid conflicts between dependencies, it's recommended to use a virtual environment. You can create one using venv:
python -m venv venvActivate the virtual environment:
-
On Windows:
venv\Scripts\activate
-
On macOS/Linux:
source venv/bin/activate
Install the required Python packages listed in requirements.txt:
pip install -r requirements.txtFollow the instructions on the Apache JMeter website to download and install JMeter.
-
JMeter Tests: Modify the JMeter configuration files and test scripts according to your application’s requirements. Update parameters such as URLs, endpoints, and test data as needed.
-
Pytest Tests: Write or configure your Python test scripts for load and stress testing. Update URLs and parameters in
load_test.pyandstress_test.pyas needed.
Execute load testing scripts using JMeter:
jmeter -n -t jmeter/load_test_script.jmx -l results/load_test_results.jtlExecute stress testing scripts similarly:
jmeter -n -t jmeter/stress_test_script.jmx -l results/stress_test_results.jtlExecute Python load tests using pytest:
pytest python/load_test.pyExecute Python stress tests using pytest:
pytest python/stress_test.py- JMeter Reports: Analyze the
.jtlresults files or use JMeter’s reporting tools to generate detailed performance reports. - Pytest Reports: Review the output from
pytestto assess the performance of your application under load and stress conditions.
-
jmeter/: Contains JMeter scripts and configurations for load and stress testing scenarios.load_test_script.jmx: JMeter script for load testing.stress_test_script.jmx: JMeter script for stress testing.
-
python/: Contains Python scripts for load and stress testing.load_test.py: Python script for custom load testing usingpytest.stress_test.py: Python script for custom stress testing usingpytest.
-
results/: Directory where JMeter test results are saved.load_test_results.jtl: Results file for load tests.stress_test_results.jtl: Results file for stress tests.
-
requirements.txt: Lists Python dependencies required for custom scripts. -
page_objects.py: Defines Page Object Model classes used in tests (if applicable).
This project is licensed under the MIT License. However, you must contact me before using or redistributing this software.
Contributions are welcome! If you’d like to contribute, please fork the repository and submit a pull request (PR). Ensure that your contributions adhere to the project's coding standards and include appropriate tests. Open issues or PRs to discuss and review any changes.
For any questions, feedback, or collaboration inquiries, please reach out to Adeniyi John.
Thank you for using Load-Stress-Test-Automation. We hope this tool helps you achieve optimal performance for your applications!