Please enable JavaScript.
Coggle requires JavaScript to display documents.
Android Tests - Coggle Diagram
Android Tests
-
-
-
Automated Tests
Unit Tests (70%)
- Single function or class
- Helps pinpoint failure
- Should run fast, usually local
- Low fidelity
- Small Test
Integration Tests (20%)
- Several classes work together
- Ensure classes work together
- Can be local or instrumented
- Medium Test
End-to-end Tests (10%)
- Large portions of the app
- High fidelity
- Tests that app works on the whole
- Simulate real usage, almost always instrumented
- At-Large Test
Black-Box Test
- Test written without knowing about the implementation
Source Sets
AndroidTest
- Instrumented test
- Slower
- More fidelity
test
- Local test
- Faster
- Less fidelity
-
Readable Tests
- Naming
- Given/When/Then
- Assertion frameworks
Naming
- subjectUnderTest_actionOrInput_resultState
Assertion Framework
-
Dependency Injection Test Doubles
- Repository
- View Model
- Fragment
Speciality Topics
- Navigation
- Coroutines
- Room
- Databinding
AndroidX Test
- Collection of libraries for testing
- Provides Android components for tests(Activities, Application)
- Used in both local and instrumented tests
Test Live Data
- InstantTaskExecutorRule()
- Observe Live data
-