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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.