e2e_tests/recipes/tests_demo/runner_demo.py

25 lines
1.2 KiB
Python

from src.runner import Runner, Test
class RunnerDemo(Runner):
"""Every env file has a corresponding runner class"""
name: str = "demo" # name of the test, used for logging / output naming
test_dir_name: str = "tests_demo" # dir name holding all tests related to RunnerDemo
# this indicates that tests from RunnerDemo depend on the setup from RunnerAuthentik.
# RunnerDemo will only execute, when setup_authentik.py has finished successfully.
# For example, setup_authentik.py generates session states, that can be used as fixtures
# that can be loaded from fixtures_authentik.py
dependencies: list[str] = ["authentik"]
# todo: update these comments
# Filename of Demo setup. If defined, it will run 1st by executing pytest
# Filename of Demo test. This file contains unconditional tests that will be run in any
# case. If defined, it will run 2nd by executing pytest
# this list can hold many more tests from RunnerDemo that run conditional. The condition
# and the test file can be defined by creating a ConditionalTest instance:
# ConditionalTest(condition: Callable, test_file: str)
setups: list[Test] = []
tests: list[Test] = []
cleanups: list[Test] = []