An AI-powered tool for analyzing and comparing Allure test reports. This tool fetches Allure report data (CSV and JSON) from provided URLs, analyzes the test results, and generates detailed reports with insights using OpenAI's GPT models.
- Single Report Analysis: Analyze a single Allure test execution report
- Report Comparison: Compare two Allure reports to identify changes and regressions
- AI-Powered Insights: Get natural language summaries and recommendations using OpenAI (when API key is provided)
- Interactive HTML Reports: Generate beautiful, interactive HTML reports
- REST API: Simple HTTP endpoints for integration with CI/CD pipelines
- Node.js 16+ and npm
- (Optional) OpenAI API key for AI insights
-
Clone the repository:
git clone <repository-url> cd smart-report
-
Install dependencies:
npm install
-
Create a
.envfile in the project root and configure the environment variables:# Server Configuration PORT=3000 # OpenAI Configuration (optional, for AI insights) OPENAI_API_KEY=your_openai_api_key_here # Report URLs (optional, can be provided in API requests) REPORT1_BASE_URL=https://example.com/report1 REPORT2_BASE_URL=https://example.com/report2 # Output Configuration REPORT_OUTPUT_DIR=./reports
npm startThis will start the server on http://localhost:3000 by default.
POST /api/analyzeRequest Body:
{
"baseUrl": "https://example.com/allure-report"
}If baseUrl is not provided, it will use REPORT1_BASE_URL from environment variables.
Response:
success: Boolean indicating if the analysis was successfulreportUrl: URL to view the generated HTML reportmetrics: Various test metrics and statisticsanalysis: AI-generated insights (if OpenAI API key is provided)
POST /api/compareRequest Body:
{
"report1Url": "https://example.com/allure-report1",
"report2Url": "https://example.com/allure-report2",
"insights": ""
}If report1Url and report2Url are not provided, it will use REPORT1_BASE_URL and REPORT2_BASE_URL from environment variables.
Response:
success: Boolean indicating if the comparison was successfulreportUrl: URL to view the generated HTML comparison reportimprovements: List of improvements foundregressions: List of regressions foundrecommendations: AI-generated recommendations (if OpenAI API key is provided)metrics: Comparison metrics between the two reports
| Variable | Description | Default |
|---|---|---|
PORT |
Port for the application to run on | 3000 |
OPENAI_API_KEY |
Your OpenAI API key (optional) | - |
REPORT1_BASE_URL |
Default first report URL | - |
REPORT2_BASE_URL |
Default second report URL | - |
REPORT_OUTPUT_DIR |
Directory to store generated reports | ./reports |
-
Install dependencies:
npm install
-
Start the development server:
npm run dev
-
Run tests:
npm test
This project includes an MCP (Multi-Command Protocol) server for AI-powered analysis and comparison of Allure reports via CLI or compatible clients.
- Node.js 16+
- (Recommended) An OpenAI API key for AI insights
npm installYou can run the MCP server using tsx:
npx tsx src/server.tsThe server will start and listen for MCP. You can connect to it using compatible MCP clients or tools.
- analyze_reports: Analyze a single Allure report with AI-powered insights. Prompts for a report URL and analysis type (overview, failures, performance, trends, or custom).
- compare_reports: Compare two Allure reports and get a detailed AI-powered comparison. Prompts for two report URLs and comparison type (overview, detailed, trends, or custom).
- export_comparison_report: Generate and export comparison report as HTML by making API call to our smart report tool
- When prompted, provide a report URL in the format:
http://report.url.com/RN_WIDGETS_Latest/android/447/awesome/index.html - The server will automatically construct the required CSV and JSON URLs for analysis.
-
Set your OpenAI API key as an environment variable for best results:
export OPENAI_API_KEY=your_openai_api_key_here
{
"mcpServers": {
"smart-report": {
"command": "npx",
"args": ["tsx", "/Users/izhanali_700071/Desktop/smart-report/src/server.ts"]
}
}
}