FastAPI backend that:
- Fetches
suites.jsonorbehaviors.jsonfrom an Allure report URL - Recursively extracts all failed and broken MFTF tests
- Parses each test's name to extract the MFTF ticket ID (e.g.
MC-4982,ACP2E-3540) - Searches Jira for open tickets that mention the test name in their title or description
allure-jira-analyzer/
├── app/
│ ├── __init__.py
│ ├── config.py # Settings loaded from .env
│ ├── models.py # Pydantic request/response models
│ ├── allure.py # Fetch & parse Allure JSON
│ ├── jira.py # Jira REST API v2 search + ticket fetch
│ └── main.py # FastAPI routes
├── requirements.txt
├── .env.example
└── README.md
pip install -r requirements.txt
cp .env.example .env
# Edit .env with your Jira detailsuv venv
source .venv/bin/activate # or `.venv\Scripts\activate` on Windows
uv pip install -r requirements.txt
cp .env.example .env
# Edit .env with your Jira details.env
JIRA_BASE_URL=https://your-org.atlassian.net
JIRA_TOKEN=your_personal_access_token
JIRA_PROJECT_KEYS=MC,AC,ACP2E,MAGETWO,LYNX,ACPT,ACQE,GIT,CABPI
Jira token: Generate at
https://your-org.atlassian.net/secure/ViewProfile.jspa→ Personal Access Tokens
uvicorn app.main:app --reload --port 8000uv run uvicorn app.main:app --reload --port 8000A standalone Streamlit frontend is also available — it reuses the same analysis and Jira modules without depending on the FastAPI server.
streamlit run streamlit_app.pyOr with uv:
uv run streamlit run streamlit_app.pyOpens at http://localhost:8501 with tabs for all endpoints.
An MCP server exposes the same analysis flow as tools Claude can call when you paste an Allure URL.
uv run python mcp_server.pyTools:
| Tool | Purpose |
|---|---|
analyze_allure_report |
Full report: fetch failures, load test-case JSON, search Jira |
generate_build_report |
Multi-run build report (CE/EE/B2B grouped, Run-1/Run-2) |
search_jira |
Search Jira for a single test name or ticket ID |
fetch_jira_ticket |
Fetch one Jira ticket by key |
Predefined prompts (select from Claude's MCP prompt menu after restart):
| Prompt | Inputs | What it does |
|---|---|---|
analyze_allure_report |
allure_url |
Instructs Claude to call the analyze tool for one URL |
generate_build_report |
allure_urls (one URL per line) |
Instructs Claude to call the build report tool and return output verbatim |
In Claude Desktop: click the + button → Add from MCP → choose allure-analyzer → pick a prompt → fill in the URL(s).
In Cursor: use MCP prompts from the chat prompt picker (if supported) or paste the same text manually.
Claude Desktop — add to ~/Library/Application Support/Claude/claude_desktop_config.json (see mcp.json.example):
{
"mcpServers": {
"allure-analyzer": {
"command": "/absolute/path/to/allure_analyzer/.venv/bin/python",
"args": ["/absolute/path/to/allure_analyzer/mcp_server.py"],
"env": {
"JIRA_BASE_URL": "https://jira.corp.adobe.com",
"JIRA_PROJECT_KEYS": "MC,AC,ACP2E,MAGETWO,LYNX"
}
}
}
}Cursor — merge mcp.json.example into your project's .cursor/mcp.json.
Jira token: set
JIRA_TOKENin.envormcp.jsonenv, or pass at runtime in chat.
Example — single report (manual prompt):
Analyze this Allure report and summarize failures with Jira tickets:
https://.../allure-report-ee/index.html
Example — build report (manual prompt):
Use generate_build_report and return the output verbatim:
CE: https://.../allure-report-ce/index.html
CE: https://.../allure-report-ce/index.html
EE: https://.../allure-report-ee/index.html
EE: https://.../allure-report-ee/index.html
B2B: https://.../allure-report-b2b/index.html
B2B: https://.../allure-report-b2b/index.html
Swagger UI available at: http://localhost:8000/docs
Fetches the Allure JSON from a URL, extracts failures, and searches Jira.
curl -X POST http://localhost:8000/analyze \
-H "Content-Type: application/json" \
-d '{
"allure_url": "https://.../allure-report-ee/data/suites.json",
"allure_auth_token": "optional-bearer-token-if-report-is-behind-auth",
"jira_base_url": "https://your-org.atlassian.net",
"jira_token": "your-token"
}'
jira_base_urlandjira_tokenare optional if already set in.env
Response:
{
"summary": {
"total_tests_scanned": 1248,
"total_failed": 1,
"total_broken": 1,
"total_with_jira_tickets": 2,
"allure_url": "https://..."
},
"results": [
{
"test": {
"name": "MC-4982: Checkout with multiple addresses",
"status": "failed",
"uid": "abc123",
"duration_seconds": 32.0,
"flaky": false,
"mftf_test_name": "MC-4982"
},
"jira_tickets": [
{
"key": "MC-4982",
"summary": "Checkout fails with multiple addresses after 2.4.7 upgrade",
"status": "In Progress",
"url": "https://your-org.atlassian.net/browse/MC-4982",
"description": "The MFTF test MC-4982 is failing because..."
}
],
"jira_search_performed": true,
"jira_error": null
}
]
}Same as /analyze but accepts the raw Allure JSON in the request body instead of a URL.
Useful when the report server blocks server-side fetches (403/CORS).
# Download the JSON in your browser, then POST it
curl -X POST http://localhost:8000/parse \
-H "Content-Type: application/json" \
-d '{
"allure_data": { ...contents of suites.json... },
"jira_base_url": "https://your-org.atlassian.net",
"jira_token": "your-token"
}'Search Jira for open tickets matching a single MFTF test name.
curl "http://localhost:8000/jira/search?test_name=MC-4982"Fetch a specific Jira ticket by key (mirrors the original JS sample).
curl "http://localhost:8000/jira/ticket/MC-4982"For each failed/broken test, the app:
-
Extracts the MFTF test name from the Allure test title:
"MC-4982: Checkout test"→ searches forMC-4982"ACP2E-3540: Admin nav test"→ searches forACP2E-3540"[NO TESTCASEID]: Some test name"→ searches forSome test name
-
Builds a JQL query:
(summary ~ "MC-4982" OR description ~ "MC-4982") AND project in ("MC", "AC", "ACP2E", ...) AND statusCategory != Done ORDER BY created DESC -
Returns up to 5 matching open tickets per failed test.
Add a step after your MFTF run to call this API:
# In your Jenkins pipeline (Groovy)
sh """
curl -s -X POST ${ANALYZER_URL}/analyze \\
-H 'Content-Type: application/json' \\
-d '{
"allure_url": "${ALLURE_REPORT_URL}/data/suites.json",
"jira_token": "${JIRA_TOKEN}"
}' > allure_failures.json
cat allure_failures.json
"""