RJ

rvrajkumar/juice-shop-automation-mcp

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

0 stars 0 forks 品質 55 トレンド 14

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
                    |
GitHub で README 全文を見る

インストール

docker run -d --name juice-shop -p 3000:3000 bkimminich/juice-shop
MCP 初心者?mcpskill.org のガイドから始めましょう →