-
Notifications
You must be signed in to change notification settings - Fork 2
Testbed Initialization
When you write test automation scripts, you should separate the test cases logic and test bed definition. You test suites should be able to run on different similar test beds.
Test_Steps provides a way to select the test bed file you could use when you run the scripts in different places.
This environment variable is to define where to find your test bed file when running your scripts. It could be different when you run your cases in CI environment via Jenkins, or you run it locally for debugging.
Automatically initialize the test bed for test. There are two types of test bed files supported:
- .yaml file
- .py file
namespace is an option used usually for a plugin programming. Please see the code for the details.
When the test bed file type is a .py file, the init_testbed will load it and return a module object, you can directly access any object and functions in the module. When the test bed file type is a .yaml file, the init_testbed will load it and initiate all the objects defined in yaml format, and return a module, you could use it as members defined in the .yaml. (yaml type test bed file usually for python-oot plug-in use)
See lesson7, lesson8 and lesson9 for examples in source code of this package.