Method and system for customizing variables in batches

A self-defined variable and batch technology, which is applied in the field of automated testing, can solve the problems of heavy workload of new scripts, high skill requirements, and high cost of maintenance scripts, and achieve lower skill requirements, lower maintenance costs, and shorter execution time Effect

Active Publication Date: 2020-04-07
SUNING CLOUD COMPUTING CO LTD
View PDF2 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0002] At present, in the process of automated testing, since the test data is included in the automated script, there are the following problems in the automated script writing process: First: the workload of adding scripts is heavy, and there are many cases corresponding to the same interface or interface And the process is similar, the interface itself has many fields. In the process of parameterizing the fields, the repetitive work of writing automation scripts is very heavy, and the readability of the results is poor. Missing, there are great difficulties in troubleshooting; third: the cost of maintaining scripts is high, and the functions need to be optimized. When fields are added, deleted, or field values ​​​​change, maintaining the corresponding interface automation scripts involves many case scripts that need to be modified, which is a waste of manpower. At the same time, it is still error-prone, and the steps are too consistent, and the work output is quantitative but not qualitative
[0003] In the process of parameterizing the test data, since the variable names and corresponding variable values ​​are in the script, there are 100 self-defined variable steps in the prior art for parameterizing 100 variables, such as executing 100 steps 100 times The assignment operation takes as long as 10 seconds, which is too long, and the data of the functional test and the automated test are unified, and the function is poor, which leads to the traditional operational query of defining variable names, which requires high skills of testers, and Only applicable to a single automated test platform

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and system for customizing variables in batches
  • Method and system for customizing variables in batches

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0031] like figure 1 As shown, this embodiment provides a method for batching custom variables, including the following steps:

[0032] S1: Create an assignment table, import case information into the assignment table, so that the case information in the assignment table includes the file location, file path, worksheet number, and case name of the case, and set the case name as the row query index , and set the variable name of the variable to be customized at the top of the assignment table;

[0033] S2: Analyzing the parameter name of the incoming case information, locating the table tab of the case information, and finding the case position of the variable to be customized;

[0034] S3: Find the same parameter value as the row query index, use the row of the parameter value as a test data row, and the variable values ​​of the test data row correspond to the variable names at the top of the assignment table;

[0035] S4: Perform custom variable execution on the test data r...

Embodiment 2

[0042] like figure 2 As shown, this embodiment provides a system for batching custom variables, including:

[0043] Form information transfer module 1, for importing case information into the assignment form, so that the case information of the assignment form includes the file location, file path, worksheet number and case name of the case, and the case name is set as the row query index , and set the variable name of the variable to be customized at the top of the assignment table;

[0044] The parameter name parsing module 2 is used to analyze the parameter name of the incoming case information, locate the form tab of the case information, and find the case position of the variable to be customized;

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a method and a system for customizing variables in batches. The method comprises the following steps: establishing an assignment table, importing case information into the assignment table, setting case names as line query indexes, and setting variable names of to-be-customized variables at the top end of the assignment table; analyzing the parameter names of the introducedcase information, positioning table tabs of the case information, and finding out case positions of to-be-customized variables; searching a parameter value which is the same as the line query index,taking a line of the parameter value as a test data line, and enabling variable values of the test data line to respectively correspond to variable names at the top end of the assignment table; and executing self-defined variables on the test data line, and circularly assigning all variable values of the test data line to variable names at the top end of the assignment table. According to the embodiment of the invention, the data separation of the test data and the automatic script is realized, the variable names can be quickly subjected to batch parameterized assignment, and the efficiency ofcustom variable assignment is remarkably improved.

Description

technical field [0001] The invention relates to the field of automated testing, in particular to a method and system for batching self-defined variables. Background technique [0002] At present, in the process of automated testing, since the test data is included in the automated script, there are the following problems in the automated script writing process: First: the workload of adding scripts is heavy, and there are many cases corresponding to the same interface or interface And the process is similar, the interface itself has many fields. In the process of parameterizing the fields, the repetitive work of writing automation scripts is very heavy, and the readability of the results is poor. Missing, there are great difficulties in troubleshooting; third: the cost of maintaining scripts is high, and the functions need to be optimized. When fields are added, deleted, or field values ​​​​change, maintaining the corresponding interface automation scripts involves many case...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F11/36G06F11/22G06F16/22G06F16/24
CPCG06F11/3684G06F11/2273G06F16/22G06F16/24
Inventor 潘琦杨婧徐梅兰
Owner SUNING CLOUD COMPUTING CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products