add --session_id and get_session_id
This commit is contained in:
parent
cf93cc8046
commit
016d0e6b18
2 changed files with 18 additions and 6 deletions
|
|
@ -6,7 +6,7 @@ from loguru import logger
|
|||
|
||||
from pytest_abra import Coordinator
|
||||
from pytest_abra.dir_manager import DirManager
|
||||
from pytest_abra.utils import get_datetime_string
|
||||
from pytest_abra.utils import get_session_id
|
||||
|
||||
|
||||
def run():
|
||||
|
|
@ -17,6 +17,8 @@ def run():
|
|||
parser.add_argument("--timeout", type=int, help="Set Playwright timeout in ms", default=20_000)
|
||||
parser.add_argument("--debug", action="store_true", help="Enable Playwright debug mode")
|
||||
parser.add_argument("--resume", action="store_true", help="Re-run the most recent test, skipping passed tests")
|
||||
parser.add_argument("--session_id", help="Session dir name (inside output_dir). Overwrites --resume")
|
||||
|
||||
args = parser.parse_args()
|
||||
env_paths = [Path(s) for s in args.env_paths.split(";")]
|
||||
|
||||
|
|
@ -27,11 +29,7 @@ def run():
|
|||
|
||||
# ----------------------------- define session_id ---------------------------- #
|
||||
|
||||
session_id = "test-" + get_datetime_string()
|
||||
if args.resume:
|
||||
latest_session_id = DirManager.get_latest_session_id(args.output_dir)
|
||||
if latest_session_id:
|
||||
session_id = DirManager.get_latest_session_id(args.output_dir)
|
||||
session_id = get_session_id(args.session_id, args.resume, args.output_dir)
|
||||
|
||||
# ------------------------------- setup logging ------------------------------ #
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue