-
Notifications
You must be signed in to change notification settings - Fork 130
Verification Test Suites
A Test Suite
is a grouping of a series of tests to validate a specific
use-case for a Media Controller integration. For example a useful test suite
might validate the basic Google Assistant media control functionality and
contain tests like Play Test
, Pause Test
, and Stop Test
. This suite
could then be used by apps intending be controllable by Google Assistant
in-order to validate their Media Controller integration.
Test Suites
are just a list of Test
that are logically associated. Each Test
does
not need any additional association other than it adds to the overall validation
of the suite. A suite's Test
lists is run sequentially with a 1000ms delay
between each test. This is to assure that none of the Media controller commands
overlap. After a test is run, its logs and final result are stored. Even if a
test results in a failure, the suite will continue to run unless the user cancels
it. Once the full suite is finished, the results are displayed as a
list of tests, status, and logs. This gives the user an overview of the global feature they were testing.
- The first step is to follow the
Adding a test
until all of the desired implementation testing is covered using theTest
data type. One important distinction between tests is that some require aquery
for input. If the tests you are adding do require a query for input make sure that the 'Require Query' variable is set to true. This will help the test suite infrastructure determine which tests need configuration before the suite is ran. - Add your test to the MCT Mobile tests using the
Mobile App
Section of the Test tutorial. - Verify that each of the tests work individually using the
Tests
page before adding them to the suite. - Construct an array of tests you want in your suite like.
val basicTestList = arrayOf( playTest, pauseTest, stopTest, skipToNextTest, skipToPrevTest, seekToTest )
- Construct a test suite Data Structure passing in the name of your suite,
a description of your suite, the list of tests constructed in the previous test,
and the context.
val basicTestSuite = MediaAppTestSuite("Basic Tests", "Basic media test description.", basicTests, testSuiteResults, applicationContext)
- Add the test suite to the test suite list.
testSuites.add(basicTestSuite)
You can use the basic test suite
as an example of of how to add a test suite.