AUTOMATIC UNIT TEST FOR ANDROID

Posted on : by : Writer

AUTOMATIC UNIT TEST FOR ANDROID

Android is a mainstream OS for smart terminals and numerous engineers participate in developing Android apps. Increasing software brings the quality problem. Now, for all Android engineers, it should be a question that how to provide users with qualified products quickly. The V-Model defines the four stages of software test[1]: unit test, integration test, system test and acceptance test. In the aspect of testing application program function, unit test is an effective and systematic method. In aspect of Android application test, Android JUnit[2,3] is a highly recommended unit test tool, and it can greatly raise the testing efficiency for its automatic test ability. Considering the inadequacy of the single test result, we should do multiple tests to the applications. But it is just at this point, Android JUnit makes engineers have to perform the following test when the last test finished. By integrating Maven[4], Android JUnit and SVN[5] into Jenkins[6], this paper proposes an approach called MJT, which can regularly build unit tests for Android projects. That’s to say, this approach can automatically perform multiple unit tests .CodeShoppy

As a frequently used unit test framework for Java, JUnit adopts the way of test-driven development. In other words, engineers should finish writing test codes before developing. And these test codes should clearly indicate how the tested codes will be used and the way of error handling, etc. JUnit has four main functions: test case management, test code definition, test environment definition and test result validation. By integrating JUnit and Instrumentation, Android provides a testing tool named Android JUnit, which can perform unit test for apps. The testing tool includes JUnit test library and android unit test library, as well as junit.framework and android.test is very important among them. Furthermore, junit.framework is the core package of JUnit, and android.test is an extension package of Android SDK on the basis of junit.framework. And android.test mainly includes JUnitTestCase and InstrumentationTestCase which inherits JUnitTestCase. Instrumentation is the extension of JUnit, by which Android JUnit launches and performs unit test automatically.

Jenkins: Jenkins[6] is an open source framework which can build tests automatically. Designed by ThoughtWorks, it supports continuous integration process. Jenkins provides an easy continuous integration system, which can monitor the existing errors during the integrating process, provide detailed log files, and vividly show the trend and stability of project building. Moreover, Jenkins has excellent feedback function by providing a report in HTML format. As a result, engineers can conveniently check the situation of the project’s building by the browser. (2)Maven: Maven is a software project management tool, which is based on the project object model (POM) [4,7]. It can manage the build, reports and files of the project by defining description for the code structure of Java project. Unit test of Android project is managed by Maven[8], so engineers just need to enter the Maven command in IDE to compile, deploy and test. And the process of unit test is automatic. (3)SVN: Subversion [9,10] is a very popular version control system in the IT industry, and it possesses the advantage of open source and simplicity. Subversion stores various source files in a file server called “central repository”, and it can provide a record of amendments to the file. Therefore, when an error occurs, it can restore the data to the correct version. Also, it enables engineers to check the changes of source codes at any time. Besides, subversion also has the simple and convenient Web Server software, named Visual SVN Server. The software can be accessed by using HTTPS, which improves the security

AUTOMATIC UNIT TEST FOR ANDROID

With the rise of the IoT, Android will be widely applied in a variety of smart devices, and thereby brings the corresponding rapid development of Android applications. In the age of user first and word-of-mouth marketing, we are required to improve user experience and assure the quality of applications with efficient and strict test. On the basis of optimizing the Android JUnit, this paper proposes a fully automated test approach named MJT, which can periodically build unit tests and generate visual reports. The application of MJT will greatly increase the test efficiency.

https://codeshoppy.com/php-projects-titles-topics.html