From 78a877b0c9303862562503dbc1373176d6cebe4a Mon Sep 17 00:00:00 2001 From: Gergely Hegedus Date: Tue, 12 Apr 2022 16:11:34 +0300 Subject: [PATCH] Adjust robolectrictest instructionset --- codekata/robolectric.instructionset.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/codekata/robolectric.instructionset.md b/codekata/robolectric.instructionset.md index 4219865..39a60ac 100644 --- a/codekata/robolectric.instructionset.md +++ b/codekata/robolectric.instructionset.md @@ -37,7 +37,10 @@ And if we run our test class we already get an exception: So we need to mock the creation of `SharedPreferences`, then the `SharedPreferences` as well. Since our classes main purpose is to handle `SharedPreferences`, that doesn't really make sense. -Well, I would rather not do that. So then we need to test on a Real Device or Emulator. Well we could, but then we need to integrate a Testing Farm with our CI. It would be good to do that, but sometimes that's just not possible, here is where [Robolectric](http://robolectric.org/) comes in. +Well, I would rather not do that. So then we need to run our tests on a Real Device or Emulator during development. +Well we could do that, but it just takes that much more time. +We would also need to to integrate a Testing Farm, or run Emulators in docker with our CI. +It would be good to do that, but sometimes that's just not possible, here is where [Robolectric](http://robolectric.org/) comes in. >Robolectric is the industry-standard unit testing framework for Android. With Robolectric, your tests run in a simulated Android environment inside a JVM, without the overhead and flakiness of an emulator. Robolectric tests routinely run 10x faster than those on cold-started emulators.