-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_tests.sh
More file actions
executable file
·73 lines (68 loc) · 2.15 KB
/
run_tests.sh
File metadata and controls
executable file
·73 lines (68 loc) · 2.15 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
#!/bin/bash
# Graph Explorer Test Runner
# Provides easy commands for running different types of tests
set -e
echo "🧪 Graph Explorer Test Suite"
echo "============================"
case "${1:-all}" in
"all")
echo "Running all tests..."
cargo test
;;
"quick")
echo "Running tests in quiet mode..."
cargo test --quiet
;;
"csv")
echo "Running CSV loader tests..."
cargo test test_csv_loader -- --show-output
;;
"graph")
echo "Running graph operation tests..."
cargo test test_graph -- --show-output
;;
"analysis")
echo "Running analysis algorithm tests..."
cargo test test_analysis -- --show-output
;;
"database")
echo "Running database operation tests..."
cargo test test_database -- --show-output
;;
"errors")
echo "Running error handling tests..."
cargo test test_errors -- --show-output
;;
"coverage")
echo "Generating test coverage report..."
if command -v cargo-tarpaulin >/dev/null 2>&1; then
cargo tarpaulin --out Html
echo "Coverage report generated in tarpaulin-report.html"
else
echo "cargo-tarpaulin not installed. Install with:"
echo "cargo install cargo-tarpaulin"
exit 1
fi
;;
"help"|"-h"|"--help")
echo "Usage: $0 [test_type]"
echo ""
echo "Test types:"
echo " all - Run all tests (default)"
echo " quick - Run all tests in quiet mode"
echo " csv - Run CSV loader tests only"
echo " graph - Run graph operation tests only"
echo " analysis - Run analysis algorithm tests only"
echo " database - Run database operation tests only"
echo " errors - Run error handling tests only"
echo " coverage - Generate test coverage report"
echo " help - Show this help message"
;;
*)
echo "Unknown test type: $1"
echo "Run '$0 help' for usage information"
exit 1
;;
esac
echo ""
echo "✅ Test run completed!"