-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathrun.py
More file actions
26 lines (21 loc) · 687 Bytes
/
run.py
File metadata and controls
26 lines (21 loc) · 687 Bytes
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
import os
browser = input("Choose a browser: ")
report = input("Generate html report?: ")
test_type = input("Sanity, Regression or both?: ")
run_paralel = input("Run tests in parallel?: ")
if report.lower() == "yes":
report = "--html=../Reports/report.html"
else:
report = ""
if test_type.lower() == "sanity":
test_type = "-m sanity"
elif test_type.lower() == "regression":
test_type = "-m regression"
else:
test_type = ""
if run_paralel.lower() == "yes":
run_paralel = "-n=3"
else:
run_paralel = ""
command = "cd TestCases & pytest -v -s {0} {1} {2} ../TestCases/ --browser {3}".format(run_paralel, test_type, report, browser.lower())
os.system(command)