scapy.contrib.automotive.scanner.configuration

class scapy.contrib.automotive.scanner.configuration.AutomotiveTestCaseExecutorConfiguration(test_cases: List[AutomotiveTestCaseABC | Type[AutomotiveTestCaseABC]] | List[Type[AutomotiveTestCaseABC]], **kwargs: Any)[source]

Bases: object

Configuration storage for AutomotiveTestCaseExecutor.

The following keywords are used in the AutomotiveTestCaseExecutor:

verbose: Enables verbose output and logging debug: Will raise Exceptions on internal errors

Parameters:
  • test_cases – List of AutomotiveTestCase classes or instances. Classes will get instantiated in this initializer.

  • kwargs – Configuration for every AutomotiveTestCase in test_cases and for the AutomotiveTestCaseExecutor. TestCase local configuration and global configuration for all TestCase objects are possible. All keyword arguments given will be stored for every TestCase. To define a local configuration for one TestCase only, the keyword arguments need to be provided in a dictionary. To assign a configuration dictionary to a TestCase, the keyword need to identify the TestCase by the following pattern. MyTestCase_kwargs={"someConfig": 42} The keyword is composed from the TestCase class name and the postfix ‘_kwargs’.

Example

>>> config = AutomotiveTestCaseExecutorConfiguration([MyTestCase], global_config=42, MyTestCase_kwargs={"localConfig": 1337})  # noqa: E501
add_test_case(test_case: AutomotiveTestCaseABC | Type[AutomotiveTestCaseABC] | StagedAutomotiveTestCase | Type[StagedAutomotiveTestCase]) None[source]