Git Product home page Git Product logo

Comments (12)

ibado-eb avatar ibado-eb commented on April 28, 2024 3

Hi, my team and I are really interested on using this library!
Would be great to have the ability to run tests individually.
Please let me know if we can help

from testparameterinjector.

nymanjens avatar nymanjens commented on April 28, 2024 2

Correct me if I'm wrong, but Android Studio is backed by IntelliJ, right?

If so, this is a feature request that is on our radar. After some initial analysis, we believe the best fix for this is to update the IntelliJ JUnit4TestRunnerUtil.java.

from testparameterinjector.

nymanjens avatar nymanjens commented on April 28, 2024 1

@alexjski was working on this last time we spoke

from testparameterinjector.

nymanjens avatar nymanjens commented on April 28, 2024 1

According to IntelliJ, this should be fixed in their next release (2021.3)

from testparameterinjector.

alexjski avatar alexjski commented on April 28, 2024 1

https://youtrack.jetbrains.com/issue/IDEA-275586 is fixed in 213.2441 build. I also validated the version at head does not suffer from the problem anymore.

Thank you, @akozlova for fixing that!

from testparameterinjector.

nymanjens avatar nymanjens commented on April 28, 2024

Hi,

What tool are you using to run the single test?

from testparameterinjector.

privetr avatar privetr commented on April 28, 2024

I run it with the Android Studio option on each test for a kotlin app.

from testparameterinjector.

alexjski avatar alexjski commented on April 28, 2024

I sent a PR for Intellij which addresses the issue. The problem with that if it is merged, my understanding is that it will be made available in next intellij release, so until then (and users picking up the new version) the problem remains.

We could also apply a workaround on our side, however it is not possible to have parameter values filtered correctly with that. In fact, I believe such workaround would make it at least more complicated to reconcile with a proper fix on the IDE side. My preference would be to try to get the fix in for Intellij and just encourage users to update -- please let me know if that is not an acceptable solution.

from testparameterinjector.

ibado-eb avatar ibado-eb commented on April 28, 2024

Hi @alexjski, if by is not possible to have parameter values filtered correctly you mean the individual test will run as many times as parameter values has, that would be totally ok for me 👍 Waiting for JetBrains + Android Studio to integrate the fix is gonna take a while.. Anyway, thanks for your help! Appreciate it

from testparameterinjector.

ultraon avatar ultraon commented on April 28, 2024

I use a temporary workaround for that:
as soon as someone wants to run a test method individually from AndroidStudio (IntelliJ IDEA) just comment out the line with @RunWith(TestParameterInjector::class) and use only test class properties (not test method parameters) with annotation @TestParameter and a default value for it.
;-)
You can put a comment about that restriction/workaround above the test class to help your colleagues with the approach.

from testparameterinjector.

alexjski avatar alexjski commented on April 28, 2024

Hi @alexjski, if by is not possible to have parameter values filtered correctly you mean the individual test will run as many times as parameter values has, that would be totally ok for me Waiting for JetBrains + Android Studio to integrate the fix is gonna take a while.. Anyway, thanks for your help! Appreciate it

The problem we are facing is that the test runner in Intellij creates an opaque Filter which does not include the information about the parameter value, hence without the information, the best we can do is to run all combinations. I agree this is not the end of the world, but I wanted to test the ground about just getting that done in Intellij rather than adding a workaround internally and later deal with removing it.

The workaround is obvious -- run all combinations (in fact, I have a change lying around doing that exactly). The problem with it is that once Intellij does the right thing, then the workaround may hurt the usability and should eventually be removed (when?). This is why not creating a workaround internally is so tempting -- I hope that makes sense to you. I don't know if and when the PR for Intellij will be submitted and released -- if that was to happen soon, I would actually opt to say "please update your IDE". If it is the opposite/a lot of users must use older Intellij for a foreseeable future, that definitely changes the equation.

I think what I am hearing is that I should try a little harder (I may need to sacrifice some edge cases) to get the fix out quicker.

from testparameterinjector.

alexjski avatar alexjski commented on April 28, 2024

According to IntelliJ, this should be fixed in their next release (2021.3)

I tested that at head and the problem still prevails. Filed https://youtrack.jetbrains.com/issue/IDEA-275586 for it.

from testparameterinjector.

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.