question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fix app module tests for Roboelectric

See original GitHub issue

Currently, the app module test cases are passing on Espresso but they should also pass on Robolectric. Fix these below mentioned files to make sure that the tests pass on Robolectric.

You can run robolectric tests by following these steps: https://github.com/oppia/oppia-android/wiki/Oppia-Android-Testing#running-roboelectric-tests

Also, make sure that you assign yourself one task only at a time, which you can mention in the comments below.

Fixing test cases will need to introduce TextApplicationComponent. This can be seen here.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:48 (48 by maintainers)

github_iconTop GitHub Comments

1reaction
Sarthak2601commented, Sep 22, 2020

@rt4914 Since we are going to take this issue under SLoP, can we freeze its contributions for now ? It might lead to confusion otherwise. @prayutsu Please wait on Rajat to reply. /cc- @anandwana001

1reaction
veena14cscommented, Jun 3, 2020

@veena14cs MyDownloadsFragmentTest, ProfilePictureActivityTest and InputInteractionViewTestActivityTest is good. Could we mark them done on the list?

MyDownloadFragmentTest we cannot mark it as done. As there is still actual implementation has to be done. @rt4914 please confirm on this.

InputInteractionViewTestActivityTest we can mark it as done but just want to confirm with @nikitamarysolomanpvt and @BenHenning if we have to wait for number with units implementation and testcases.

We can mark ProfilePictureActivityTest as done.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unit Testing with Robolectric | CodePath Android Cliffnotes
It allows Android applications to be tested on the JVM without an emulator or device. Running Android tests on the JVM usually fails...
Read more >
Writing Your First Test - Robolectric
We want to write a test that asserts that when a user clicks on a button, the app launches the LoginActivity. public class...
Read more >
App can't run Robolectric unit tests - Stack Overflow
I'm using a custom Robolectric runner, where I've just implemented its constructor (to set the correct path of resource files):.
Read more >
Unit Testing Basics with Robolectric - LearnHowToProgram.com
To run local tests we will use the Robolectric unit testing framework. With Robolectric, we will test the behaviors of a particular component...
Read more >
Hilt testing guide | Android Developers
To replace the AnalyticsService binding in tests, create a new Hilt module in the test or androidTest folder with the fake dependency and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found