A proof of concept for website testing software using Playwright and OpenAI's LLM. This tool automates testing of video converter websites and provides detailed reports with AI-powered analysis.
- Automated testing of video converter websites
- AI-powered analysis of test results
- Screenshot capture at each testing step
- Detailed HTML reports with visual feedback
- RESTful API endpoints for test execution and results
- Node.js (v16 or higher)
- npm or yarn
- OpenAI API key
- Clone the repository:
git clone https://github.com/tvalentius/WebTestAgenticAI.git
cd WebTestAgenticAI
- Install dependencies:
npm install
- Create a
.env
file in the root directory and add your OpenAI API key:
OPENAI_API_KEY=your_openai_api_key_here
- Start the server:
node server.js
- Run a test:
curl -X POST http://localhost:3001/api/run-test
Executes a website test and returns both JSON results and generates an HTML report.
Response:
{
"testName": "YouTube URL Upload Test - video-converter.com",
"status": "pass/fail",
"timestamp": "ISO timestamp",
"steps": ["array of test steps"],
"failedSteps": ["array of failed steps"],
"screenshots": ["array of screenshot filenames"],
"description": "AI-generated analysis",
"htmlReport": "/test-report.html"
}
View the latest test report in a beautifully formatted HTML page.
Features:
- Test status and timing information
- Step-by-step results with success/failure indicators
- Screenshot gallery
- AI analysis and recommendations
- Responsive design for all devices
Access individual screenshots captured during the test.
Retrieve the history of all test results.
.
├── server.js # Main server file with API endpoints
├── playwright.config.js # Playwright configuration
├── screenshots/ # Directory for test screenshots
├── package.json # Project dependencies
└── .env # Environment variables
The HTML test report includes:
-
Test Information
- Test name and timestamp
- Website being tested
- Test duration
- Overall status
-
Step-by-Step Results
- Visual indicators for pass/fail steps
- Detailed error messages
- Screenshots at each step
-
AI Analysis
- Comprehensive test analysis
- Failure root cause analysis
- Impact assessment
-
Visual Documentation
- Screenshot gallery
- Step annotations
- Error highlights
-
Recommendations
- Suggested improvements
- Next steps
- Best practices
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.