Skip to content

shreyash2509/Intelligent-API-Testing-Framework

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ§ͺ Intelligent API Testing Framework

A robust and extensible Python-based API testing framework that automates functional testing, load testing, and penetration testing. This framework enables fast feedback cycles with dynamic payload mutation and insightful HTML+JSON reporting including key performance metrics like P90, P95, and P99.


πŸš€ Features

  • πŸ–οΈ Supports GET and POST API testing
  • πŸ”’ Built-in penetration testing (e.g., SQL Injection patterns)
  • πŸ“ˆ Load testing with multithreaded request generation
  • ⚑ Performance metrics: Average, P90, P95, P99 response times
  • πŸ“„ Auto-generated reports in JSON and HTML (with collapsible sections)
  • πŸ€– Dynamic payload mutation for realistic fuzz testing
  • πŸ”§ Easily integrable into CI/CD pipelines

πŸ’ͺ Setup Instructions

  1. Clone this repository:
git clone [https://github.com/your-username/api-testing-framework.git](https://github.com/shreyash2509/Intelligent-API-Testing-Framework.git)
cd Intelligent-API-Testing-Framework.git
  1. (Optional but recommended) Create a virtual environment:
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt

Note: If requirements.txt is not present, install manually:

pip install requests

βš™οΈ Usage

Run the app:

python app.py

You will be prompted to enter:

  • Base URL (e.g., https://yourapi.com)
  • Endpoint (e.g., /v1/test)
  • Method (GET or POST)
  • (Optional) Authorization token

After testing, the framework will generate:

  • JSON report: api_test_report_YYYY-MM-DD_HH-MM-SS.json
  • HTML report: api_test_report_YYYY-MM-DD_HH-MM-SS.html

Open the HTML file in a browser for an interactive overview.


πŸ“ˆ Example Output

HTML Report Sections:

  • Initial Request Summary
  • Load Test Results (collapsible)
  • Penetration Test Results (collapsible)
  • Payload Variants (collapsible)

πŸ“ Folder Structure

β”œβ”€β”€ app.py                  # Entry point
└── utils/
    β”œβ”€β”€ request.py          # API request logic
    └── payload_generator.py # Dynamic payload mutation
    └── report_generator.py     # HTML/JSON report generation
    └── penetration_tester.py   # Pen test logic
    └── load_tester.py          # Load testing logic


🀝 Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you'd like to change.

Please make sure to update tests as appropriate.


πŸ“„ License

MIT License

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages