# Hello8Ball: Exploring Coroutine Testing with a Kotlin Sampler App

DevFeed: [Hello8Ball: Exploring Coroutine Testing with a Kotlin Sampler App](<https://devfeed.tech/articles/hello8ball-32055.md>)

Original publisher: [Read original article](<https://www.maiatoday.net/p/hello8ball/>)

Published: 2019-11-23T21:36:11Z

Content type: tutorial

Language: en

Sources: [maiatoday](<https://devfeed.tech/sources/maiatoday.md>)

Topics: [Coroutines](<https://devfeed.tech/topics/coroutines.md>), [Testing](<https://devfeed.tech/topics/testing.md>), [test](<https://devfeed.tech/topics/test.md>), [CircleCI](<https://devfeed.tech/topics/circleci.md>), [test-coverage](<https://devfeed.tech/topics/test-coverage.md>), [App](<https://devfeed.tech/topics/app.md>)

Tags: [circleci](<https://devfeed.tech/tags/circleci.md>), [code](<https://devfeed.tech/tags/code.md>), [code-coverage](<https://devfeed.tech/tags/code-coverage.md>), [coroutine-testing](<https://devfeed.tech/tags/coroutine-testing.md>), [coroutines](<https://devfeed.tech/tags/coroutines.md>), [detekt](<https://devfeed.tech/tags/detekt.md>), [jacoco](<https://devfeed.tech/tags/jacoco.md>), [kotlinx](<https://devfeed.tech/tags/kotlinx.md>), [test](<https://devfeed.tech/tags/test.md>), [testing](<https://devfeed.tech/tags/testing.md>), [tests](<https://devfeed.tech/tags/tests.md>)

## AI overview

Hello8Ball is a toy sampler app for exploring coroutine testing in Kotlin. It simulates an 8 Ball and includes examples involving network calls, calculations, password generation, synonym lookup, and prime-number checks. The repository includes tests using kotlinx-coroutine-test, CircleCI test execution, detekt, JaCoCo coverage, and a branch converted to JUnit 5.

## Source excerpt

A sampler app to explore Coroutine testing. This is a toy app that simulates an 8 Ball. It can answer questions, find synonmyms, generate a password or check if a number is prime. It was created to make a situation where it makes sense to use coroutines to e.g. go on the network or make a calculation. Then I added tests for all the pieces using kotlinx-coroutine-test. As a bonus the repo is set up to run the tests on CircleCi. It has detekt setup and jacoco code coverage. There is also a branch where all the tests are converted to junit5. Devfest 2019 video This is the companion repo to the KotlinEveryWhereZA 2019 and DevFestZa 2019 talk. Slides are in the repo. code