-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun-tests.sh
More file actions
executable file
·137 lines (125 loc) · 4.66 KB
/
run-tests.sh
File metadata and controls
executable file
·137 lines (125 loc) · 4.66 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
#!/bin/bash
# Comprehensive Performance Test Suite Runner
# Industry-standard performance testing including Core Web Vitals, Load, Stress, Soak, and Scalability Testing
echo "🚀 Starting Comprehensive Performance Test Suite"
echo "=============================================="
# Create test directory if it doesn't exist
mkdir -p performance-reports
# Check if Node.js is available
if ! command -v node &> /dev/null; then
echo "❌ Node.js is required to run the test suite"
exit 1
fi
# Check for required dependencies
if [ ! -d "node_modules" ]; then
echo "📦 Installing dependencies..."
npm install
fi
# Parse command line arguments
SUITE_TYPE="comprehensive"
TARGET_URL=""
while [[ $# -gt 0 ]]; do
case $1 in
--quick)
SUITE_TYPE="quick"
shift
;;
--comprehensive)
SUITE_TYPE="comprehensive"
shift
;;
--endurance)
SUITE_TYPE="endurance"
shift
;;
--url)
TARGET_URL="$2"
shift 2
;;
--schema-only)
SUITE_TYPE="schema"
shift
;;
--help)
echo "Usage: $0 [options]"
echo ""
echo "Options:"
echo " --quick Run quick performance test suite (~30 minutes)"
echo " --comprehensive Run comprehensive suite without soak testing (~1 hour)"
echo " --endurance Run full endurance suite including soak testing (~3+ hours)"
echo " --schema-only Run only the original Schema.org impact tests"
echo " --url <url> Specify target URL to test"
echo " --help Show this help message"
echo ""
exit 0
;;
*)
echo "Unknown option: $1"
echo "Use --help for usage information"
exit 1
;;
esac
done
# Run the appropriate test suite
case $SUITE_TYPE in
"quick")
echo "📊 Running Quick Performance Test Suite..."
if [ -n "$TARGET_URL" ]; then
node master-performance-suite.js --quick --url "$TARGET_URL"
else
node master-performance-suite.js --quick
fi
;;
"comprehensive")
echo "📊 Running Comprehensive Performance Test Suite..."
if [ -n "$TARGET_URL" ]; then
node master-performance-suite.js --comprehensive --url "$TARGET_URL"
else
node master-performance-suite.js --comprehensive
fi
;;
"endurance")
echo "📊 Running Full Endurance Performance Test Suite..."
if [ -n "$TARGET_URL" ]; then
node master-performance-suite.js --endurance --url "$TARGET_URL"
else
node master-performance-suite.js --endurance
fi
;;
"schema")
echo "📊 Running Schema.org Impact Analysis..."
node schema-impact-test.js
;;
esac
# Check if test completed successfully
if [ $? -eq 0 ]; then
echo ""
echo "✅ Test suite completed successfully!"
echo "📄 Results saved to schema-impact-report.json"
echo ""
echo "🔍 Quick analysis:"
# Display key metrics if jq is available
if command -v jq &> /dev/null; then
echo "Overall Score: $(cat schema-impact-report.json | jq '.summary.overallScore')/100"
echo "SEO Score: $(cat schema-impact-report.json | jq '.summary.seoScore')/100"
echo "LLM Score: $(cat schema-impact-report.json | jq '.summary.llmScore')/100"
echo "Performance Score: $(cat schema-impact-report.json | jq '.summary.performanceScore')/100"
echo ""
echo "💼 Business Impact:"
echo "Projected Traffic Increase: $(cat schema-impact-report.json | jq -r '.detailedResults.businessImpact.organicTraffic.projectedIncrease')"
echo "CTR Improvement: $(cat schema-impact-report.json | jq -r '.detailedResults.businessImpact.clickThroughRate.improvement')"
echo "Voice Search Capture: $(cat schema-impact-report.json | jq -r '.detailedResults.businessImpact.voiceSearchCapture.estimatedCaptureRate')"
echo "Brand Authority: $(cat schema-impact-report.json | jq -r '.detailedResults.businessImpact.brandAuthority.marketPositioning')"
else
echo "Install jq for detailed JSON analysis: brew install jq"
fi
echo ""
echo "🎯 To view the complete report:"
echo " cat schema-impact-report.json | jq ."
echo ""
echo "🔧 To run individual test categories:"
echo " node -e \"const t = require('./schema-impact-test.js'); new t().runSEOTests()\""
else
echo "❌ Test suite failed to complete"
exit 1
fi