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

Espresso unit: To be able to launch activities from androidTest directory #196

Closed
sultanahamer opened this issue Sep 19, 2018 · 1 comment

Comments

@sultanahamer
Copy link

Idea here is to be able to test views/fragments alone(unit) than depending on activity.

If I have 4 fragments in my activity and I have to test fourth fragment, I do not want to launch my activity and then go all the way to fourth fragment navigating.

I should be able to create a dummy activity in androidTest directory, launch it and then attach fourth fragment to it and test.

Right now they are two different apks and not able to launch dummy activity(present in test code).

Note: Its not the case for ui-libraries(they don't have separate apk for themselves) and it works.

@sultanahamer sultanahamer changed the title To be able to launch activities from androidTest directory Espresso unit: To be able to launch activities from androidTest directory Sep 21, 2018
@brettchabot
Copy link
Collaborator

Please check out the new APIs ActivityScenario and FragmentScenario

hannesa2 pushed a commit to hannesa2/testing-samples that referenced this issue Nov 13, 2022
Summary:
The Android Gradle Plugin now automatically downloads a pinned version of build tools.
Pull Request resolved: facebook/screenshot-tests-for-android#196

Differential Revision: D10362124

Pulled By: xiphirx

fbshipit-source-id: b71b6ff2b60dd65228d2485ca5e555f38e18d6ff
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

2 participants