cleanup (#18)
- remove demo runner - improve docs - rename all tests to test_* (previously, also setup_* and cleanup_* existed) to improve stability as it is not guaranteed that pytest.ini is loaded. - improve logging formatting - improve full integration test Reviewed-on: local-it-infrastructure/e2e_tests#18 Co-authored-by: Daniel <d.brummerloh@gmail.com> Co-committed-by: Daniel <d.brummerloh@gmail.com>
This commit is contained in:
parent
8b9dd47f9e
commit
0fafa22272
18 changed files with 58 additions and 81 deletions
|
|
@ -1,5 +1,6 @@
|
|||
import argparse
|
||||
import os
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
from loguru import logger
|
||||
|
|
@ -19,10 +20,11 @@ def run():
|
|||
parser.add_argument("--env_paths", type=str, help="List of loaded env files separated with ;", required=True)
|
||||
parser.add_argument("--recipes_dir", type=Path, help="Dir of abra recipes and respective runners", required=True)
|
||||
parser.add_argument("--output_dir", type=Path, help="Dir of test outputs", required=True)
|
||||
parser.add_argument("--timeout", type=int, help="Set Playwright timeout in ms", default=20_000)
|
||||
parser.add_argument("--timeout", type=int, help="Set Playwright timeout in ms", default=30_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")
|
||||
parser.add_argument("--cleanup", help="Force test cleanup. Should not be necessary")
|
||||
|
||||
args = parser.parse_args()
|
||||
env_paths = [Path(s) for s in args.env_paths.split(";")]
|
||||
|
|
@ -41,7 +43,9 @@ def run():
|
|||
# todo: move to Coordinator
|
||||
DIR = DirManager(output_dir=args.output_dir, session_id=session_id)
|
||||
log_file = DIR.RESULTS / "coordinator.log"
|
||||
logger.add(log_file)
|
||||
logger.remove()
|
||||
logger.add(log_file, format="{time:YYYY-MM-DD at HH:mm:ss} | {level} | {message}")
|
||||
logger.add(sys.stdout, colorize=True, format="<green>{time:YYYY-MM-DD HH:mm:ss}</green> <level>{message}</level>")
|
||||
|
||||
# ---------------------------- initialize and run ---------------------------- #
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue