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 ...

Get Learning Android Application Testing now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.