• Home
Name Date Size #Lines LOC

..--

src/03-May-2024-2918

READMED03-May-20243.6 KiB7456

controlD03-May-20241.5 KiB4432

policy_EditBookmarksEnabled.pyD03-May-20244.9 KiB13195

README

1Usage Guide
2===========
3From chroot of your Chromium OS client, run the test remotely using test_that:
4$ test_that -b <board> <IPAddress> policy_EditBookmarksEnabled <arguments>
5
6On your Chrome OS device, run the test locally from the command line:
7$ /usr/local/autotest/bin/autotest /usr/local/autotest/tests/
8  policy_EditBookmarksEnabled/control <arguments>
9
10When no arguments are given, all test cases defined in the test are run using
11the fake AutoTest DM Server for policy download, and production GAIA for user
12authentication.
13
14Use the mode=single argument to run a single test case, and the case argument
15to specify the test case to run. E.g.:
16--args='mode=single case=True'
17--args='mode=single case=False'
18--args='mode=single case=NotSet'
19
20Use the env argument to select the environment parameters used during the test.
21The env argument determines which GAIA login server and DMServer will be used
22by Chrome OS to authenticate user sign-ins and to download policies. Use the
23dm-fake environment for your test to set up policies on the local AutoTest
24fake DM Server. Note that your tests cannot set up policies on the DMServer in
25the production, staging, or test environments.
26
27Valid values for env are:
28  prod    - Production: DMServer and GAIA in production.
29  cr-dev  - Staging: Cros-dev DMServer and GAIA in staging.
30  cr-auto - Staging: Cros-auto DMServer and GAIA in staging.
31  dm-test - Test: YAPS Python server on chromium-dm-test.appspot.com, and
32            GAIA in production.
33  dm-fake - (default) AutoTest: Fake local DMServer, and GAIA in production.
34
35When you select an environment other than the default 'dm-fake' AutoTest,
36you must provide the user credentials for that environment. E.g.:
37--args='env=cr-auto username=tester1@testdomain.com password=test1234'
38
39When you select an environment other than dm-fake, and you specify a single
40test case to run, you may optionally specify the policy value that the test
41case expects to be shown on the chrome://policy page. This is uncommon usage,
42but is provided to support situations where a single test method is used by
43multiple test cases, but with different policy values pre-set by the user on
44an external DM Server.
45
46When using env=dm-test, you must specify the dms_name for your instance of the
47chromium-dm-test service. E.g.:
48--args='env=dm-test dms_name=xot-dmst username=...'
49
50
51Argument Examples for policy_EditBookmarksEnabled tests
52=======================================================
53
54Local Command Line Args
55-----------------------
56Fake, mode=All:
57/usr/local/autotest/bin/autotest /usr/local/autotest/tests/policy_EditBookmarksEnabled/control --args="mode=all env=dm-fake"
58
59Production Environment: mode=Single, case=NotSet, with expected policy value:
60/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"
61
62YAPS Environment: mode=Single, case=True:
63/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"
64
65Remote Command Line Args
66------------------------
67For comparison, here are equivalent commands to run using test_that (from within chroot):
68test_that 100.96.49.89 policy_EditBookmarksEnabled --args="mode=all env=dm-fake"
69
70test_that 100.96.49.89 policy_EditBookmarksEnabled --args="mode=single case=NotSet env=prod username=sal1@crosprqa1.com password=test1234 value=None"
71
72test_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"
73
74