-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_tests.vsh
More file actions
46 lines (40 loc) · 1.47 KB
/
Copy pathrun_tests.vsh
File metadata and controls
46 lines (40 loc) · 1.47 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
#!/usr/bin/env -S v run
import net
import os
fn main() {
println('\033[36m========================================\033[0m')
println('\033[36mVebidor Test Suite\033[0m')
println('\033[36m========================================\033[0m')
println('')
// Check if EdgeDriver is running
print('\033[33mChecking EdgeDriver... \033[0m')
mut conn := net.dial_tcp('localhost:9515') or {
println('\033[31m❌ EdgeDriver is not running on port 9515\033[0m')
println('\033[33mPlease start EdgeDriver with: .\\msedgedriver.exe --port=9515\033[0m')
exit(1)
}
conn.close() or {}
println('\033[32m✓ EdgeDriver is running\033[0m')
println('')
// Run unit tests
println('\033[36m========================================\033[0m')
println('\033[36mRunning Unit Tests\033[0m')
println('\033[36m========================================\033[0m')
if os.system('v test webdriver/') != 0 {
println('\033[31m❌ Unit tests failed\033[0m')
exit(1)
}
println('')
// Run integration tests
println('\033[36m========================================\033[0m')
println('\033[36mRunning Integration Tests\033[0m')
println('\033[36m========================================\033[0m')
if os.system('v test integration_test.v') != 0 {
println('\033[31m❌ Integration tests failed\033[0m')
exit(1)
}
println('')
println('\033[32m========================================\033[0m')
println('\033[32m✅ All tests passed!\033[0m')
println('\033[32m========================================\033[0m')
}