Robotium data-driven testing framework

Source: Internet
Author: User

Refer to http://controlingquality.blogspot.com/2011/02/design-data-driven-framework-around.html

TestedCodeIs a simple calculator, code:/files/morebetter/Android code/androidcalculator.rar

1. Data-Driven Testing Architecture

    • Test Data source: testdata.csv

 

First Value Second Value
10 1.5
20 3

 

    • The first input box reads data from the first value.

    • The second input box reads data from second value.

    • Click multiply

    • Compare the test results with the expected results and write the results to the file.

2. Create a data source file

Format:

3. upload the data source file to the emulator.

    1. Create the Res/raw/Files folder in the tested code. In this way, the Files folder can be uploaded to emulator.

    2. Run the tested code using eclipse-run as-Android Application

    3. Load ddms on Eclipse, click File exploer, and browse all emulator-5554 files

    • Open/data/COM. calculator/files, Click Upload to device on the right side, and upload the CSV file to emulator.

 

4. Edit the test case. The code is/files/morebetter/Android code/androidcalculatortestapk.rar.

5. Run the test case

6. Write the test result to the file, which is stored under/data/COM. calculator/files.

7. Import the test results to the local computer.

 

 

As the author said, this is just a simple framework. You can modify it based on your own needs.

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.