Skip to content

Verification Test Suites

Lady Nicole edited this page Jun 1, 2020 · 3 revisions

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.

Tests Suite Structure

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.

Adding a Test Suite

  1. The first step is to follow the Adding a test until all of the desired implementation testing is covered using the Test data type. One important distinction between tests is that some require a query 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.
  2. Add your test to the MCT Mobile tests using the Mobile App Section of the Test tutorial.
  3. Verify that each of the tests work individually using the Tests page before adding them to the suite.
  4. Construct an array of tests you want in your suite like.
    val basicTestList = arrayOf(
            playTest,
            pauseTest,
            stopTest,
            skipToNextTest,
            skipToPrevTest,
            seekToTest
    )
  5. 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)
  6. 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.

Clone this wiki locally