Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Describe testing strategy #218

Open
cmelchior opened this issue May 6, 2021 · 0 comments
Open

Describe testing strategy #218

cmelchior opened this issue May 6, 2021 · 0 comments

Comments

@cmelchior
Copy link
Contributor

The unit and integration tests in Realm Java has slowly turned into a mangled mess. We should try to avoid the same situation happening with regard to the Kotlin tests.

This issue is mostly about sitting down and defining some sort of sensible strategy for organizing tests.

We had some initial discussions about it and a reasonable first approach seems to be to have two kinds of tests.

io.realm.test.api: A package that only test the immediate API contract, i.e. boundary tests, exceptions being thrown, that all methods throw correctly if the Realm is closed. We should look into how many of these tests can be auto-generated from some sort of metadata.
io.realm.test.behavior: More complex tests involving the interaction of other components, i.e. what happens in a RealmResults if items are deleted. These probably need to be maintained by hand.

Doing the above would result in having two classes for each public API class, using Realm as an example:

  • RealmApiTests
  • RealmBehaviorTests

We need to play around with this to see if it makes sense or if some other approach makes more sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant