Comments (9)
I have run into this same issue when updating AGP to 7.2.0
from android-test.
Can this issue be reopened? I am still able to reproduce it with ActivityRule
and ActivityScenarioRule
on 1.3.0 on several tests. I am even able to reproduce on an absolutely empty AppCompatActivity
. The deprecated ActivityTestRule
works, though.
Edit: If you need a live example of the reproductibility, here is the repository. The tests pass on the branch 143-passes
and fail on the branch 143-fails
and the branch 143-fails-empty
demontrate how the test fail even on an empty AppCompatActivity
.
The relevant test class is LoginActivityTest
which tests LoginActivity
(that class is totally commented out on the branch 143-fails-empty
).
Strangely, this does not reproduce througout all the tests. For instance, SettingsFragmentTest
contains a call to onActivity
which produces not error either on my computer on my Jenkins CI.
from android-test.
This appears to still be an issue in 1.3.0-rc03
. Reverting to the deprecated ActivityTestRule works.
It seems the build/test logs for this repository are not public. Is the redirectingActivityShouldBeLaunchable
test failing? If not, I'll try to come up with a small demo app and create a new issue.
from android-test.
Thanks for reporting the issue with the detailed explanation. This behavior was by design because moveToState method doesn't work otherwise. However, given the example you explained there are valid use cases certainly. I updated launch method to accept any of steady states and moveToState's javadoc by my latest commit.
from android-test.
Thank you @yuuki3655 ! This will be very helpful.
from android-test.
It also happens with 1.4.0
@yuuki3655 could you please reopen this issue?
from android-test.
yes, also same problem here with 1.4.0
from android-test.
Why waitForActivityToBecomeAnyOf is private? it could be useful in tests
from android-test.
I had the same problem here, using the AGP 8.2.1...
I could realize that the problem happens when I'm calling the function close()
of the scenario.
Here we're using androidx test core version 1.5.0.
from android-test.
Related Issues (20)
- ATS_TAG and ATS_SHA256 for the Most latest release HOT 1
- ActivityScenario.launch hang forever HOT 1
- Problems testing custom activities or fragments that not inherit directly from Activity or Fragment HOT 5
- Task app:compileDebugAndroidTestKotlin FAILED HOT 1
- java.lang.ClassNotFoundException: Didn't find class "org.easymock.IArgumentMatcher" on path HOT 1
- ActivityScenario "close()" doesn't work as expected HOT 3
- Feature request: improve error message when Espresso `Intent` matching fails due to mismatched `Intent` `data`
- launchFragmentInContainer does not work with MenuProvider HOT 1
- Orchestrator sometimes runs all the instances of a parameterized test in the same process
- Allow recording Espresso tests when app has native code HOT 3
- Synchronization capabilities: allow to wait for a View or Fragment to exist HOT 1
- Tasks not cleaned up after `ActivityScenario.launch` HOT 6
- Crash: NoSuchMethodError (handleException) in Kotlin.coroutines.CoroutineExceptionHandler in android.test.tools.crawler HOT 2
- Support minification with better consumer proguard rules HOT 3
- androidx.test:runner uses junit 4.12 whic his affected by CVE-2020-15250 HOT 2
- Connect to my electronic victimizers HOT 1
- Android Test Report Merging Not Working HOT 2
- Espresso's `ViewActions.click()` appears to be flaky HOT 5
- Can't start implicit `Intent` from `ActivityScenario#launchActivityForResult` when targeting API 34 HOT 4
- Espresso ViewActions.swipeRight doesn't work for ViewPager2 on device with API 32+ HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from android-test.