Define test code conventions for Scribe Android app #194
Labels
feature
New feature or request
hacktoberfest
Included as a part of Hacktoberfest
help wanted
Extra attention is needed
Terms
Description
Summary
The codebase needs a set of coding conventions for writing unit tests to help manage unit test organization and help people understand how to test. This includes:
This issue is done when: a summary of recommendations is added to the
CONTRIBUTING.md
file.Suggestions
Feel free to take or leave these.
There are many good ways to choose options for these recommendations. Here are a few I like:
using the backtick syntax for kotlin functions (this is only allowed in test code). I like that this is more BDD but you'll definitely hit some long-method violations for very complicated cases.
@Nested
JUnit tests. It can help organize test classes where there are clear groups of functionality.@Nested
tests can also help. I suggest starting simple and recommending 1 function per test case and it's up to reviewers and contributors to make the call on whether a function has too much scope or not.Contribution
No response
The text was updated successfully, but these errors were encountered: