Git Product home page Git Product logo

Comments (3)

nymanjens avatar nymanjens commented on April 29, 2024

Hi Jake!

Just some context: I don't work / never have worked on Android, so I have limited insight into how testing on Android is different from testing server code.

One thing that I have noticed, is that the Android teams almost haven't used TestParamterInjector internally, while hundreds of teams have been using TestParamterInjector for server code. I assumed this was because Anroid tests tend to use custom runners like RobolectricTestRunner. Is the non-Google Android world different enough to make a TestParamterInjector appealing? Or is your use case an exception?

Have you spoken to the R8 team at all about this?

No, I didn't know that team existed TBH.

If there is a sensible workaround in the code to allow older Android versions, that is fine for me. We've already made some changes to allow for the more recent versions of Android.

from testparameterinjector.

JakeWharton avatar JakeWharton commented on April 29, 2024

I assumed this was because Anroid tests tend to use custom runners like RobolectricTestRunner.

Robolectric is for tests which run on the JVM and Google (at least google3) has a bit of an addiction to it to a degree which I don't think reflects non-Google usage. There certainly is widespread usage of Robolectric, but its runner is not used on every test, only subsets which actually touch Android APIs. There's still a lot of room for plain old JVM JUnit tests for things like business logic and lower-level storage/networking components. And then tests which touch a lot of Android APIs are the ones that run on the device, which use the regular JUnit runner (or Burst, or this).

Burst actually used to have a Robolectric module where we created a hybrid runner that supported both, but we eventually abandoned it.

Is the non-Google Android world different enough to make a TestParamterInjector appealing? Or is your use case an exception?

Hard to say in the general case, but we have non-zero Burst usage in our tests that run on Android. Anecdotally I know of one or two other companies using Burst in similar ways.

If there is a sensible workaround in the code to allow older Android versions, that is fine for me. We've already made some changes to allow for the more recent versions of Android.

Yeah it's a shame we have to do this. But unfortunately the current required minimum (API 26) imposed here is still a few years away from being realistic. Today 21-24 is the common range people are using as a minimum. I believe Google was looking at 19 or 21 as a minimum when I left (a year ago now).


By the way regarding

I'm trying to migrate our codebases from Burst in an effort to deprecate Burst

We just did this:

from testparameterinjector.

nymanjens avatar nymanjens commented on April 29, 2024

We just did this:

Thanks so much for the deprecation and the blogpost! It means a lot to me and the other contributors :-).

There's still a lot of room for plain old JVM JUnit tests for things like business logic and lower-level storage/networking components.

Alright, in that case, it feels like supporting Android is indeed an important feature that should be maintained.

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.