Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Test script execution method and device, computer equipment and storage medium

A technology of test scripts and execution methods, which is applied in computing, software testing/debugging, error detection/correction, etc., can solve the problems of test script failure, poor test script versatility, and data-driven testing relying on the programming skills of testers, so as to improve Versatility and scalability, the effect of reducing the difficulty of writing

Pending Publication Date: 2021-06-29
GUANGZHOU HUYA TECH CO LTD
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

The implementation of data-driven testing is too dependent on the programming skills of testers
In addition, many data-driven test scripts contain hard-coded data, for example, identification strings in window components or key data in different test environments. Invalid due to changes, poor versatility of test scripts

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
  • Test script execution method and device, computer equipment and storage medium
  • Test script execution method and device, computer equipment and storage medium
  • Test script execution method and device, computer equipment and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0028] figure 1 It is a flow chart of a method for executing a test script provided in Embodiment 1 of the present invention. This embodiment is applicable to the case of performing a use case test on a software product to be tested by executing a test script. The method can be executed by an execution device of a test script, which can be implemented by software and / or hardware, and generally can be integrated in computer equipment for providing automated test services (for example, various intelligent terminals or servers Wait). Such as figure 1 As shown, the method includes:

[0029] S110. Identify at least one target system component included in the target test script.

[0030] Wherein, the target test script refers to an executable file used for functional testing of a certain application software. In the target test script, references or declarations to one or more system components are included.

[0031] In this embodiment, one or more system components may be pre-...

Embodiment 2

[0054] figure 2 It is a flow chart of an execution method of a test script in Embodiment 2 of the present invention. This embodiment is refined based on the above-mentioned embodiment. The use case parameter processing logic corresponding to the system component executes the target test script, which is embodied as: sequentially obtaining a script statement included in the target test script as the current execution statement; detecting whether the target system component is included in the current execution statement: if , then obtain the use case parameters and use case parameter processing logic that match the detected target system components; generate jump execution code according to the obtained use case parameters and use case parameter processing logic, and execute the jump execution code; return execution to obtain in sequence A script statement included in the target test script is used as the operation of the current execution statement until all the script stateme...

Embodiment 3

[0078] image 3 It is a flow chart of an execution method of a test script in Embodiment 3 of the present invention. This embodiment is refined based on the above embodiments. In this embodiment, the generation rules of each parameter obtained by using the query are specifically defined. A specific implementation manner of generating use case parameters corresponding to each target system component, correspondingly, the method of this embodiment may include:

[0079] S310. Identify at least one target system component included in the target test script.

[0080] S320. Acquire one target system component in sequence as the current processing component.

[0081] S330. Generate target use case parameters corresponding to the current processing component according to the parameter generation rule corresponding to the current processing component.

[0082] S340. Write the target use case parameters into a target file, and establish a correspondence between the target use case param...

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 embodiment of the invention discloses a test script execution method and device, computer equipment and a storage medium. The method comprises the following steps: identifying at least one target system component included in a target test script; querying a system component rule base, obtaining parameter generation rules corresponding to the target system components, and generating case parameters corresponding to the target system components by using the queried parameter generation rules; and executing the target test script according to the generated use case parameters and the use case parameter processing logic corresponding to the target system components. According to the technical scheme, a reliable new mode for separating the test script from the use case parameters is provided, the writing difficulty of the test script is reduced, and the universality and expandability of the test script are improved.

Description

technical field [0001] The embodiments of the present invention relate to the technical field of software testing, and in particular, to an execution method, device, computer equipment and storage medium of a test script. Background technique [0002] In the process of automated testing, data-driven testing is generally used to separate test scripts from use case parameters to enhance the maintainability and reusability of test scripts. [0003] Data-driven testing is to allow professional testers to write scripts by separating test scripts from use case parameters, so that people without programming skills can also maintain the use case parameters of test scripts. In this data-driven test mode, because the use case parameters and test scripts are stored separately, the workload of professional testers when maintaining scripts can be reduced, and only the test logic itself needs to be considered. [0004] The inventor found in the process of realizing the present invention ...

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
IPC IPC(8): G06F11/36
CPCG06F11/3688G06F11/3684Y02D10/00
Inventor 王玺陈景雄
Owner GUANGZHOU HUYA TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products