Testing Android Developers Criteria



Testing Android Developers Criteria

The framework of Android testing, an inbuilt part of the environment of development, gives the powerful and architecture tools that support us to test every aspect of our applications at all level from unit to framework.

The testing framework have following key qualities:

  • Android testing suite is base on JUnit. We can utilize plain JUnit to test the class that does not call the Android API, or the JUnit extensions of Android to test components of Android. If we are new in Android testing, we can start with general purpose test cases classe such as Android TestCase and then go on to use more intelligent classes.
  • The Android JUnit extensions gives component specific test cases class. These classes gives supporter functions for developing the mock objects and functions that support us to control the life-cycle of any component.
  • Test suites included in test packages that are quite similar to main packages of application, so we do not require to learn a new set of techniques or tools for building tests and designing.
  • The SDK tool for developing and testing are present in Eclipse with the ADT, and also in command line form for use with another IDEs. Such tools got the information from the projects of the applications under testing and use such information to automatically develop the build file, directory structure and manifest file for the package of testing.
  • The SDK also gives monkeyrunner, an API for test device with programs of Python, and UI/Applications Exerciser Monkey, a command line tool for stress testing UIs by sending pseudo random events to any devices.

Here we explained the fundamental about the framework of the Android testing, containing the cognition of testing, the APIs that we use to develop test cases, and the tools that we use to execute the tests and view output. The document expects we have the basic knowledge of Android applications programming and JUnit methodology of testing.

Testing Android Developers Criteria
Testing Android Developers Criteria




Test Case Structure




Build of Android and testing tools presume that test project is organized into the tests standard structure, test case classes, test projects and test packages.

Android testing is the based on the JUnit. In general, the JUnit test is a function whose messages test a part of the applications under testing. We manage test functions into the classes called test case (or test suite). Each test case is an separate test of an individual ability in the applications under testing. Each class is a instrumentality for related test functions, although it often gives helper functions as well.

In JUnit, we develop one or more test sources files into the classes file. Similarly, in Android we use the SDK's build tool to build one or more test sources files into class files in an test package of Android. In JUnit, we use a test runner to test classes execution. In Android, we use test tools to load the test packages and the applications under testing, and the tools then execution of an Android particular test runner.

Test Projects




Test cases, like Android application, are organized for several projects.

The test projects are directories or Eclipse projects in which we develop from manifest file, source code and another files for testing packages. The Android SDK includes the tools for the Eclipse with ADT and for the commands line that develop and renew the test project for us. The tool develop the directories we use for source code and resource and the manifest files for the testing package. The command line tools also develop the Ant made files we require.

We should ever use Android tool to develop the testing projects. Among another merits, the tools:

  • Automatically configuration our testing packages to use InstrumentationTestRunner as the test cases runner. We should use InstrumentationTestRunner (or the subclass) to execute the JUnit test cases.

  • Develop an correct name for testing package. If the applications under the test cases have any packages name of com.mydomain.myapp, then Android tool configure the testing package name to com.mydomain.myapp.test. This will supports us to identify their relation, while stopping the struggles with in one organizations.

  • Automatically Develop the the exact developed files, manifest file, and directory structures for the testing projects. This will supports us to made the testing packages without having to renew build files and configures the linkage between our testing packages and the applications under the testing.

We can develop the testing projects anywhere in our files system, but the best approaches are to add the test projects so that the related root directories tests/ is at the similar level of the src/ directories of the main project of application. This will help us to search the test cases related with the applications.


Android Testing Criteria & available summary 




This updated versions of the AndroidTesting Criteria pdf was distributed in the October 2012 to cooccur with the launching of the Quality Apps Directories.


We have also generated a summaryof the tests in a spreadsheet format, displaying which test cases are the 'simple' app , and which are the 'complex' apps, and which are 'critical' apps, and which are 'warning-level' test cases. The spreadsheet have 4 tabs so we can receive what we like to do, and quickly completed the testing.


No comments:

Post a Comment

Popular Posts