CN113515455A - Automatic test method and system - Google Patents

Automatic test method and system Download PDF

Info

Publication number
CN113515455A
CN113515455A CN202110798246.8A CN202110798246A CN113515455A CN 113515455 A CN113515455 A CN 113515455A CN 202110798246 A CN202110798246 A CN 202110798246A CN 113515455 A CN113515455 A CN 113515455A
Authority
CN
China
Prior art keywords
test
target
test object
unit
storage path
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110798246.8A
Other languages
Chinese (zh)
Other versions
CN113515455B (en
Inventor
李晓健
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huayun Data Holding Group Co Ltd
Original Assignee
Huayun Data Holding Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huayun Data Holding Group Co Ltd filed Critical Huayun Data Holding Group Co Ltd
Priority to CN202110798246.8A priority Critical patent/CN113515455B/en
Publication of CN113515455A publication Critical patent/CN113515455A/en
Application granted granted Critical
Publication of CN113515455B publication Critical patent/CN113515455B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/3644Software debugging by instrumenting at runtime

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses an automatic test method and a system, wherein the method comprises the following steps: analyzing the target test case to analyze an execution task in the target test case; triggering a test object of the interface to be tested based on the execution task so as to mark an interface element corresponding to the test object as an identification variable; traversing the dictionary variables to obtain test object name files corresponding to the identification variables, and inputting the test object name files into a data matching unit to obtain test object file storage paths corresponding to the test object name files, wherein the data matching unit stores the object, the object name files and the mapping relation of the object file storage paths; and downloading the target object based on the test object file storage path to determine whether the interface to be tested has an area matched with the target object. The invention solves the problems of lower test efficiency and poorer effect caused by the need of matching the corresponding area of the target object step by step according to the hierarchical directory in the prior art.

Description

Automatic test method and system
Technical Field
The invention relates to the technical field of software testing, in particular to an automatic testing method and system.
Background
In the internet software development company, the agile development mode is widely applied, and the position of the automated test in the software testing industry gradually rises along with the popularization and development of the agile development in the software industry. In the market where agile development is the main way, the traditional manual test cannot meet and respond to the changes brought by agile development, the test needs progress with time, and the automatic test is very important.
The automatic test is to simulate manual operation by some automatic test tools to verify the result and complete the whole test process. The automatic test belongs to the test but is not limited to the test, and the steps with high manual repeatability, mechanization and easy error caused by human beings in the software development process are realized automatically, so that the manual work of the work is released to finish the work which cannot be replaced, has growth or creativity.
The traditional UI automatic test system relies on Selenium as a core and simulates the actual operation of a user, such as sending (such as clicking, inputting, dragging and the like) an operation instruction to a browser. However, in the testing process of the conventional UI automatic testing system, the source code of the testing web page needs to be traversed to search the area matched with the testing object in a manner of matching the hierarchical directory step by step, which results in extremely low testing efficiency and poor effect. Meanwhile, the Selenium frame code is implanted into the test script, and the code maintenance mode is single and rigid due to the fact that the Selenium frame code does not have the same maintenance entrance; moreover, interface elements are searched in various ways in the Selenium framework, so that certain requirements are met for a software front-end page framework and testing personnel.
In view of the above, there is a need to improve the UI automation test method in the prior art to solve the above problems.
Disclosure of Invention
The invention aims to disclose an automatic testing method and system, which are used for solving the problems of low testing efficiency and poor effect caused by the fact that areas corresponding to target objects need to be matched step by step according to hierarchical directories in the prior art.
In order to solve the technical problem, the invention is realized as follows:
in a first aspect, an automated testing method is provided, including:
analyzing the target test case to analyze an execution task in the target test case;
triggering a test object of the interface to be tested based on the execution task so as to mark an interface element corresponding to the test object as an identification variable;
traversing dictionary variables to obtain test object name files corresponding to the identification variables, and inputting the test object name files into a data matching unit to obtain test object file storage paths corresponding to the test object name files, wherein the data matching unit stores objects, object name files and mapping relations of the object file storage paths;
and downloading a target object based on the test object file storage path to determine whether an interface to be tested has an area matched with the target object.
In a second aspect, there is also an automated test system, comprising:
the test unit is used for analyzing the target test case to analyze an application scene and an execution task in the target test case, and triggering a test object of an interface to be tested based on the execution task to mark an interface element corresponding to the test object as an identification variable;
the obtaining unit is used for traversing the dictionary variables to obtain the test object name files corresponding to the identification variables;
the data matching unit receives the test object name file to obtain a test object file storage path corresponding to the test object name file, and the data matching unit stores the mapping relation among the object, the object name file and the object file storage path;
and the test unit downloads a target object based on the test object file storage path to determine whether an area matched with the target object exists in the interface to be tested.
In a third aspect, a computer-readable medium is provided, wherein computer program instructions are stored in the computer-readable medium, and when the computer program instructions are read and executed by a processor, the computer program instructions perform the steps of the method according to the first aspect.
In a fourth aspect, there is also provided a terminal device comprising a processor, a memory and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the steps of the method according to the first aspect.
Compared with the prior art, the invention has the following beneficial effects:
the automatic test method comprises the steps of firstly analyzing a target test case, triggering a test object of an interface to be tested according to an analyzed execution task to mark an interface element corresponding to the test object as an identification variable, then obtaining a test object name file corresponding to the identification variable by traversing a dictionary variable, and inputting the test object name file into a data matching unit to obtain a test object file storage path corresponding to the test object name file, so that the target object is downloaded according to the test object file storage path to determine whether the area matched with the target object exists in the interface to be tested. Therefore, the method and the device can directly search the area matched with the target object on the interface to be tested according to the target object downloaded from the file storage path of the test object, and compared with the scheme that the webpage source code to be tested needs to be traversed to gradually match the area corresponding to the target object according to the hierarchical directory in the prior art, the method and the device can quickly and effectively test whether the area matched with the target object exists on the interface to be tested, so that the test efficiency and effect are greatly improved.
Meanwhile, the invention searches the area matched with the target object on the interface to be tested in an automatic testing mode, thereby solving the problem that searching the interface element through the Selenium frame has certain requirements on the software front-end page framework and testing personnel in the prior art. In addition, the invention realizes unified management and maintenance of the name files and the storage paths corresponding to different objects through the mapping relation among the storage objects, the object name files and the storage paths of the object files of the data matching unit, thereby solving the problems that the code maintenance mode is single and the test efficiency is influenced because a unified maintenance entry is not provided in the Selenium frame implantation test script in the prior art.
Drawings
FIG. 1 is a schematic flow diagram of an automated testing method of one embodiment of the present invention;
FIG. 2 is a block diagram of an exemplary automated test system according to an embodiment of the present invention;
FIG. 3 is a schematic flow chart diagram of an automated testing method according to another embodiment of the present invention;
FIG. 4 is a schematic flow chart diagram of an automated testing method according to yet another embodiment of the present invention;
FIG. 5 is a schematic flow chart diagram of an automated testing method according to yet another embodiment of the present invention;
FIG. 6 is a schematic flow chart diagram of an automated testing method according to yet another embodiment of the present invention;
FIG. 7 is a topological diagram of a computer-readable medium according to the present invention.
Detailed Description
The present invention is described in detail with reference to the embodiments shown in the drawings, but it should be understood that these embodiments are not intended to limit the present invention, and those skilled in the art should understand that functional, methodological, or structural equivalents or substitutions made by these embodiments are within the scope of the present invention.
The applicant intends to bring the invention to the details of the specific technical solutions contained in the present invention by showing several examples below.
The first embodiment is as follows:
fig. 1 is a schematic flow chart of an automated testing method (hereinafter, may be referred to as "method" or "testing method") according to an embodiment of the present invention, and the method of the present embodiment is implemented based on an Airtest framework to solve the problem of low testing efficiency and poor effect of a UI automated testing scheme in the prior art due to the need of matching areas corresponding to target objects step by step according to a hierarchical directory. As explained in conjunction with fig. 1 and 2, the method may include:
and 102, analyzing the target test case to analyze the execution task in the target test case.
It should be noted that a single test case is generally saved in a feature file format, and each feature file includes an application scenario scienio and a plurality of execution tasks or execution steps setp. For example, one of the Feature files is represented as a Feature file: given logic to Haihe web; when create a "KVM" machine; the n I see a "KVM" machine sequence stream ecreate. According to the input parameter values, the execution of a single test case or a plurality of test cases can be determined.
Referring to fig. 3, before analyzing the target test case, the operation further includes:
and 101, responding to the first target input, selecting a target test case, and transmitting the target test case to the test unit so as to analyze the target test case through the test unit.
Specifically, selecting a target test case in response to a first target input includes: and responding to the first target input, receiving the test parameters transmitted by the user terminal, and selecting the target test case based on the content of the test case in the test parameters. The term "user side" in this embodiment refers to a person or an executable program (e.g., a robot program) capable of issuing a control command, or a physical device or a command sender including the executable program.
The first target input refers to an operation of triggering or starting the test method of the embodiment. The test parameters generally include software system configuration information, test case content, test execution modes (including synchronous execution mode or asynchronous execution mode), test script configuration information, and the like. The problem of project iteration can be solved through the configuration information of the software system, and the supported projects are configured in advance so that the supported project names can be directly input when the test operation is executed. And, for the case that different versions exist for the same project (e.g. Taobao version 1.0, 2.0, etc., and Jingdong version 0.1, 0.2, etc.), configuring each version of the project through the software system configuration information to perform the test operation on the project of the corresponding version.
Before parsing the target test case and after selecting the target test case based on the content of the test case in the test parameters, the operations further include: and selecting a test node based on the test script configuration information in the test parameters so as to load the target test case into the test node. The test node may be a local server or device, or may be a remote server or device.
It should be noted that, continuing with the description of fig. 3, before step 101, the method may further include:
and step 100, generating a mapping relation among the object, the object name file and the object file storage path in response to the second target input, and sending the mapping relation among the object, the object name file and the object file storage path to the data matching unit 202 for storage. The second target input refers to an operation of intercepting or selecting a test object (or a test area) in the interface to be tested.
In a specific embodiment, the user obtains a "login" button picture (i.e., a test object) by means of interception or selection by a screenshot tool, and saves the obtained picture as a login.png file (i.e., an object name file), so as to store the saved login.png file and the corresponding test object file storage path of "/root/img/login.pgn" into the picture library of the data matching unit 202.
Referring to fig. 2, the interface to be tested 100 (specifically, the interface to be tested 100a, the interface to be tested 100b … or the interface to be tested 100n) is configured as a web page, a static website, a system desktop, or the like, which is accessed remotely or online.
And 104, triggering the test object 101 of the interface to be tested 100 based on the execution task, so as to mark the interface element corresponding to the test object as an identification variable 201 (namely login).
In the test method of this embodiment, after the test unit 201 analyzes the target test case, a plurality of execution tasks (or test steps) are obtained, where one execution task is to mark an interface element of the test object as the identification variable 201 through the test unit 201. Such as by clicking on a "login" button (i.e., test object) of the interface to be tested, causing the test unit 201 to mark the interface element as an identification variable login.
As shown in fig. 4, after step 104 and before step 106, comprising:
and 105, transmitting the identification variable to a matcher 400, wherein the matcher 400 comprises a dictionary variable, and the dictionary variable stores the mapping relation between the identification variable 201 and the test object name file.
Step 106, traversing the dictionary variables to obtain the test object name file corresponding to the identification variable, and inputting the test object name file into the data matching unit 300 to obtain the test object file storage path corresponding to the test object name file, where the data matching unit stores the object, the object name file, and the mapping relationship of the object file storage path. In the matching process, the data matching unit 300 queries a value (i.e., a storage path of the test object file) matched with the test object name file as a key value. And if the test object name file is input into the data matching unit and the corresponding test object file storage path is not obtained, the query result is absent or wrong.
Wherein matcher 400 is configured as a py file. After the interface to be tested is triggered, a core component in Airtest is used, a test object name file corresponding to a preset object is obtained through a touch () function according to a relationship before key-value, and a corresponding test object file storage path is searched by inputting the test object name file to the data matching unit 202.
And 108, downloading the target object based on the file storage path of the test object to determine whether the area matched with the target object exists in the interface to be tested.
The automatic testing method of the embodiment includes the steps of firstly analyzing a target test case, triggering a test object of an interface to be tested according to an analyzed execution task to mark an interface element corresponding to the test object as an identification variable, then obtaining a test object name file corresponding to the identification variable by traversing a dictionary variable, and inputting the test object name file into a data matching unit to obtain a test object file storage path corresponding to the test object name file, so that the target object is downloaded according to the test object file storage path to determine whether the interface to be tested has an area matched with the target object. Therefore, in the embodiment, the target object downloaded according to the file storage path of the test object is directly searched for the area matched with the target object on the interface to be tested, and compared with a scheme that the webpage source code to be tested needs to be traversed to gradually match the area corresponding to the target object according to the hierarchical directory in the prior art, the embodiment can quickly and effectively test whether the area matched with the target object exists on the interface to be tested, so that the test efficiency and effect are greatly improved.
Meanwhile, the embodiment searches for the area matched with the target object on the interface to be tested in an automatic testing mode, so that the problem that searching for interface elements through a Selenium frame has certain requirements on a software front-end page framework and testing personnel in the prior art can be solved. In addition, in the embodiment, unified management and maintenance of the name files and the storage paths corresponding to different objects are realized through the mapping relationship among the storage objects, the object name files and the storage paths of the object files of the data matching unit, so that the problems that a code maintenance mode is single and test efficiency is influenced because a unified maintenance entry is not provided in a Selenium framework implantation test script in the prior art are solved.
As shown in fig. 5, in the present embodiment, after step 106 and before step 108, further includes:
and step 107, transmitting the mapping relation between the storage path of the test object file and the identification variable to the test unit 201, so that the mapping relation between the storage path of the test object file and the identification variable is transmitted to the storage unit 500 for storage through the test unit 201. The storage unit 500 is configured with a memory 401 and a plurality of disks (such as the disk 402 and the disk 403), and the mapping relationship between a plurality of sets of test object file storage paths ("/root/img/log.pgn") and corresponding identification variables 201 (i.e. log) is sent to the memory 401, the disk 402 and the disk 403 respectively for storage through the test unit 200.
Further, as shown in fig. 6, the operations after step 107 and before step 108 further include:
step 1071, obtaining the mapping relationship between the storage path of the test object file stored in the storage unit 500 and the identification variable through the test unit 201.
Step 1072, the test unit 201 parses the test object file storage path to query the target object based on the parsed test object file storage path.
In this embodiment, after the test object file storage path corresponding to the identification variable is queried by the data matching unit 300, the mapping relationship between different sets of identification variables and the corresponding test object file storage path is stored in the storage unit 500 by the test unit 200, and the mapping relationship between the identification variable stored in the storage unit 500 and the test object file storage path is obtained by the test unit 200, so as to query the target object based on the test object file storage path. Therefore, in the automated testing method of the embodiment, for different test cases, the matcher 400 and the data matching unit 300 query the test object name file corresponding to the test object and the test object file storage path, and the region matched with the target object can be directly searched on the interface to be tested, and the region corresponding to the target object does not need to be matched step by step according to the hierarchical directory, so that the efficiency of testing different test cases is greatly improved.
In addition, in the automated testing method of this embodiment, after all the test cases are executed, the test unit 200 automatically collects the execution logs corresponding to all the test cases, scans each test case log, and stores the test case log into the system variable to generate the statistical report, so as to feed back the statistical report to the designated personnel.
In a specific embodiment of this embodiment, referring to fig. 2, a specific process of the automated testing method may be:
step (1): a "login" button picture (i.e., a test object) is obtained by means of interception or selection by a screenshot tool, and is saved as a login.png file (i.e., an object name file), so that the saved login.png file and a corresponding test object file storage path are stored as "/root/img/login.pgn" in the picture library of the data matching unit 202.
Step (2): selecting a test case, transmitting the test case to the test unit 200 in a network or other manners, analyzing the test case through the test unit 200, triggering the test object 101 of the interface 100 to be tested according to the execution task obtained after analysis, and marking the interface element corresponding to the test object as an identification variable 201 (i.e., logic).
And (3): the identification variables are transmitted to the matcher 400, and the dictionary variables are traversed by the matcher 400, so that the identification variables (logins) are used as key values of the dictionary to query the test object name file matched with the identification variables (logins).
And (4): the queried test object name file is transmitted to the data matching unit 300, and the test object name file is used as a key value to query a test object file storage path matched with the test object name file.
And (5): the mapping relationship between the storage path of the test object file and the identification variable is transmitted to the test unit 201, so that the mapping relationship between the storage path of the test object file and the identification variable is transmitted to the storage unit 500 for storage through the test unit 201 in step (6).
And (7): the test unit 201 obtains a mapping relationship between the test object file storage path stored in the storage unit 500 and the identification variable, so as to parse the test object file storage path.
And (8): the analyzed storage path of the test object file is fed back to the interface to be tested 100, so that a corresponding picture (namely a target object) is downloaded through the storage path of the test object file, and the downloaded picture is compared with the interface to be tested through an image analysis technology. The specific comparison process includes analyzing the picture step by an image analysis technology to obtain a plurality of groups of characteristic values, connecting the software system 10 in a network remote manner according to the characteristic values to perform visual characteristic value comparison, and obtaining a comparison result through an algorithm, wherein the comparison result is generally that the picture (namely the target object) downloaded based on the file storage path of the test object exists or does not exist in the interface 100 to be tested. The characteristic value is compared with the granularity and can be preset so as to improve the identification accuracy. In this embodiment, the process of comparing the downloaded picture with the interface to be tested is well known in the art, and is not described again.
Compared with the scheme that the area matched with the picture is directly searched on the interface 100 to be tested according to the picture downloaded from the file storage path of the test object, the automatic test method of the embodiment needs to traverse the source code of the webpage to be tested to match the area corresponding to the target object step by step according to the hierarchical directory, and can quickly and effectively test whether the area matched with the target object exists on the interface to be tested, so that the test efficiency and effect are greatly improved.
Example two:
as shown in fig. 2, the present embodiment further provides an automated testing system, which includes: the testing unit 201 is configured to analyze the target test case to analyze an execution task in the target test case, and trigger the test object 101 of the interface 100 to be tested based on the execution task to mark an interface element corresponding to the test object as an identification variable; the matcher 400 is configured to traverse the dictionary variables to obtain test object name files corresponding to the identification variables; the data matching unit 300 is used for receiving the test object name file to obtain a test object file storage path corresponding to the test object name file, and the data matching unit 300 is used for storing the object, the object name file and the mapping relation of the object file storage path; the test unit 201 downloads the target object based on the test object file storage path to determine whether the interface 100 to be tested has an area matching the target object.
The automatic test system of this embodiment first analyzes the target test case, and triggers the test object 101 of the interface to be tested 100 according to the analyzed execution task, so as to mark the interface element corresponding to the test object as the identification variable, then obtains the test object name file corresponding to the identification variable by traversing the dictionary variable, and obtains the test object file storage path corresponding to the test object name file by inputting the test object name file into the data matching unit 300, thereby downloading the target object according to the test object file storage path, so as to determine whether the interface to be tested 100 has the area matching with the target object. Therefore, in the embodiment, the target object downloaded according to the file storage path of the test object is directly searched for the area matched with the target object on the interface to be tested, and compared with the scheme that the webpage source code to be tested needs to be traversed to gradually match the area corresponding to the target object according to the hierarchical directory in the prior art, the method and the device can quickly and effectively test whether the area matched with the target object exists on the interface to be tested, so that the test efficiency and effect are greatly improved.
Meanwhile, the embodiment searches for the area matched with the target object on the interface to be tested in an automatic testing mode, so that the problem that searching for interface elements through a Selenium frame has certain requirements on a software front-end page framework and testing personnel in the prior art can be solved. In addition, in the present embodiment, the data matching unit 300 stores the mapping relationship between the object, the object name file, and the object file storage path, so as to implement unified management and maintenance on the name file and the storage path corresponding to different objects, thereby solving the problem that the test efficiency is affected due to a single code maintenance manner caused by that the Selenium framework embedded test script in the prior art does not have a unified maintenance entry.
The automated testing system of this embodiment further includes a storage unit 500, configured to receive and store the mapping relationship between the test object file storage path and the identification variable transmitted by the testing unit.
In this embodiment, after the test object file storage path corresponding to the identification variable is queried by the data matching unit 300, the mapping relationship between different sets of identification variables and the corresponding test object file storage path is stored in the storage unit 500 by the test unit 200, and the mapping relationship between the identification variable stored in the storage unit 500 and the test object file storage path is obtained by the test unit 200, so as to query the target object based on the test object file storage path. Therefore, in the automated testing method of the embodiment, for different test cases, the matcher 400 and the data matching unit 300 query the test object name file corresponding to the test object and the test object file storage path, and the region matched with the target object can be directly searched on the interface to be tested, and the region corresponding to the target object does not need to be matched step by step according to the hierarchical directory, so that the efficiency of testing different test cases is greatly improved.
Please refer to the description of the first embodiment, and detailed descriptions thereof are omitted.
Example three:
referring to FIG. 7, the present embodiment discloses an embodiment of a computer readable medium 700. The computer readable medium 700 may be disposed in whole or in part in a physical form of a computer, server, cluster server, or data center.
In the embodiment, a computer-readable medium 700 is provided, in which computer program instructions 701 are stored in the computer-readable medium 700, and when the computer program instructions 701 are read and executed by a processor 702, the steps in the product attribute updating method according to the embodiment are executed.
Alternatively, the computer-readable medium 700 may be configured as a server and the server is run on a physical device that constructs a private cloud, a hybrid cloud, or a public cloud. Meanwhile, the computer-readable medium 800 may also be configured as a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an electrically Erasable Read-Only Memory (EEPROM), and the like.
The computer readable medium 700 is used for storing a program, and the processor 702 receives an execution instruction to execute a product property updating method disclosed in an embodiment.
Meanwhile, the processor 702 of the present embodiment may be an integrated circuit chip having signal processing capability. The Processor 702 may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor.
For a technical solution of a computer-readable medium disclosed in this embodiment that is the same as that in embodiment one and/or embodiment two, please refer to embodiment one and/or embodiment two, which is not described herein again.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable medium. Based on such understanding, the technical solution of the present invention may be substantially implemented or contributed by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, a network device, or the like) or a processor (processor) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Preferably, an embodiment of the present invention further provides a terminal device, which may include a processor, a memory, and a computer program stored in the memory and capable of running on the processor, where the computer program, when executed by the processor, implements the processes of the method embodiments shown in fig. 1 and fig. 3 to fig. 6, and can achieve the same technical effects, and details are not repeated here to avoid repetition.
The above-listed detailed description is only a specific description of a possible embodiment of the present invention, and they are not intended to limit the scope of the present invention, and equivalent embodiments or modifications made without departing from the technical spirit of the present invention should be included in the scope of the present invention.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned.
Furthermore, it should be understood that although the present description refers to embodiments, not every embodiment may contain only a single embodiment, and such description is for clarity only, and those skilled in the art should integrate the description, and the embodiments may be combined as appropriate to form other embodiments understood by those skilled in the art.

Claims (10)

1. An automated testing method is applied to a testing service system and is characterized by comprising the following steps:
analyzing the target test case to analyze an execution task in the target test case;
triggering a test object of the interface to be tested based on the execution task so as to mark an interface element corresponding to the test object as an identification variable;
traversing dictionary variables to obtain test object name files corresponding to the identification variables, and inputting the test object name files into a data matching unit to obtain test object file storage paths corresponding to the test object name files, wherein the data matching unit stores objects, object name files and mapping relations of the object file storage paths;
and downloading a target object based on the test object file storage path to determine whether an interface to be tested has an area matched with the target object.
2. The automated testing method of claim 1, further comprising, prior to downloading a target object based on the test object file storage path:
and transmitting the mapping relation between the test object file storage path and the identification variable to a test unit, so that the mapping relation between the test object file storage path and the identification variable is transmitted to a storage unit for storage through the test unit.
3. The automated testing method of claim 2, wherein before downloading the target object based on the test object file storage path, and after sending the mapping relationship between the test object file storage path and the identification variable to the storage unit for storage by the testing unit, the method comprises:
acquiring a mapping relation between a test object file storage path stored in the storage unit and the identification variable through the test unit;
and analyzing the storage path of the test object file through the test unit so as to query the target object based on the analyzed storage path of the test object file.
4. The automated testing method of claim 1, before traversing dictionary variables to obtain the test object name file corresponding to the identification variable, and after recording the interface element corresponding to the test object as the identification variable, comprising:
and transmitting the identification variable to a matcher, wherein the matcher comprises a dictionary variable, and the dictionary variable stores the mapping relation between the identification variable and the test object name file.
5. The automated testing method of claim 1, wherein prior to parsing the target test case, comprising:
and responding to the first target input to select a target test case, and transmitting the target test case to a test unit so as to analyze the target test case through the test unit.
6. The automated testing method of claim 5, wherein selecting a target test case in response to a first target input comprises:
and responding to the first target input, receiving the test parameters transmitted by the input end, and selecting the target test case based on the content of the test case in the test parameters.
7. The automated testing method of claim 6, wherein before parsing the target test case and after selecting the target test case based on the content of the test case in the test parameters, further comprising:
and selecting a test node based on the test script configuration information in the test parameters so as to load the target test case into the test node.
8. The automated testing method of claim 5, prior to selecting a target test case in response to a target input, comprising:
and responding to the second target input to generate the mapping relation among the object, the object name file and the object file storage path, and sending the mapping relation among the object, the object name file and the object file storage path to the data matching unit for storage.
9. An automated test system, comprising:
the test unit is used for analyzing the target test case to analyze an execution task in the target test case, and triggering a test object of an interface to be tested based on the execution task to mark an interface element corresponding to the test object as an identification variable;
the matcher is used for traversing dictionary variables to acquire a test object name file corresponding to the identification variable;
the data matching unit receives the test object name file to obtain a test object file storage path corresponding to the test object name file, and the data matching unit stores the mapping relation among the object, the object name file and the object file storage path;
and the test unit downloads a target object based on the test object file storage path to determine whether an area matched with the target object exists in the interface to be tested.
10. The automated test system of claim 9, further comprising:
and the storage unit is used for receiving and storing the mapping relation between the test object file storage path transmitted by the test unit and the identification variable.
CN202110798246.8A 2021-07-15 2021-07-15 Automatic test method and system Active CN113515455B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110798246.8A CN113515455B (en) 2021-07-15 2021-07-15 Automatic test method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110798246.8A CN113515455B (en) 2021-07-15 2021-07-15 Automatic test method and system

Publications (2)

Publication Number Publication Date
CN113515455A true CN113515455A (en) 2021-10-19
CN113515455B CN113515455B (en) 2024-02-06

Family

ID=78067103

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110798246.8A Active CN113515455B (en) 2021-07-15 2021-07-15 Automatic test method and system

Country Status (1)

Country Link
CN (1) CN113515455B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116187270A (en) * 2023-05-04 2023-05-30 中科亿海微电子科技(苏州)有限公司 Method and device for testing identifiers in automatic verification schematic diagram

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110750441A (en) * 2019-09-06 2020-02-04 平安健康保险股份有限公司 Automatic testing method and device, computer equipment and storage medium
CN111897740A (en) * 2020-08-24 2020-11-06 北京字节跳动网络技术有限公司 User interface testing method and device, electronic equipment and computer readable medium
WO2020233331A1 (en) * 2019-05-20 2020-11-26 深圳壹账通智能科技有限公司 User interface automated testing method and apparatus, and computer-readable storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020233331A1 (en) * 2019-05-20 2020-11-26 深圳壹账通智能科技有限公司 User interface automated testing method and apparatus, and computer-readable storage medium
CN110750441A (en) * 2019-09-06 2020-02-04 平安健康保险股份有限公司 Automatic testing method and device, computer equipment and storage medium
CN111897740A (en) * 2020-08-24 2020-11-06 北京字节跳动网络技术有限公司 User interface testing method and device, electronic equipment and computer readable medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116187270A (en) * 2023-05-04 2023-05-30 中科亿海微电子科技(苏州)有限公司 Method and device for testing identifiers in automatic verification schematic diagram
CN116187270B (en) * 2023-05-04 2023-08-22 中科亿海微电子科技(苏州)有限公司 Method and device for testing identifiers in automatic verification schematic diagram

Also Published As

Publication number Publication date
CN113515455B (en) 2024-02-06

Similar Documents

Publication Publication Date Title
US10362050B2 (en) System and methods for scalably identifying and characterizing structural differences between document object models
US10454969B2 (en) Automatic generation of low-interaction honeypots
JP5425699B2 (en) Information processing apparatus, test case generation method, program, and recording medium
US10210240B2 (en) Systems and methods for code parsing and lineage detection
JP7108039B2 (en) Visual and execution template recommendations to enable system-wide control and automation of data exploration
CN106293891B (en) Multidimensional investment index monitoring method
US9311345B2 (en) Template based database analyzer
US9706005B2 (en) Providing automatable units for infrastructure support
CN113220907B (en) Construction method and device of business knowledge graph, medium and electronic equipment
CN111190827A (en) Interface automation test method and device, storage medium and electronic equipment
CN107391528B (en) Front-end component dependent information searching method and equipment
Koçi et al. A data-driven approach to measure the usability of web APIs
CN107038117B (en) Web automatic testing method based on definition-reference between event processing functions
CN106682210B (en) Log file query method and device
CN113515455A (en) Automatic test method and system
CN114253995A (en) Data tracing method, device, equipment and computer readable storage medium
US10223086B2 (en) Systems and methods for code parsing and lineage detection
CN114385148A (en) Method, device, equipment and storage medium for realizing linkage function
CN117632710A (en) Method, device, equipment and storage medium for generating test code
CN117407312A (en) Application testing method, device, computer equipment and storage medium
US10003492B2 (en) Systems and methods for managing data related to network elements from multiple sources
CN110580170A (en) software performance risk identification method and device
CN105912573A (en) Data updating method and data updating device
CN115344661A (en) Equipment halt diagnosis method and device, electronic equipment and storage medium
CN114297057A (en) Design and use method of automatic test case

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant