Usage Guide =========== From chroot of your Chromium OS client, run the test remotely using test_that: $ test_that -b policy_EditBookmarksEnabled On your Chrome OS device, run the test locally from the command line: $ /usr/local/autotest/bin/autotest /usr/local/autotest/tests/ policy_EditBookmarksEnabled/control When no arguments are given, all test cases defined in the test are run using the fake AutoTest DM Server for policy download, and production GAIA for user authentication. Use the mode=single argument to run a single test case, and the case argument to specify the test case to run. E.g.: --args='mode=single case=True' --args='mode=single case=False' --args='mode=single case=NotSet' Use the env argument to select the environment parameters used during the test. The env argument determines which GAIA login server and DMServer will be used by Chrome OS to authenticate user sign-ins and to download policies. Use the dm-fake environment for your test to set up policies on the local AutoTest fake DM Server. Note that your tests cannot set up policies on the DMServer in the production, staging, or test environments. Valid values for env are: prod - Production: DMServer and GAIA in production. cr-dev - Staging: Cros-dev DMServer and GAIA in staging. cr-auto - Staging: Cros-auto DMServer and GAIA in staging. dm-test - Test: YAPS Python server on chromium-dm-test.appspot.com, and GAIA in production. dm-fake - (default) AutoTest: Fake local DMServer, and GAIA in production. When you select an environment other than the default 'dm-fake' AutoTest, you must provide the user credentials for that environment. E.g.: --args='env=cr-auto username=tester1@testdomain.com password=test1234' When you select an environment other than dm-fake, and you specify a single test case to run, you may optionally specify the policy value that the test case expects to be shown on the chrome://policy page. This is uncommon usage, but is provided to support situations where a single test method is used by multiple test cases, but with different policy values pre-set by the user on an external DM Server. When using env=dm-test, you must specify the dms_name for your instance of the chromium-dm-test service. E.g.: --args='env=dm-test dms_name=xot-dmst username=...' Argument Examples for policy_EditBookmarksEnabled tests ======================================================= Local Command Line Args ----------------------- Fake, mode=All: /usr/local/autotest/bin/autotest /usr/local/autotest/tests/policy_EditBookmarksEnabled/control --args="mode=all env=dm-fake" Production Environment: mode=Single, case=NotSet, with expected policy value: /usr/local/autotest/bin/autotest /usr/local/autotest/tests/policy_EditBookmarksEnabled/control --args="mode=single case=NotSet env=prod username=sal1@crosprqa1.com password=test1234 value=None" YAPS Environment: mode=Single, case=True: /usr/local/autotest/bin/autotest /usr/local/autotest/tests/policy_EditBookmarksEnabled/control --args="mode=single case=True env=dm-test dms_name=xot-dmst username=dadm@crosprqa3.com password=test1234" Remote Command Line Args ------------------------ For comparison, here are equivalent commands to run using test_that (from within chroot): test_that 100.96.49.89 policy_EditBookmarksEnabled --args="mode=all env=dm-fake" test_that 100.96.49.89 policy_EditBookmarksEnabled --args="mode=single case=NotSet env=prod username=sal1@crosprqa1.com password=test1234 value=None" test_that 100.96.49.89 policy_EditBookmarksEnabled --args="mode=single case=True env=dm-test dms_name=xot-dmst username=dadm@crosprqa3.com password=test1234"