google / google/ground-android
[Code health] DrawArea* tests are fragile - consider revising
Open
type: code health
- Dominant language
- Kotlin
- Stars
- 293
- Forks
- 149
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 42
Description
`DrawAreaTaskViewModel` and `DrawAreaTaskFragmentTest` contain helper functions with non-trivial branching logic ([TotT 07-2014](https://testing.googleblog.com/2014/07/testing-on-toilet-dont-put-logic-in.html), and occasionally test via internal methods rather than testing public behaviors ([ToTT 08-2013](https://testing.googleblog.com/2013/08/testing-on-toilet-test-behavior-not.html)). Consider simplifying tests accordingly. Each test method also tests multiple behaviors, leading to later failing checks being masked by checks run earlier. Instead, we should test one behavior per test method.
@shobhitagarwal1612 FYI.
Contributor guide
Assessment
This issue has not been assessed yet.