Skip to main content
21 votes
3 answers
11k views

I have recently migrated my project to use AndroidX, and have configured test orchestrator for my espresso tests on gradle using the following docs: https://developer.android.com/training/testing/...
FlashAsh80's user avatar
  • 1,467
15 votes
1 answer
7k views

After migration of code and tests to AndroidX, all seems to work pretty well, however Robolectric junit tests for two fragments are failing due to NoClassDefFoundError: androidx/fragment/testing/R$...
Marcin Bak's user avatar
  • 1,450
8 votes
1 answer
220 views

Recently I show one of the google IO video about androidX testing which quote "Write Once, Run EveryWhere". Which makes me exciting to learn about androidX testing library. And what I found that ...
Moinkhan's user avatar
  • 12.9k
8 votes
0 answers
1k views

Assumptions Robolectric controls which Android version to emulate, so I need this AndroidX has the test API for Jetpack Compose, so I need this as well Background I have experienced a lot of ...
Alix's user avatar
  • 2,886
6 votes
4 answers
2k views

I'm using androidx.test libraries(which I migrated to recently) in my project and using custom AndroidJUnitRunner. Before migration it was all working fine but now I'm getting this error - Started ...
Shadab Ansari's user avatar
5 votes
1 answer
3k views

After I have added fragment-testing dependency to my project: // Testing dependencies espressoVersion = '3.2.0-beta01' testCoreVersion = '1.1.0' runnerVersion = '1.1.0' ...
amp's user avatar
  • 12.4k
5 votes
1 answer
4k views

I am having difficulty configuring my Android application for testing with AndroidX. When I attempt to run my initial test I get this error:- FAILURE: Build failed with an exception. * What went ...
Hector's user avatar
  • 5,714
5 votes
2 answers
700 views

I try to make a screenshot test with Espresso: Test class ScreenshotTest { @get:Rule var nameRule = TestName() @get:Rule var mActivityTestRule = ActivityTestRule(MainActivity::class.java) @Test ...
Denis Podzorov's user avatar
5 votes
0 answers
916 views

I'm trying to test a BottomSheetDialog using androidx.test and Robolectric and hitting a problem with trying to click a button in the dialog. onView(withId(R.id.fab_add)).perform(click()) ...
Ben Neill's user avatar
  • 3,029
5 votes
0 answers
575 views

Setup Robolectric: 4.2.1 AndroidX fragment-testing: 1.1.0-alpha05 Background With AndroidX comes new ways of testing fragments: Source: https://developer.android.com/training/basics/fragments/...
Alix's user avatar
  • 2,886
4 votes
1 answer
805 views

I want to test DialogFragment using androidx.fragment:fragment-testing lib. I call launchFragmentInContainer and moveToState(Lifecycle.State.RESUMED), but onCreateDialog is not called in this fragment....
Oleksandr Albul's user avatar
4 votes
1 answer
1k views

I have the following Project Structure: Main App --app --featureModule1 --featureModule2 --TestKit(Library module) where Testkit has all dependencies including app and featureModules. The Testkit ...
Amritpal Singh's user avatar
4 votes
0 answers
165 views

Previously with ActivityTestRule, one was able to override beforeActivityLaunched and afterActivityFinished to control app state before and after all tests (e.g, implementing a custom rule Class that ...
AaronMT's user avatar
  • 1,845
4 votes
0 answers
1k views

I have an activity MyActivity which in turn holds a fragment MyFragment. In MyFragment I show a BottomSheetDialogFragment using the childFragmentManager as below: bottomSheetFragment.show(...
Henry's user avatar
  • 17.9k
3 votes
1 answer
1k views

I am writing a test and I get this error from a standard library: java.lang.IllegalStateException: Method addObserver must be called on the main thread This is my simplified test method: @Test fun ...
NoKey's user avatar
  • 463

15 30 50 per page