Scenarios
Scenarios describe what you need. They define the tests and the necessary devices for them. Here you can find all scenarios that are implemented in this BalderHub package.
- class balderhub.battery.scenarios.ScenarioBatteryLevelRemovable
Bases:
ScenarioBasic Test scenario that validates the correctness for reading battery levels within the device-under-test. It uses the
balderhub.battery.lib.scenario_features.RemovableBatterySimFeatureto emulate the battery and reads back the battery level from the DUT and validates that they are the same.- class BatterySim
Bases:
Devicethe battery simulation device
- class DeviceUnderTest
Bases:
Devicethe device under test
- class ReaderDevice
Bases:
Devicea device that can read the battery level from the DUT
- device_is_powered_off()
testcase level feature that makes sure that the device is powered off before entering the test
- power_off_and_restore()
variation level feature that makes sure that the device is powered off before entering the variation and restores it within the teardown part
- test_battery_level_detection(battery_level: float)
This test inserts the battery and then tries to read the battery level. It validates that both are equal.
- Parameters:
battery_level – feature-parametrization for all battery levels that should be validated (defined by
BatteryTestCriteriaConfig.validation_with_battery_levels()