-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathquick-start.sh
More file actions
executable file
·61 lines (56 loc) · 1.67 KB
/
Copy pathquick-start.sh
File metadata and controls
executable file
·61 lines (56 loc) · 1.67 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
#!/bin/bash
# Quick start script untuk Playwright Automation Framework
echo "======================================"
echo " Playwright Quick Start Script "
echo "======================================"
echo ""
# Activate virtual environment
if [ -d "venv" ]; then
source venv/bin/activate
echo "✅ Virtual environment activated"
else
echo "❌ Virtual environment not found. Run setup.py first"
exit 1
fi
echo ""
echo "Available commands:"
echo " run-tests - Run all tests"
echo " run-tests-verbose - Run tests with verbose output"
echo " run-single - Run single test file (usage: ./quick-start.sh run-single tests/test_example.py)"
echo " generate-report - Generate HTML test report"
echo " list-tests - List all available tests"
echo ""
case "$1" in
run-tests)
echo "🧪 Running all tests..."
pytest tests/
;;
run-tests-verbose)
echo "🧪 Running all tests (verbose)..."
pytest tests/ -v
;;
run-single)
if [ -z "$2" ]; then
echo "❌ Please specify test file path"
exit 1
fi
echo "🧪 Running $2..."
pytest "$2" -v
;;
generate-report)
echo "📊 Generating HTML report..."
pytest tests/ --html=reports/report.html --self-contained-html
echo "✅ Report generated: reports/report.html"
;;
list-tests)
echo "📋 Available tests:"
pytest tests/ --collect-only -q
;;
*)
if [ -z "$1" ]; then
echo "💡 No command specified. Try: ./quick-start.sh run-tests"
else
echo "❌ Unknown command: $1"
fi
;;
esac