Coder Social home page Coder Social logo

Comments (9)

zsperske avatar zsperske commented on June 9, 2024 17

I have run into this same issue when updating AGP to 7.2.0

from android-test.

christophehenry avatar christophehenry commented on June 9, 2024 16

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.

alexbakker avatar alexbakker commented on June 9, 2024 10

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.

yuuki3655 avatar yuuki3655 commented on June 9, 2024 2

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.

mrk-han avatar mrk-han commented on June 9, 2024

Thank you @yuuki3655 ! This will be very helpful.

from android-test.

WarrenFaith avatar WarrenFaith commented on June 9, 2024

It also happens with 1.4.0
@yuuki3655 could you please reopen this issue?

from android-test.

chriswiesner avatar chriswiesner commented on June 9, 2024

yes, also same problem here with 1.4.0

from android-test.

vrnvorona avatar vrnvorona commented on June 9, 2024

Why waitForActivityToBecomeAnyOf is private? it could be useful in tests

from android-test.

gustavobarbosab avatar gustavobarbosab commented on June 9, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.