Lines Matching refs:test
10 - SdkSandboxScenarioRule: This is a custom JUnit rule used for creating a test environment
11 and invoking test methods
12 - SdkSandboxTestScenarioRunner: This is a custom SandboxedSdkProvider that manages test
15 manager to stay alive between test runs
22 If you need to add an entirely new JUnit test suite, you need to add both a JUnit test
28 test cases. Create a new module for your sdk side tests.
41 // sandbox test utilities that will be used
42 // by your JUnit test suite to load
44 certificate: ":sdksandbox-test",
51 libs: ["android.test.base"],
60 package="<your.test.package>">
63 <sdk-library android:name="<your.test.package>"
66 android:value="<your.test.package>.<TestName>TestSdk" />
71 Finally define a test within \<TestName>Sdk.java (eg: ExampleSandboxTestSdk):
78 // the JUnit test suite and returning results.
83 // that should be added to the sandbox before each test.
90 // These test failures will be propagated back to the JUnit
91 // test suite.
96 // as part of the test definitions.
100 // outside this test and this test needs to know
110 They need to be invoked from a JUnit test suite.
113 ### Invoke from a JUnit test suite
115 This guide will skip over defining a new JUnit test suite,
116 as this is the same as any other JUnit test suite in CTS.
119 JUnit test suite APK relies on the SDK you defined:
123 <!-- Note the certificate should be what is defined here - this is sdksandbox-test -->
124 <uses-sdk-library android:name="<your.test.sdk.package>"
130 In `AndroidTest.xml`, specify that your test needs to install
135 <option name="test-file-name" value="<TestName>Sdk" />
140 be built and your JUnit test suite relies on
146 // This will be used to invoke test methods
147 // from within the test Sandbox SDK.
151 // Define your test SDK as a data
153 // this JUnit test suite is built.
159 You can now invoke tests from your JUnit test suite:
165 // This rule will automatically create a new test activity
166 // and load your test SDK between each test.
169 "your.test.sdk.package");
173 // This method will invoke a test and assert the results.
185 ## Custom test instances
188 test instances from the class running your tests inside the test SDK.
217 that can be retrieved and used from inside test SDKs via the onLoadSdk method.
219 One example is if you want to reuse an sdk in order to test multiple test instances. For this you
220 could pass setup information to determine the specific test instance to use:
241 ## Custom test binders
248 that can be retrieved and used from inside test SDKs.
263 "your.test.sdk.package", new SharedCustomBinder.Stub() {
286 unit test. The SDK Sandbox manager will shutdown when the last SDK is unloaded.