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

Convert instrumentation tests to unit tests where possible #40

Open
1 task
mahozad opened this issue Jul 14, 2021 · 0 comments
Open
1 task

Convert instrumentation tests to unit tests where possible #40

mahozad opened this issue Jul 14, 2021 · 0 comments
Assignees
Labels
tests Related to library tests

Comments

@mahozad
Copy link
Owner

mahozad commented Jul 14, 2021

This makes the tests a lot easier and faster to run.
We can use Robolectric (at the time of writing this, it does not support JUnit 5).

If you want to run Robolectric tests with Junit 4 (using @RunWith and @org.junit.Test etc), remember to include testImplementation("org.junit.vintage:junit-vintage-engine:5.7.2") dependency in the build script.

Remeber to delete the excludeEngines("junit-vintage") from the following block of code in piechart build script so we can run JUnit 4 tests as well with the vintage engine (why was it excluded in the first place?):

useJUnitPlatform {
     excludeEngines("junit-vintage")
 }

See this and this for an example.

  • Remember to update the GitHub workflows as well
@mahozad mahozad added the tests Related to library tests label Jul 14, 2021
@mahozad mahozad self-assigned this Jul 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Related to library tests
Projects
None yet
Development

No branches or pull requests

1 participant