Android-junit-report test report Generation--android Automated Test learning process

Source: Internet
Author: User

Video address:

Http://www.chuanke.com/v1983382-135467-384869.html

This content is actually already in use, I in an article robotium-only apk file test has already spoken this content, and oneself also uses Python+wxpython to write the interface program, realizes the run case+ obtains the XML result +xml turns html+ The ability to send mail

Main content:

First, test requirements

1. Statistic the execution time of each case

2, which case success, failure

3. The failed case gives log

4. Generate Web page HTML report results

II. deployment of the environment

Take Robotium as an example, the required environment:

1, JDK1.7, Android development environment

2. Robotium Jar Package

3. Android-junit-report.jar Bag

Iii. principle of report generation

Go to the official website: http://zutubi.com/, click Open Source to access the download page

Quick Start

For the impatient, this is a overview of how to integrate the runner with Ant builds. Note all modifications is made to your  test  project, i.e. the project which implements the JUnit tests :

    • Grab the jar from the Downloads page and add it to your libs/ directory.
    • Edit to set in the AndroidManifest.xml android:name tag to <instrumentation> : com.zutubi.android.junitreport.JUnitReportTestRunner .
    • Edit to add the line ant.properties :
      Test.runner=com.zutubi.android.junitreport.junitreporttestrunner
    • Run your tests as you would normally:
      $ ant Debug Install test
    • Pull the resulting XML report from the device (from the application under test ' s internal storage directory):
      $ adb pull/data/data/<main app Package>/files/junit-report.xml
    • Integrate the XML with your chosen build tool.

The following is the principle:

1, com.zutubi.android.junitreport.junitreporttestrunner--concrete see above description, need to modify the place is two, one is instrumentation tag, one is run as the run Configuration, modifying the value of instrumentation runner

2. Call mechanism:

Three-layer Package:

Junit report---"Robotium---" instrumentation

Iv. scripts for automated follow-up collection work

Script Run TestCase

Script 2--Pull the XML out of the phone memory card

Script 3--to convert XML into HTML

Script 4--incorporate HTML reports into manual, stress, performance reports

Script 5--send a message

done! Still need to write ...

Android-junit-report test report Generation--android Automated Test learning process

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.