O'Reilly logo

Learning Android Application Testing by Paul Blundell, Diego Torres Milano

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating the TemperatureConverterActivityTests class

Proceed with creating the first test by selecting the main test package name, com.blundell.tut. This is under src/androidTest/Java in the AndroidStudio project view, or under app/java/(androidTest) in the AndroidStudio Android view. Then right-click here, and select New | Java Class, call it, TemperatureConverterActivityTests.

Once the class is created, we need to go about turning it into a test class. We should select our superclass depending on what and how we are going to test. In Chapter 2, Understanding Testing with the Android SDK, we reviewed the available alternatives. Use it as a reference when you try to decide what superclass to use.

In this particular case, we are testing a single ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required