An integrated quality assurance system that combines API testing automation, test case management, and bug tracking into a single cohesive application with AI-powered features.
- API Test Execution: Create and execute automated API tests with assertions
- Environment Management: Manage different environments with variable substitution
- Test Case Management: Organize test cases into hierarchical suites
- Test Execution History: Track test runs and analyze trends
- Bug Tracking: Create and manage bug reports with full workflow
- Traceability: Link test cases to bugs for complete traceability
- AI Test Case Generation: Generate comprehensive test cases from feature descriptions using Gemini 2.0 Flash
- Mock Data Seeding: Create realistic test data for users, projects, test cases, bugs, and test runs
- Intelligent Test Suggestions: Get AI-powered recommendations for test scenarios
- Command-Line Interface: Execute tests from CI/CD pipelines
- Webhook Support: Trigger tests from GitHub, GitLab, and other platforms
- Automated Scheduling: Schedule recurring test runs with cron expressions
- Multiple Output Formats: Export results in JSON or JUnit XML format
- Real-time Dashboard: View metrics, pass rates, and recent test runs
- Trend Analysis: Visualize test execution trends over time
- Defect Metrics: Track bug distribution by severity and status
- Test Coverage Reports: Monitor test coverage across suites
- Node.js 20 LTS or higher
- Docker and Docker Compose
- npm or yarn
-
Clone the repository
-
Start database services:
npm run docker:up
-
Install dependencies:
npm install
-
Start development servers:
npm run dev
-
Access the application:
- Frontend: http://localhost:3000
- Backend API: http://localhost:3001
- API Health Check: http://localhost:3001/api/health
-
Register a new account at http://localhost:3000/register
unified-qa-platform/
backend/ # Node.js/Express API server
src/
index.ts
routes/
services/
middleware/
utils/
prisma/
package.json
frontend/ # React application
src/
App.tsx
components/
pages/
hooks/
utils/
package.json
docker-compose.yml
package.json
npm run dev- Start both frontend and backend in development modenpm run dev:backend- Start only backendnpm run dev:frontend- Start only frontendnpm run build- Build both applicationsnpm run docker:up- Start Docker servicesnpm run docker:down- Stop Docker services
Backend:
- Node.js + Express + TypeScript
- Mongoose + MongoDB
- Bull + Redis for job queue
- JWT authentication
- Axios for HTTP requests
- Zod for validation
- Google Generative AI (Gemini 2.0 Flash)
- Node-cron for scheduling
- Winston for logging
Frontend:
- React 18 + TypeScript
- React Router
- TanStack Query
- Zustand for state management
- Tailwind CSS
- React Hot Toast
CLI:
- Commander.js
- Chalk for colored output
- Ora for spinners
All API endpoints (except /api/auth/* and /api/webhooks/*) require JWT authentication via Bearer token.
Test Collections:
GET /api/test-collections- List all collectionsPOST /api/test-collections- Create new collectionPOST /api/test-collections/:id/execute- Execute collection
Test Cases:
GET /api/test-cases- List test cases with filteringPOST /api/test-cases- Create test caseGET /api/test-cases/:id/history- View execution history
Bugs:
GET /api/bugs- List bugs with filteringPOST /api/bugs- Create bug reportPUT /api/bugs/:id- Update bug status
AI Features:
POST /api/ai/generate-test-cases- Generate test cases with AIPOST /api/ai/seed-data- Generate mock data with AI
Schedules:
GET /api/schedules- List scheduled test runsPOST /api/schedules- Create new schedulePOST /api/schedules/:id/trigger- Manually trigger schedule
Webhooks:
POST /api/webhooks/trigger- Generic webhook triggerPOST /api/webhooks/github- GitHub webhook handlerPOST /api/webhooks/gitlab- GitLab webhook handler
Install the CLI globally:
cd cli
npm install
npm run build
npm linkRun test collection:
qa-cli run <collectionId> --env production --format junit --output results.xmlRun test suite:
qa-cli test <suiteId> --env staging --output results.jsonname: QA Tests
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run QA Tests
run: qa-cli run ${{ secrets.COLLECTION_ID }} --format junit --output results.xml
env:
QA_API_URL: ${{ secrets.QA_API_URL }}
QA_API_TOKEN: ${{ secrets.QA_API_TOKEN }}
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
files: results.xmltest:
stage: test
script:
- qa-cli test $SUITE_ID --format junit --output test-results.xml
artifacts:
reports:
junit: test-results.xmlGitHub:
- Go to repository Settings → Webhooks
- Add webhook URL:
https://your-domain.com/api/webhooks/github - Select events: Push, Pull Request
- Add secret (optional but recommended)
GitLab:
- Go to project Settings → Webhooks
- Add webhook URL:
https://your-domain.com/api/webhooks/gitlab - Select triggers: Push events, Merge request events
- Add secret token
Backend (.env):
MONGODB_URI=mongodb+srv://...
REDIS_URL=redis://localhost:6379
JWT_SECRET=your-secret-key
JWT_EXPIRES_IN=24h
PORT=3001
NODE_ENV=development
GEMINI_API_KEY=your-gemini-api-keyFrontend (.env):
VITE_API_URL=http://localhost:3001CLI (.env):
QA_API_URL=http://localhost:3001/api
QA_API_TOKEN=your-api-token-
Build production images:
docker-compose -f docker-compose.prod.yml build
-
Start services:
docker-compose -f docker-compose.prod.yml up -d
-
Check logs:
docker-compose -f docker-compose.prod.yml logs -f
Backend:
cd backend
npm install
npm run build
NODE_ENV=production node dist/index.jsFrontend:
cd frontend
npm install
npm run build
# Serve the dist/ folder with nginx or any static file serverMongoDB:
mongodump --uri="mongodb://..." --out=./backupRestore:
mongorestore --uri="mongodb://..." ./backup- Change default JWT_SECRET in production
- Use HTTPS for all API communications
- Enable rate limiting (already configured)
- Regularly update dependencies
- Use environment-specific API keys
- Implement proper CORS policies
- Store sensitive data in environment variables
- Use secure MongoDB connection strings
- Enable Redis authentication in production
- Redis caching is enabled for dashboard metrics (5-minute TTL)
- Database indexes are configured for frequently queried fields
- Pagination is implemented for large datasets (50 items per page)
- Request rate limiting prevents abuse
- Bull queue handles async test execution with 50 concurrent jobs
MongoDB Connection Issues:
- Verify MONGODB_URI is correct
- Check network connectivity
- Ensure MongoDB Atlas IP whitelist includes your IP
Redis Connection Issues:
- Verify Redis is running:
docker ps - Check REDIS_URL configuration
- Restart Redis:
docker-compose restart redis
Test Execution Failures:
- Check network connectivity to target APIs
- Verify environment variables are correctly substituted
- Review test execution logs in the UI
- Check Bull queue status
AI Features Not Working:
- Verify GEMINI_API_KEY is set correctly
- Check API quota limits
- Review error logs for specific API errors