-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathquick_test.sh
More file actions
executable file
·90 lines (77 loc) · 2.43 KB
/
quick_test.sh
File metadata and controls
executable file
·90 lines (77 loc) · 2.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#!/bin/bash
# Example: TestIQ Quick Test Script
# Run this to test all main features quickly
#
# Usage from examples/bash:
# ./quick_test.sh
# Or from project root:
# bash examples/bash/quick_test.sh
#
# Latest Features Tested:
# - Enhanced quality scoring with refactored recommendation engine
# - Improved code quality (reduced cognitive complexity)
# - Better constant management and maintainability
# - pytest integration (now included in dependencies)
set -e # Exit on error
# Determine project root (works from examples/bash or project root)
if [ -f "pyproject.toml" ]; then
PROJECT_ROOT="."
else
PROJECT_ROOT="../.."
fi
# Navigate to project root
cd "$PROJECT_ROOT"
# Create reports directory
mkdir -p reports
echo "🧪 TestIQ Quick Test Suite"
echo "=" | tr '=' '=' | head -c 50; echo
# 1. Demo
echo "1️⃣ Running demo..."
testiq demo | head -20
echo "✅ Demo complete"
echo
# 2. Basic analysis
echo "2️⃣ Basic analysis..."
testiq analyze examples/sample_coverage.json | head -30
echo "✅ Analysis complete"
echo
# 3. Quality score
echo "3️⃣ Quality scoring..."
testiq quality-score examples/sample_coverage.json | head -20
echo "✅ Quality score complete"
echo
# 4. HTML report
echo "4️⃣ Generating HTML report..."
testiq analyze examples/sample_coverage.json --format html --output reports/quick_report.html
echo "✅ HTML report: reports/quick_report.html"
echo
# 5. Quality gate
echo "5️⃣ Testing quality gate..."
testiq analyze examples/sample_coverage.json --quality-gate --max-duplicates 5 > /dev/null 2>&1
if [ $? -eq 0 ]; then
echo "✅ Quality gate: PASSED"
else
echo "⚠️ Quality gate: FAILED (expected for demo data)"
fi
echo
# 6. Baseline
echo "6️⃣ Baseline management..."
testiq analyze examples/sample_coverage.json --save-baseline test-baseline > /dev/null 2>&1
testiq baseline list
echo "✅ Baseline saved"
echo
# 7. Python API
echo "7️⃣ Testing Python API..."
python examples/python/manual_test.py | grep "✓" | head -10
echo "✅ Python API working"
echo
echo "=" | tr '=' '=' | head -c 50; echo
echo "🎉 All quick tests completed!"
echo
echo "📊 Generated files in reports/:"
ls -lh reports/*.html reports/*.csv reports/*.md 2>/dev/null | awk '{print " •", $9}' || echo " (run full tests to generate reports)"
echo
echo "🚀 Next steps:"
echo " • Open reports/quick_report.html in browser"
echo " • Run: python manual_test.py"
echo " • Read: docs/manual-testing.md"