AppTestGenerator

Test Generator for an App. Generates test cases of Fields and CIM.

class standard_lib.app_test_generator.AppTestGenerator(pytest_config)[source]

Bases: object

Test Generator for an App. Generates test cases of Fields and CIM. The test generator is to include all the specific test generators.

AppTestGenerator should not have any direct generation methods, it should call a specific test generator methods only. Make sure there is no heavy initialization in __init__, all the configurations and operations should only take place in generate_tests method.

Parameters

pytest_config – To get the options given to pytest

dedup_tests(test_list, fixture)[source]

Deduplicate the test case parameters based on param.id

Parameters
  • test_list (Generator) – Generator of pytest.param

  • fixture (str) – fixture name

Yields

Generator – De-duplicated pytest.param

generate_tests(fixture)[source]

Generate the test cases based on the fixture provided supported fixtures:

  • splunk_app_searchtime_*

  • splunk_app_cim_*

  • splunk_indextime

Parameters

fixture (str) – fixture name