
rvrajkumar/juice-shop-automation-mcp
Developer toolsЭта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал
AI-powered MCP integration for a Python-based Selenium and Pytest automation framework, enabling test execution, result retrieval, screenshot capture, and failure evidence collection for OWASP Juice...
Обзор
A Python-based UI and API automation project for OWASP Juice Shop, extended with a Model Context Protocol (MCP) server so an MCP client can discover and invoke QA automation tools. The project combines . It also experiments with a local Ollama model (qwen2.5:1.5b) as part of the client workflow. The full Pytest suite was verified with 3 passing tests. The MCP tools for running tests, retrieving results, project information, screenshots, and failure evidence have been exercised. The current client uses keyword-based request routing, so it should not be described as a fully autonomous AI agent. - Selenium UI automation for login and payment flows. - REST API automation with Python Requests. - Pytest fixtures for shared browser setup and login. - JSON files for test data. - Docker-based local Juice Shop environment. - MCP tools for test execution, result retrieval, screenshots, and failure evidence. - Structured test summary alongside raw Pytest output.
README
Показан фрагмент оригинального README. Открыть оригинал.
OWASP Juice Shop Automation with MCP
A Python-based UI and API automation project for OWASP Juice Shop, extended with a Model Context Protocol (MCP) server so an MCP client can discover and invoke QA automation tools.
The project combines Pytest, Selenium WebDriver, Requests, Docker, and MCP. It also experiments with a local Ollama model (qwen2.5:1.5b) as part of the client workflow.
Project status: The full Pytest suite was verified with 3 passing tests. The MCP tools for running tests, retrieving results, project information, screenshots, and failure evidence have been exercised. The current client uses keyword-based request routing, so it should not be described as a fully autonomous AI agent.
Features
- Selenium UI automation for login and payment flows.
- REST API automation with Python Requests.
- Pytest fixtures for shared browser setup and login.
- JSON files for test data.
- Docker-based local Juice Shop environment.
- MCP tools for test execution, result retrieval, screenshots, and failure evidence.
- Structured test summary alongside raw Pytest output.
- Automatic screenshot and traceback text report when a Selenium UI test fails.
- Local Ollama/Qwen experimentation.
Technology Stack
| Technology | Purpose |
|---|---|
| Python | Automation and MCP implementation |
| Pytest | Test discovery and execution |
| Selenium WebDriver | Browser UI automation |
| Requests | REST API automation |
| Docker | Runs Juice Shop locally |
| MCP Python SDK | Exposes QA capabilities as tools |
| Ollama + Qwen 2.5 1.5B | Local model experimentation |
| JSON | Test data |
| Git and GitHub | Version control and project hosting |
Project Structure
juice-shop-automation-mcp/
├── mcp/
│ └── server.py
├── screenshots/
│ ├── failures/
│ │ ├── _.png
│ │ └── _.txt
│ ├── all-tests.png
│ ├── api-test.png
│ ├── docker-running.png
│ ├── ui-test.png
│ ├── juice-shop-payment.png
│ └── mcp-received-screenshot.png
├── test_data/
│ ├── card-data.json
│ └── new-user.json
├── tests/
│ ├── test_cards_api.py
│ ├── test_login.py
│ └── test_payment.py
├── ai_client.py
├── conftest.py
├── requirements.txt
├── .gitignore
└── README.md
The exact screenshot files in a local checkout may differ depending on which tests have been run.
Architecture
User request
|
v
ai_client.py
|
| maps request to a tool
v
MCP client (ClientSession)
|
| session.call_tool(...)
v
mcp/server.py
|
+--> get_project_info
|
+--> run_tests ------> subprocess ------> Pytest
| |
| +--> Selenium UI tests
| +--> Requests API tests
|
+--> get_test_results
|
+--> get_screenshot
|
+--> get_failure_evidence
|
Установка
docker run -d --name juice-shop -p 3000:3000 bkimminich/juice-shop