thechaiexperiment commited on
Commit
8542521
·
verified ·
1 Parent(s): 20b2f71

Upload 4 files

Browse files
Files changed (4) hide show
  1. README.md +97 -0
  2. app.py +7 -0
  3. docker-compose.yml +48 -0
  4. requirements.txt +72 -0
README.md ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # AI-Powered Test Automation System
2
+
3
+ A comprehensive test automation system that leverages AI to generate, manage, and execute test cases from various document sources.
4
+
5
+ ## Features
6
+
7
+ - Document Processing
8
+ - PDF, Word, and scanned document support
9
+ - OCR capabilities using Tesseract
10
+ - Document segmentation for large files
11
+ - Multi-stage processing pipeline
12
+
13
+ - AI Integration
14
+ - Support for multiple LLM providers (OpenAI, Local LLMs, OpenRouter)
15
+ - Model benchmarking capabilities
16
+ - Requirement extraction and analysis
17
+ - Test case generation and validation
18
+
19
+ - Test Management
20
+ - Export to TestRail, JIRA, qTest
21
+ - Test case validation metrics
22
+ - Risk-based prioritization
23
+ - Requirement traceability matrix
24
+ - Coverage analysis
25
+
26
+ - Automation
27
+ - Test script generation (Python, Selenium, Playwright)
28
+ - CI/CD pipeline integration
29
+ - Docker containerization
30
+ - RabbitMQ for async processing
31
+
32
+ ## Project Structure
33
+
34
+ ```
35
+ testauto/
36
+ ├── api/ # API endpoints
37
+ │ ├── routes/ # API route definitions
38
+ │ └── middleware/ # API middleware
39
+ ├── core/ # Core business logic
40
+ │ ├── document/ # Document processing
41
+ │ ├── ai/ # AI integration
42
+ │ ├── test/ # Test management
43
+ │ └── automation/ # Test automation
44
+ ├── services/ # Microservices
45
+ │ ├── document_service/
46
+ │ ├── ai_service/
47
+ │ ├── test_service/
48
+ │ └── automation_service/
49
+ ├── utils/ # Utility functions
50
+ ├── tests/ # Unit and integration tests
51
+ ├── config/ # Configuration files
52
+ ├── docker/ # Docker configuration
53
+ └── frontend/ # Web interface
54
+ ```
55
+
56
+ ## Setup Instructions
57
+
58
+ 1. Install dependencies:
59
+ ```bash
60
+ pip install -r requirements.txt
61
+ ```
62
+
63
+ 2. Set up environment variables:
64
+ ```bash
65
+ cp .env.example .env
66
+ # Edit .env with your configuration
67
+ ```
68
+
69
+ 3. Start the services:
70
+ ```bash
71
+ docker-compose up -d
72
+ ```
73
+
74
+ 4. Run the application:
75
+ ```bash
76
+ python run.py
77
+ ```
78
+
79
+ ## API Documentation
80
+
81
+ The API documentation is available at `/docs` when running the application.
82
+
83
+ ## Required Documents for Features
84
+
85
+ - Test Plan Generation: Project requirements document, scope document
86
+ - Test Case Generation: Functional requirements, user stories
87
+ - Risk Assessment: Project risk document, historical defect data
88
+ - Test Data Generation: Data models, sample data
89
+ - Defect Prediction: Historical defect reports, code metrics
90
+
91
+ ## Contributing
92
+
93
+ Please read CONTRIBUTING.md for details on our code of conduct and the process for submitting pull requests.
94
+
95
+ ## License
96
+
97
+ This project is licensed under the MIT License - see the LICENSE file for details.
app.py ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ import os
2
+ from app.main import app
3
+ import uvicorn
4
+
5
+ if __name__ == "__main__":
6
+ port = int(os.getenv("PORT", 8000))
7
+ uvicorn.run(app, host="0.0.0.0", port=port)
docker-compose.yml ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ version: '3.8'
2
+
3
+ services:
4
+ app:
5
+ build:
6
+ context: .
7
+ dockerfile: docker/Dockerfile
8
+ ports:
9
+ - "8000:8000"
10
+ environment:
11
+ - POSTGRES_SERVER=db
12
+ - POSTGRES_USER=postgres
13
+ - POSTGRES_PASSWORD=postgres
14
+ - POSTGRES_DB=testauto
15
+ - RABBITMQ_HOST=rabbitmq
16
+ depends_on:
17
+ - db
18
+ - rabbitmq
19
+ volumes:
20
+ - ./uploads:/app/uploads
21
+ - ./generated_scripts:/app/generated_scripts
22
+ - ./logs:/app/logs
23
+
24
+ db:
25
+ image: postgres:13
26
+ environment:
27
+ - POSTGRES_USER=postgres
28
+ - POSTGRES_PASSWORD=postgres
29
+ - POSTGRES_DB=testauto
30
+ volumes:
31
+ - postgres_data:/var/lib/postgresql/data
32
+ ports:
33
+ - "5432:5432"
34
+
35
+ rabbitmq:
36
+ image: rabbitmq:3-management
37
+ ports:
38
+ - "5672:5672"
39
+ - "15672:15672"
40
+ environment:
41
+ - RABBITMQ_DEFAULT_USER=guest
42
+ - RABBITMQ_DEFAULT_PASS=guest
43
+ volumes:
44
+ - rabbitmq_data:/var/lib/rabbitmq
45
+
46
+ volumes:
47
+ postgres_data:
48
+ rabbitmq_data:
requirements.txt ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Core dependencies
2
+ fastapi==0.68.1
3
+ uvicorn==0.15.0
4
+ python-multipart==0.0.5
5
+ pydantic==1.8.2
6
+ loguru==0.5.3
7
+
8
+ # Database
9
+ sqlalchemy==1.4.23
10
+ psycopg2-binary==2.9.1
11
+ alembic==1.7.1
12
+
13
+ # Message Queue
14
+ pika==1.2.0
15
+
16
+ # Document Processing
17
+ python-docx==0.8.11
18
+ PyPDF2==1.26.0
19
+ pytesseract==0.3.8
20
+ Pillow==8.3.2
21
+
22
+ # AI/ML
23
+ openai==0.27.0
24
+ transformers==4.11.3
25
+ torch==1.9.0
26
+ numpy==1.21.2
27
+ pandas==1.3.3
28
+
29
+ # Testing
30
+ pytest==6.2.5
31
+ pytest-cov==2.12.1
32
+ pytest-asyncio==0.15.1
33
+
34
+ # Test Management Integration
35
+ testrail-api==1.10.1
36
+ jira==3.5.1
37
+
38
+ # Utilities
39
+ python-dotenv==0.19.0
40
+ requests==2.26.0
41
+ aiohttp==3.7.4
42
+
43
+ # AI and ML
44
+ sentence-transformers==2.2.2
45
+
46
+ # Automation
47
+ selenium==4.15.2
48
+ playwright==1.40.0
49
+
50
+ # Message Queue
51
+ aio-pika==9.3.0
52
+
53
+ # Database
54
+ alembic==1.12.1
55
+
56
+ # Utilities
57
+ python-dotenv==1.0.0
58
+ loguru==0.7.2
59
+ numpy==1.26.2
60
+
61
+ # Testing
62
+ pytest-mock==3.12.0
63
+ httpx==0.25.2
64
+
65
+ # Security
66
+ python-jose==3.3.0
67
+ passlib==1.7.4
68
+ bcrypt==4.0.1
69
+
70
+ # Monitoring
71
+ prometheus-client==0.19.0
72
+ sentry-sdk==1.35.0