Write Unit Tests with Spek
summary
Spek 2.0 is presented as a readable, JUnit-alternative that enforces ordered execution and BDD-style structure so tests serve as design documentation. Examples show using Spek 2.0 with Mockito and AndroidX testing utilities to unit-test ViewModel LiveData (by replacing executors and using InstantTaskExecutor-like rules) and to test Room (using a custom SQLite JDBC or allowMainThreadQueries plus a swapped executor); the approach is demonstrated end-to-end on a real menu app.
AI-written summary · about
chapters (5)
- 0:00Start
- 1:52What we'll talk about today
- 7:39Point 1: Readability
- 8:48Point 2: Readability
- 10:28Basic syntax
related talks
32mStructure Unit Testing with Spek
49mTesting Kotlin at Scale: Spek
32mTesting with Kotlin
01h 12mUnit Tests as a Specification
36mCan You Read Your Tests? Clean and Useful Android Testing, with JUnit and Spock!
18mSpeedup unit testing with the Spock framework
42mBuild testable apps for Android
53mSolving Espresso Android Autotest Issues in the Real World
