How to pass an argument to an AndroidTestCase?

前端 未结 3 2155
一向
一向 2020-12-31 18:09

I\'ve implemented an Instrumentation and an AndroidTestCase.

For my tests I need to connect to an external WIFI device. I want the testers to be able to specify an S

3条回答
  •  既然无缘
    2020-12-31 18:53

    This sounds like the Parameterised JUnit Test use-case.

    Check out the brief tutorial here - note that you will need to be using JUnit4 and I'm not sure Android's testing framework is ready for that.

    That said, JUnit4 is backward compatible to JUnit3 so in-theory it'll be possible to use JUnit4 annotations under the android test case runner with a bit of build path tomfoolery.

提交回复
热议问题