@adriankulik/create-fullstack-app 1.1.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -1
- package/package.json +1 -1
- package/templates/base/.agents/skills/accessibility-general/SKILL.md +231 -0
- package/templates/base/.agents/skills/senior-frontend/SKILL.md +209 -0
- package/templates/base/.agents/skills/senior-frontend/references/frontend_best_practices.md +103 -0
- package/templates/base/.agents/skills/senior-frontend/references/nextjs_optimization_guide.md +103 -0
- package/templates/base/.agents/skills/senior-frontend/references/react_patterns.md +103 -0
- package/templates/base/.agents/skills/senior-frontend/scripts/bundle_analyzer.py +114 -0
- package/templates/base/.agents/skills/senior-frontend/scripts/component_generator.py +114 -0
- package/templates/base/.agents/skills/senior-frontend/scripts/frontend_scaffolder.py +114 -0
- package/templates/base/.agents/skills/senior-fullstack/SKILL.md +209 -0
- package/templates/base/.agents/skills/senior-fullstack/references/architecture_patterns.md +103 -0
- package/templates/base/.agents/skills/senior-fullstack/references/development_workflows.md +103 -0
- package/templates/base/.agents/skills/senior-fullstack/references/tech_stack_guide.md +103 -0
- package/templates/base/.agents/skills/senior-fullstack/scripts/code_quality_analyzer.py +114 -0
- package/templates/base/.agents/skills/senior-fullstack/scripts/fullstack_scaffolder.py +114 -0
- package/templates/base/.agents/skills/senior-fullstack/scripts/project_scaffolder.py +114 -0
- package/templates/base/.agents/skills/senior-qa/SKILL.md +209 -0
- package/templates/base/.agents/skills/senior-qa/references/qa_best_practices.md +103 -0
- package/templates/base/.agents/skills/senior-qa/references/test_automation_patterns.md +103 -0
- package/templates/base/.agents/skills/senior-qa/references/testing_strategies.md +103 -0
- package/templates/base/.agents/skills/senior-qa/scripts/coverage_analyzer.py +114 -0
- package/templates/base/.agents/skills/senior-qa/scripts/e2e_test_scaffolder.py +114 -0
- package/templates/base/.agents/skills/senior-qa/scripts/test_suite_generator.py +114 -0
- package/templates/base/ACCESSIBILITY.md +117 -0
- package/templates/base/{GEMINI.md → AGENTS.md} +1 -1
- package/templates/base/README.md +12 -0
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: senior-qa
|
|
3
|
+
description: Comprehensive QA and testing skill for quality assurance, test automation, and testing strategies for ReactJS, NextJS, NodeJS applications. Includes test suite generation, coverage analysis, E2E testing setup, and quality metrics. Use when designing test strategies, writing test cases, implementing test automation, performing manual testing, or analyzing test coverage.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Senior Qa
|
|
7
|
+
|
|
8
|
+
Complete toolkit for senior qa with modern tools and best practices.
|
|
9
|
+
|
|
10
|
+
## Quick Start
|
|
11
|
+
|
|
12
|
+
### Main Capabilities
|
|
13
|
+
|
|
14
|
+
This skill provides three core capabilities through automated scripts:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
# Script 1: Test Suite Generator
|
|
18
|
+
python scripts/test_suite_generator.py [options]
|
|
19
|
+
|
|
20
|
+
# Script 2: Coverage Analyzer
|
|
21
|
+
python scripts/coverage_analyzer.py [options]
|
|
22
|
+
|
|
23
|
+
# Script 3: E2E Test Scaffolder
|
|
24
|
+
python scripts/e2e_test_scaffolder.py [options]
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Core Capabilities
|
|
28
|
+
|
|
29
|
+
### 1. Test Suite Generator
|
|
30
|
+
|
|
31
|
+
Automated tool for test suite generator tasks.
|
|
32
|
+
|
|
33
|
+
**Features:**
|
|
34
|
+
- Automated scaffolding
|
|
35
|
+
- Best practices built-in
|
|
36
|
+
- Configurable templates
|
|
37
|
+
- Quality checks
|
|
38
|
+
|
|
39
|
+
**Usage:**
|
|
40
|
+
```bash
|
|
41
|
+
python scripts/test_suite_generator.py <project-path> [options]
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### 2. Coverage Analyzer
|
|
45
|
+
|
|
46
|
+
Comprehensive analysis and optimization tool.
|
|
47
|
+
|
|
48
|
+
**Features:**
|
|
49
|
+
- Deep analysis
|
|
50
|
+
- Performance metrics
|
|
51
|
+
- Recommendations
|
|
52
|
+
- Automated fixes
|
|
53
|
+
|
|
54
|
+
**Usage:**
|
|
55
|
+
```bash
|
|
56
|
+
python scripts/coverage_analyzer.py <target-path> [--verbose]
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### 3. E2E Test Scaffolder
|
|
60
|
+
|
|
61
|
+
Advanced tooling for specialized tasks.
|
|
62
|
+
|
|
63
|
+
**Features:**
|
|
64
|
+
- Expert-level automation
|
|
65
|
+
- Custom configurations
|
|
66
|
+
- Integration ready
|
|
67
|
+
- Production-grade output
|
|
68
|
+
|
|
69
|
+
**Usage:**
|
|
70
|
+
```bash
|
|
71
|
+
python scripts/e2e_test_scaffolder.py [arguments] [options]
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Reference Documentation
|
|
75
|
+
|
|
76
|
+
### Testing Strategies
|
|
77
|
+
|
|
78
|
+
Comprehensive guide available in `references/testing_strategies.md`:
|
|
79
|
+
|
|
80
|
+
- Detailed patterns and practices
|
|
81
|
+
- Code examples
|
|
82
|
+
- Best practices
|
|
83
|
+
- Anti-patterns to avoid
|
|
84
|
+
- Real-world scenarios
|
|
85
|
+
|
|
86
|
+
### Test Automation Patterns
|
|
87
|
+
|
|
88
|
+
Complete workflow documentation in `references/test_automation_patterns.md`:
|
|
89
|
+
|
|
90
|
+
- Step-by-step processes
|
|
91
|
+
- Optimization strategies
|
|
92
|
+
- Tool integrations
|
|
93
|
+
- Performance tuning
|
|
94
|
+
- Troubleshooting guide
|
|
95
|
+
|
|
96
|
+
### Qa Best Practices
|
|
97
|
+
|
|
98
|
+
Technical reference guide in `references/qa_best_practices.md`:
|
|
99
|
+
|
|
100
|
+
- Technology stack details
|
|
101
|
+
- Configuration examples
|
|
102
|
+
- Integration patterns
|
|
103
|
+
- Security considerations
|
|
104
|
+
- Scalability guidelines
|
|
105
|
+
|
|
106
|
+
## Tech Stack
|
|
107
|
+
|
|
108
|
+
**Languages:** TypeScript, JavaScript, Python, Go, Swift, Kotlin
|
|
109
|
+
**Frontend:** React, Next.js, React Native, Flutter
|
|
110
|
+
**Backend:** Node.js, Express, GraphQL, REST APIs
|
|
111
|
+
**Database:** PostgreSQL, Prisma, NeonDB, Supabase
|
|
112
|
+
**DevOps:** Docker, Kubernetes, Terraform, GitHub Actions, CircleCI
|
|
113
|
+
**Cloud:** AWS, GCP, Azure
|
|
114
|
+
|
|
115
|
+
## Development Workflow
|
|
116
|
+
|
|
117
|
+
### 1. Setup and Configuration
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
# Install dependencies
|
|
121
|
+
npm install
|
|
122
|
+
# or
|
|
123
|
+
pip install -r requirements.txt
|
|
124
|
+
|
|
125
|
+
# Configure environment
|
|
126
|
+
cp .env.example .env
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### 2. Run Quality Checks
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
# Use the analyzer script
|
|
133
|
+
python scripts/coverage_analyzer.py .
|
|
134
|
+
|
|
135
|
+
# Review recommendations
|
|
136
|
+
# Apply fixes
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### 3. Implement Best Practices
|
|
140
|
+
|
|
141
|
+
Follow the patterns and practices documented in:
|
|
142
|
+
- `references/testing_strategies.md`
|
|
143
|
+
- `references/test_automation_patterns.md`
|
|
144
|
+
- `references/qa_best_practices.md`
|
|
145
|
+
|
|
146
|
+
## Best Practices Summary
|
|
147
|
+
|
|
148
|
+
### Code Quality
|
|
149
|
+
- Follow established patterns
|
|
150
|
+
- Write comprehensive tests
|
|
151
|
+
- Document decisions
|
|
152
|
+
- Review regularly
|
|
153
|
+
|
|
154
|
+
### Performance
|
|
155
|
+
- Measure before optimizing
|
|
156
|
+
- Use appropriate caching
|
|
157
|
+
- Optimize critical paths
|
|
158
|
+
- Monitor in production
|
|
159
|
+
|
|
160
|
+
### Security
|
|
161
|
+
- Validate all inputs
|
|
162
|
+
- Use parameterized queries
|
|
163
|
+
- Implement proper authentication
|
|
164
|
+
- Keep dependencies updated
|
|
165
|
+
|
|
166
|
+
### Maintainability
|
|
167
|
+
- Write clear code
|
|
168
|
+
- Use consistent naming
|
|
169
|
+
- Add helpful comments
|
|
170
|
+
- Keep it simple
|
|
171
|
+
|
|
172
|
+
## Common Commands
|
|
173
|
+
|
|
174
|
+
```bash
|
|
175
|
+
# Development
|
|
176
|
+
npm run dev
|
|
177
|
+
npm run build
|
|
178
|
+
npm run test
|
|
179
|
+
npm run lint
|
|
180
|
+
|
|
181
|
+
# Analysis
|
|
182
|
+
python scripts/coverage_analyzer.py .
|
|
183
|
+
python scripts/e2e_test_scaffolder.py --analyze
|
|
184
|
+
|
|
185
|
+
# Deployment
|
|
186
|
+
docker build -t app:latest .
|
|
187
|
+
docker-compose up -d
|
|
188
|
+
kubectl apply -f k8s/
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
## Troubleshooting
|
|
192
|
+
|
|
193
|
+
### Common Issues
|
|
194
|
+
|
|
195
|
+
Check the comprehensive troubleshooting section in `references/qa_best_practices.md`.
|
|
196
|
+
|
|
197
|
+
### Getting Help
|
|
198
|
+
|
|
199
|
+
- Review reference documentation
|
|
200
|
+
- Check script output messages
|
|
201
|
+
- Consult tech stack documentation
|
|
202
|
+
- Review error logs
|
|
203
|
+
|
|
204
|
+
## Resources
|
|
205
|
+
|
|
206
|
+
- Pattern Reference: `references/testing_strategies.md`
|
|
207
|
+
- Workflow Guide: `references/test_automation_patterns.md`
|
|
208
|
+
- Technical Guide: `references/qa_best_practices.md`
|
|
209
|
+
- Tool Scripts: `scripts/` directory
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# Qa Best Practices
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
This reference guide provides comprehensive information for senior qa.
|
|
6
|
+
|
|
7
|
+
## Patterns and Practices
|
|
8
|
+
|
|
9
|
+
### Pattern 1: Best Practice Implementation
|
|
10
|
+
|
|
11
|
+
**Description:**
|
|
12
|
+
Detailed explanation of the pattern.
|
|
13
|
+
|
|
14
|
+
**When to Use:**
|
|
15
|
+
- Scenario 1
|
|
16
|
+
- Scenario 2
|
|
17
|
+
- Scenario 3
|
|
18
|
+
|
|
19
|
+
**Implementation:**
|
|
20
|
+
```typescript
|
|
21
|
+
// Example code implementation
|
|
22
|
+
export class Example {
|
|
23
|
+
// Implementation details
|
|
24
|
+
}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
**Benefits:**
|
|
28
|
+
- Benefit 1
|
|
29
|
+
- Benefit 2
|
|
30
|
+
- Benefit 3
|
|
31
|
+
|
|
32
|
+
**Trade-offs:**
|
|
33
|
+
- Consider 1
|
|
34
|
+
- Consider 2
|
|
35
|
+
- Consider 3
|
|
36
|
+
|
|
37
|
+
### Pattern 2: Advanced Technique
|
|
38
|
+
|
|
39
|
+
**Description:**
|
|
40
|
+
Another important pattern for senior qa.
|
|
41
|
+
|
|
42
|
+
**Implementation:**
|
|
43
|
+
```typescript
|
|
44
|
+
// Advanced example
|
|
45
|
+
async function advancedExample() {
|
|
46
|
+
// Code here
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Guidelines
|
|
51
|
+
|
|
52
|
+
### Code Organization
|
|
53
|
+
- Clear structure
|
|
54
|
+
- Logical separation
|
|
55
|
+
- Consistent naming
|
|
56
|
+
- Proper documentation
|
|
57
|
+
|
|
58
|
+
### Performance Considerations
|
|
59
|
+
- Optimization strategies
|
|
60
|
+
- Bottleneck identification
|
|
61
|
+
- Monitoring approaches
|
|
62
|
+
- Scaling techniques
|
|
63
|
+
|
|
64
|
+
### Security Best Practices
|
|
65
|
+
- Input validation
|
|
66
|
+
- Authentication
|
|
67
|
+
- Authorization
|
|
68
|
+
- Data protection
|
|
69
|
+
|
|
70
|
+
## Common Patterns
|
|
71
|
+
|
|
72
|
+
### Pattern A
|
|
73
|
+
Implementation details and examples.
|
|
74
|
+
|
|
75
|
+
### Pattern B
|
|
76
|
+
Implementation details and examples.
|
|
77
|
+
|
|
78
|
+
### Pattern C
|
|
79
|
+
Implementation details and examples.
|
|
80
|
+
|
|
81
|
+
## Anti-Patterns to Avoid
|
|
82
|
+
|
|
83
|
+
### Anti-Pattern 1
|
|
84
|
+
What not to do and why.
|
|
85
|
+
|
|
86
|
+
### Anti-Pattern 2
|
|
87
|
+
What not to do and why.
|
|
88
|
+
|
|
89
|
+
## Tools and Resources
|
|
90
|
+
|
|
91
|
+
### Recommended Tools
|
|
92
|
+
- Tool 1: Purpose
|
|
93
|
+
- Tool 2: Purpose
|
|
94
|
+
- Tool 3: Purpose
|
|
95
|
+
|
|
96
|
+
### Further Reading
|
|
97
|
+
- Resource 1
|
|
98
|
+
- Resource 2
|
|
99
|
+
- Resource 3
|
|
100
|
+
|
|
101
|
+
## Conclusion
|
|
102
|
+
|
|
103
|
+
Key takeaways for using this reference guide effectively.
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# Test Automation Patterns
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
This reference guide provides comprehensive information for senior qa.
|
|
6
|
+
|
|
7
|
+
## Patterns and Practices
|
|
8
|
+
|
|
9
|
+
### Pattern 1: Best Practice Implementation
|
|
10
|
+
|
|
11
|
+
**Description:**
|
|
12
|
+
Detailed explanation of the pattern.
|
|
13
|
+
|
|
14
|
+
**When to Use:**
|
|
15
|
+
- Scenario 1
|
|
16
|
+
- Scenario 2
|
|
17
|
+
- Scenario 3
|
|
18
|
+
|
|
19
|
+
**Implementation:**
|
|
20
|
+
```typescript
|
|
21
|
+
// Example code implementation
|
|
22
|
+
export class Example {
|
|
23
|
+
// Implementation details
|
|
24
|
+
}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
**Benefits:**
|
|
28
|
+
- Benefit 1
|
|
29
|
+
- Benefit 2
|
|
30
|
+
- Benefit 3
|
|
31
|
+
|
|
32
|
+
**Trade-offs:**
|
|
33
|
+
- Consider 1
|
|
34
|
+
- Consider 2
|
|
35
|
+
- Consider 3
|
|
36
|
+
|
|
37
|
+
### Pattern 2: Advanced Technique
|
|
38
|
+
|
|
39
|
+
**Description:**
|
|
40
|
+
Another important pattern for senior qa.
|
|
41
|
+
|
|
42
|
+
**Implementation:**
|
|
43
|
+
```typescript
|
|
44
|
+
// Advanced example
|
|
45
|
+
async function advancedExample() {
|
|
46
|
+
// Code here
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Guidelines
|
|
51
|
+
|
|
52
|
+
### Code Organization
|
|
53
|
+
- Clear structure
|
|
54
|
+
- Logical separation
|
|
55
|
+
- Consistent naming
|
|
56
|
+
- Proper documentation
|
|
57
|
+
|
|
58
|
+
### Performance Considerations
|
|
59
|
+
- Optimization strategies
|
|
60
|
+
- Bottleneck identification
|
|
61
|
+
- Monitoring approaches
|
|
62
|
+
- Scaling techniques
|
|
63
|
+
|
|
64
|
+
### Security Best Practices
|
|
65
|
+
- Input validation
|
|
66
|
+
- Authentication
|
|
67
|
+
- Authorization
|
|
68
|
+
- Data protection
|
|
69
|
+
|
|
70
|
+
## Common Patterns
|
|
71
|
+
|
|
72
|
+
### Pattern A
|
|
73
|
+
Implementation details and examples.
|
|
74
|
+
|
|
75
|
+
### Pattern B
|
|
76
|
+
Implementation details and examples.
|
|
77
|
+
|
|
78
|
+
### Pattern C
|
|
79
|
+
Implementation details and examples.
|
|
80
|
+
|
|
81
|
+
## Anti-Patterns to Avoid
|
|
82
|
+
|
|
83
|
+
### Anti-Pattern 1
|
|
84
|
+
What not to do and why.
|
|
85
|
+
|
|
86
|
+
### Anti-Pattern 2
|
|
87
|
+
What not to do and why.
|
|
88
|
+
|
|
89
|
+
## Tools and Resources
|
|
90
|
+
|
|
91
|
+
### Recommended Tools
|
|
92
|
+
- Tool 1: Purpose
|
|
93
|
+
- Tool 2: Purpose
|
|
94
|
+
- Tool 3: Purpose
|
|
95
|
+
|
|
96
|
+
### Further Reading
|
|
97
|
+
- Resource 1
|
|
98
|
+
- Resource 2
|
|
99
|
+
- Resource 3
|
|
100
|
+
|
|
101
|
+
## Conclusion
|
|
102
|
+
|
|
103
|
+
Key takeaways for using this reference guide effectively.
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# Testing Strategies
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
This reference guide provides comprehensive information for senior qa.
|
|
6
|
+
|
|
7
|
+
## Patterns and Practices
|
|
8
|
+
|
|
9
|
+
### Pattern 1: Best Practice Implementation
|
|
10
|
+
|
|
11
|
+
**Description:**
|
|
12
|
+
Detailed explanation of the pattern.
|
|
13
|
+
|
|
14
|
+
**When to Use:**
|
|
15
|
+
- Scenario 1
|
|
16
|
+
- Scenario 2
|
|
17
|
+
- Scenario 3
|
|
18
|
+
|
|
19
|
+
**Implementation:**
|
|
20
|
+
```typescript
|
|
21
|
+
// Example code implementation
|
|
22
|
+
export class Example {
|
|
23
|
+
// Implementation details
|
|
24
|
+
}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
**Benefits:**
|
|
28
|
+
- Benefit 1
|
|
29
|
+
- Benefit 2
|
|
30
|
+
- Benefit 3
|
|
31
|
+
|
|
32
|
+
**Trade-offs:**
|
|
33
|
+
- Consider 1
|
|
34
|
+
- Consider 2
|
|
35
|
+
- Consider 3
|
|
36
|
+
|
|
37
|
+
### Pattern 2: Advanced Technique
|
|
38
|
+
|
|
39
|
+
**Description:**
|
|
40
|
+
Another important pattern for senior qa.
|
|
41
|
+
|
|
42
|
+
**Implementation:**
|
|
43
|
+
```typescript
|
|
44
|
+
// Advanced example
|
|
45
|
+
async function advancedExample() {
|
|
46
|
+
// Code here
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Guidelines
|
|
51
|
+
|
|
52
|
+
### Code Organization
|
|
53
|
+
- Clear structure
|
|
54
|
+
- Logical separation
|
|
55
|
+
- Consistent naming
|
|
56
|
+
- Proper documentation
|
|
57
|
+
|
|
58
|
+
### Performance Considerations
|
|
59
|
+
- Optimization strategies
|
|
60
|
+
- Bottleneck identification
|
|
61
|
+
- Monitoring approaches
|
|
62
|
+
- Scaling techniques
|
|
63
|
+
|
|
64
|
+
### Security Best Practices
|
|
65
|
+
- Input validation
|
|
66
|
+
- Authentication
|
|
67
|
+
- Authorization
|
|
68
|
+
- Data protection
|
|
69
|
+
|
|
70
|
+
## Common Patterns
|
|
71
|
+
|
|
72
|
+
### Pattern A
|
|
73
|
+
Implementation details and examples.
|
|
74
|
+
|
|
75
|
+
### Pattern B
|
|
76
|
+
Implementation details and examples.
|
|
77
|
+
|
|
78
|
+
### Pattern C
|
|
79
|
+
Implementation details and examples.
|
|
80
|
+
|
|
81
|
+
## Anti-Patterns to Avoid
|
|
82
|
+
|
|
83
|
+
### Anti-Pattern 1
|
|
84
|
+
What not to do and why.
|
|
85
|
+
|
|
86
|
+
### Anti-Pattern 2
|
|
87
|
+
What not to do and why.
|
|
88
|
+
|
|
89
|
+
## Tools and Resources
|
|
90
|
+
|
|
91
|
+
### Recommended Tools
|
|
92
|
+
- Tool 1: Purpose
|
|
93
|
+
- Tool 2: Purpose
|
|
94
|
+
- Tool 3: Purpose
|
|
95
|
+
|
|
96
|
+
### Further Reading
|
|
97
|
+
- Resource 1
|
|
98
|
+
- Resource 2
|
|
99
|
+
- Resource 3
|
|
100
|
+
|
|
101
|
+
## Conclusion
|
|
102
|
+
|
|
103
|
+
Key takeaways for using this reference guide effectively.
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
Coverage Analyzer
|
|
4
|
+
Automated tool for senior qa tasks
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
import os
|
|
8
|
+
import sys
|
|
9
|
+
import json
|
|
10
|
+
import argparse
|
|
11
|
+
from pathlib import Path
|
|
12
|
+
from typing import Dict, List, Optional
|
|
13
|
+
|
|
14
|
+
class CoverageAnalyzer:
|
|
15
|
+
"""Main class for coverage analyzer functionality"""
|
|
16
|
+
|
|
17
|
+
def __init__(self, target_path: str, verbose: bool = False):
|
|
18
|
+
self.target_path = Path(target_path)
|
|
19
|
+
self.verbose = verbose
|
|
20
|
+
self.results = {}
|
|
21
|
+
|
|
22
|
+
def run(self) -> Dict:
|
|
23
|
+
"""Execute the main functionality"""
|
|
24
|
+
print(f"🚀 Running {self.__class__.__name__}...")
|
|
25
|
+
print(f"📁 Target: {self.target_path}")
|
|
26
|
+
|
|
27
|
+
try:
|
|
28
|
+
self.validate_target()
|
|
29
|
+
self.analyze()
|
|
30
|
+
self.generate_report()
|
|
31
|
+
|
|
32
|
+
print("✅ Completed successfully!")
|
|
33
|
+
return self.results
|
|
34
|
+
|
|
35
|
+
except Exception as e:
|
|
36
|
+
print(f"❌ Error: {e}")
|
|
37
|
+
sys.exit(1)
|
|
38
|
+
|
|
39
|
+
def validate_target(self):
|
|
40
|
+
"""Validate the target path exists and is accessible"""
|
|
41
|
+
if not self.target_path.exists():
|
|
42
|
+
raise ValueError(f"Target path does not exist: {self.target_path}")
|
|
43
|
+
|
|
44
|
+
if self.verbose:
|
|
45
|
+
print(f"✓ Target validated: {self.target_path}")
|
|
46
|
+
|
|
47
|
+
def analyze(self):
|
|
48
|
+
"""Perform the main analysis or operation"""
|
|
49
|
+
if self.verbose:
|
|
50
|
+
print("📊 Analyzing...")
|
|
51
|
+
|
|
52
|
+
# Main logic here
|
|
53
|
+
self.results['status'] = 'success'
|
|
54
|
+
self.results['target'] = str(self.target_path)
|
|
55
|
+
self.results['findings'] = []
|
|
56
|
+
|
|
57
|
+
# Add analysis results
|
|
58
|
+
if self.verbose:
|
|
59
|
+
print(f"✓ Analysis complete: {len(self.results.get('findings', []))} findings")
|
|
60
|
+
|
|
61
|
+
def generate_report(self):
|
|
62
|
+
"""Generate and display the report"""
|
|
63
|
+
print("\n" + "="*50)
|
|
64
|
+
print("REPORT")
|
|
65
|
+
print("="*50)
|
|
66
|
+
print(f"Target: {self.results.get('target')}")
|
|
67
|
+
print(f"Status: {self.results.get('status')}")
|
|
68
|
+
print(f"Findings: {len(self.results.get('findings', []))}")
|
|
69
|
+
print("="*50 + "\n")
|
|
70
|
+
|
|
71
|
+
def main():
|
|
72
|
+
"""Main entry point"""
|
|
73
|
+
parser = argparse.ArgumentParser(
|
|
74
|
+
description="Coverage Analyzer"
|
|
75
|
+
)
|
|
76
|
+
parser.add_argument(
|
|
77
|
+
'target',
|
|
78
|
+
help='Target path to analyze or process'
|
|
79
|
+
)
|
|
80
|
+
parser.add_argument(
|
|
81
|
+
'--verbose', '-v',
|
|
82
|
+
action='store_true',
|
|
83
|
+
help='Enable verbose output'
|
|
84
|
+
)
|
|
85
|
+
parser.add_argument(
|
|
86
|
+
'--json',
|
|
87
|
+
action='store_true',
|
|
88
|
+
help='Output results as JSON'
|
|
89
|
+
)
|
|
90
|
+
parser.add_argument(
|
|
91
|
+
'--output', '-o',
|
|
92
|
+
help='Output file path'
|
|
93
|
+
)
|
|
94
|
+
|
|
95
|
+
args = parser.parse_args()
|
|
96
|
+
|
|
97
|
+
tool = CoverageAnalyzer(
|
|
98
|
+
args.target,
|
|
99
|
+
verbose=args.verbose
|
|
100
|
+
)
|
|
101
|
+
|
|
102
|
+
results = tool.run()
|
|
103
|
+
|
|
104
|
+
if args.json:
|
|
105
|
+
output = json.dumps(results, indent=2)
|
|
106
|
+
if args.output:
|
|
107
|
+
with open(args.output, 'w') as f:
|
|
108
|
+
f.write(output)
|
|
109
|
+
print(f"Results written to {args.output}")
|
|
110
|
+
else:
|
|
111
|
+
print(output)
|
|
112
|
+
|
|
113
|
+
if __name__ == '__main__':
|
|
114
|
+
main()
|