Using test suites

A test suite is a collection of tests. We will show you how to create a test collection. Create a test to represent the container for collection. Let's call it MainSuite:

    package com.journaler 
 
    import org.junit.runner.RunWith 
    import org.junit.runners.Suite 
 
    @RunWith(Suite::class) 
    @Suite.SuiteClasses( 
        DummyTest::class, 
        MainServiceTest::class 
    ) 
    class MainSuite  

Repeat the procedure we did for the instrumentation test from our example to run your test suite.

Get Mastering Android Development with Kotlin now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.