AN ANDROID-BASED APPROACH FOR AUTOMATIC UNIT TEST

Posted on : by : Writer

AN ANDROID-BASED APPROACH FOR AUTOMATIC UNIT TEST

Unit test is the first stage in the V-Model and the foundation of software test. By means of integrating Android JUnit, a testing tool, into a continuous integration platform named Jenkins, this paper proposes a fully automated unit test approach. The approach can generate a visual test report for Android projects. This achievement can significantly increase the efficiency of multiple unit tests, and thus enable engineers to deliver their software products to the end users as soon as possible.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

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

 AN ANDROID-BASED APPROACH FOR AUTOMATIC UNIT TEST

he process of test build can be divided into five steps. Firstly, Jenkins updates all content of target source code directory and gets the final source codes. Secondly Maven generates executable file by the process of compiling and linking. Thirdly, Android JUnit performs test automatically as what has been scheduled, and records the results generated in the log. After all, Jenkins generates visual HTML reports. Engineers can view the detailed report submitted by Jenkins with the help of browser. In addition, if engineers change the source code and submit it to SVN, Jenkins will detect this information with the help of SVN in the subsequent build cycle. Then, Jenkins will invoke configuration files to build test in accordance with the build frequency which has been configured previously.

https://codeshoppy.com/android-app-ideas-for-students-college-project.html