• Home
Name Date Size #Lines LOC

..--

README.mdD03-May-20242.2 KiB5238

__init__.pyD03-May-20240 10

action_context.pyD03-May-20241.7 KiB4338

actions.pyD03-May-202416.8 KiB505412

actions_unittest.pyD03-May-20249.9 KiB233189

cfm_test.pyD03-May-2024688 2417

configurable_cfm_test.pyD03-May-20243.5 KiB10381

configurable_cfm_test_unittest.pyD03-May-20241.9 KiB4838

configuration.pyD03-May-2024712 1816

dsl.pyD03-May-2024548 1410

scenario.pyD03-May-2024519 2116

README.md

1# Configurable CfM Tests
2
3The Configurable CfM Tests modules allow creating test scenarios using an API
4that clearly describes the steps executed. A sample of a configurable CfM test
5is:
6
7    CfmTest(
8        scenario=Scenario(
9            CreateMeeting(),
10            RepeatTimes(5, Scenario(
11                MuteMicrophone(),
12                UnmuteMicrophone()
13            )),
14            LeaveMeeting(),
15            AssertUsbDevices(ATRUS),
16            AssertFileDoesNotContain('/var/log/messages', ['FATAL ERROR'])
17        ),
18        configuration=Configuration(
19            run_test_only = False
20        )
21    )
22
23This test creates a meeting, mutes and unmutes the microphone five times and
24leaves the meeting. It then verifies that an ATRUS device is visible and that
25the log file `/var/log/messages` does not contains `FATAL ERROR`.
26
27A configurable test can be setup in a `control` file so that third parties
28that have no easy way to modify other source code can create and modify
29such tests.
30
31For the test to be executed properly it has to subclass [`autotest_lib.server.cros.cfm.configurable_test.configurable_cfm_tests.ConfigurableCfmTest`](https://chromium.googlesource.com/chromiumos/third_party/autotest/+/master/server/cros/cfm/configurable_test/configurable_cfm_test.py).
32
33## Actions
34
35Each step in a scenario is an Action. The available actions are listed in
36[`autotest_lib.server.cros.cfm.configurable_test.actions`](https://chromium.googlesource.com/chromiumos/third_party/autotest/+/master/server/cros/cfm/configurable_test/actions.py).
37
38## Configuration
39
40Besides Actions, a test can be configured with configuration params that affect
41behavior outside of the actions. The available configuration flags are
42documented in
43[`autotest_lib.server.cros.cfm.configurable_test.configuration`](https://chromium.googlesource.com/chromiumos/third_party/autotest/+/master/server/cros/cfm/configurable_test/configuration.py).
44
45## Samples
46
47For complete samples see the Autotest
48[`enterprise_CFM_ConfigurableCfmTestSanity`](https://chromium.googlesource.com/chromiumos/third_party/autotest/+/master/server/site_tests/enterprise_CFM_ConfigurableCfmTestSanity/)
49that we use to test the framework itself.
50
51
52