Data-driven testing technology

Source: Internet
Author: User
Tags error handling object model string format
The concept of data-driven testingA data-driven test reads the test data from a data file (an Excel text file XML file or a database) and then passes the variables into the script, either when the input of the test data is validated or when the output data is available. Test data in a file, the test script is responsible for the logical business process, the test state, and the data-file read data-driven test that is suitable for large data-volume testing of the same process and where test results can be expected features of data-driven testing technology(1) The data is separated from the test script so that the test case can be added, changed, and deleted by updating the test data without modifying the test script. (2) through the parameterization of variables, the test data into the test script, different data files corresponding to different test cases (3) improve the flexibility of test scripts, increase test coverage, and improve the ability to respond to test object changes. data-driven automated side testing frameworkThis framework reads the input and output test data from a data file and passes the variables into the pre-recorded test script. Individual Siftware Element and Data Factory test case Agent (Object Model) test Data Factory Common software UI Driver (Bas IC Elements) Element ID
(1) at the bottom of the UI driver layer, the main responsibility is to define the basic common elements library, eg button drop-down box text box and other basic elements appear in each software (2) The second layer I vigorously agent layer, this layer is based on the layer software vendors, the north side of the software each interface (UI) to establish related classes and objects , it is convenient for the upper call, this layer needs to be changed according to the Software's continuous letter (3) The most up-to-the-Cases is the test case layer, which is built on the agent layer and can be provided to the interface elements required by the test case layer after the agent layer is built. the process of data-driven testing(1) parameterize the test script for some of the usual light, and bind to a field in the datasheet (2) Edit the data table, edit the multi-row test data in the table (3) Set the iteration test, select the data row, run the test script each iteration to select a row of data data Driven test drive script (1) variable data, Hard-coded components flag a very fragile identification string in some window components. This can be hard-coded (2) highly technical, repetitive test designs (proficient in programming languages) parametric technology in data-driven testingReason: (1) parameterization can reduce the number of scripts, if not parameterized, it is necessary to copy a lot of scripts and modify (2) better close to the actual situation of the customer task: (1) parameter substitution constants (2) Set parameter properties and data Source type: (1) data table (2) Parameterization of the Environment variables (3) (4) External data source Parameterization tips: (1) The disadvantage of a text file to store a data source is that you need to define the delimiter between the data, and the split function is required for the read-in data to be cut. Excel file can be exempt from this trouble (2) database table storage data ADO link database, the key is to refer to a good connection string format data-driven advantages and disadvantagesAdvantages (1) In application development colleagues can build test scripts synchronously, and when the application function changes, only need to modify the business function part of the script can (2) avoid duplication of the script does not reduce the cost of building or maintenance (3) Separation of data and scripts, to facilitate the maintenance of testers (4) can do error handling, Increased robustness of script tests (5) simplified analysis of results of manual tests (1) Proficiency in scripting language (2) When writing data files, pay attention to the transmission format required by the test script or it will produce an error


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.