CN113515455B - Automatic test method and system - Google Patents

Automatic test method and system Download PDF

Info

Publication number
CN113515455B
CN113515455B CN202110798246.8A CN202110798246A CN113515455B CN 113515455 B CN113515455 B CN 113515455B CN 202110798246 A CN202110798246 A CN 202110798246A CN 113515455 B CN113515455 B CN 113515455B
Authority
CN
China
Prior art keywords
test
target
unit
test object
file storage
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.)
Active
Application number
CN202110798246.8A
Other languages
Chinese (zh)
Other versions
CN113515455A (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

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 system, wherein the method comprises the following steps: analyzing the target test case to analyze out the execution task in the target test case; triggering a test object of an interface to be tested based on an execution task, so as to record interface elements corresponding to the test object as identification variables; traversing dictionary variables to obtain test object name files corresponding to the identification variables, 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, and storing the mapping relation among objects, the object name files and the object file storage paths in the data matching unit; 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 method solves the problems of low testing efficiency and poor effect caused by the fact that the areas corresponding to the target objects are required to be matched 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
At present, the Internet software development company has a agile development mode which is widely applied, and along with the popularization and development of agile development in the software industry, the position of automatic test in the software test industry is gradually rising. Under the market of agile development of the lane, the traditional manual test cannot meet and respond to the change brought by agile development, the test needs are advanced with time, and the automatic test is particularly important.
The automatic test is to simulate the manual operation by some automatic test tools to verify the result so as to complete the whole test process. The automatic test belongs to the test, but is not limited to the test, and the steps of high manual repeatability, mechanization and human error easily in the software development process are realized through automation, so that the automation can not replace, grow or creative work by releasing the manpower of the work.
The traditional UI automatic test system relies on the Selenium as a core to simulate the actual operation of a user, such as sending (e.g. clicking, inputting, dragging, etc.) operation instructions to a browser. However, in the conventional UI automation test system, the source code of the test web page needs to be traversed to find the region matched with the test object in a hierarchical directory step-by-step matching manner, so that the test efficiency is extremely low and the effect is poor. Meanwhile, the Selenium frame code is implanted into the test script, and the code maintenance mode is single and dead due to the fact that the same maintenance inlet is not formed; in addition, the interface element searching mode in the Selenium framework is various, so that the software front-end page framework and the testers have certain requirements.
In view of this, there is a need for improvements in the art for UI automated test methods that address the above-described issues.
Disclosure of Invention
The invention aims to disclose an automatic test method and an automatic test system, which are used for solving the problems of lower test efficiency and poor effect caused by the fact that areas corresponding to target objects are required to be matched step by step according to a hierarchical directory in the prior art.
In order to solve the technical problems, the invention is realized as follows:
in a first aspect, an automated testing method is provided, comprising:
analyzing the target test case to analyze out the execution task in the target test case;
triggering a test object of an interface to be tested based on the execution task, so as to record interface elements corresponding to the test object as identification variables;
traversing dictionary variables to obtain test object name files corresponding to the identification variables, 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, and storing the mapping relation among objects, the object name files and the object file storage paths by the data matching unit;
and downloading a target object based on the test object file storage path so as to determine whether an area matched with the target object exists on the interface to be tested.
In a second aspect, an automated testing 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, triggering a test object of an interface to be tested based on the execution task, and marking interface elements corresponding to the test object as identification variables;
the obtaining unit is used for traversing dictionary variables to obtain test object name files corresponding to the identification variables;
the data matching unit 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 is used for storing 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 so as to determine whether an area matched with the target object exists on 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, which computer program instructions, when read and executed by a processor, 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 implementing the steps of the method according to the first aspect when executed by the processor.
Compared with the prior art, the invention has the following beneficial effects:
according to the automatic test method, the target test case is analyzed, the test object of the interface to be tested is triggered according to the analyzed execution task, the interface element corresponding to the test object is marked as the identification variable, then the test object name file corresponding to the identification variable is obtained through traversing the dictionary variable, and the test object file storage path corresponding to the test object name file is obtained through inputting the test object name file into the data matching unit, so that the target object is downloaded according to the test object file storage path, and whether the area matched with the target object exists in the interface to be tested is determined. Therefore, the method and the device can test whether the region matched with the target object exists on the interface to be tested or not quickly and effectively by directly searching the region matched with the target object on the interface to be tested according to the target object downloaded by the test object file storage path, compared with the scheme that the source code of the webpage to be tested needs to be traversed to match the region corresponding to the target object step by step according to the hierarchical directory in the prior art, the method and the device can greatly improve the efficiency and the effect of testing.
Meanwhile, the invention searches the area matched with the target object on the interface to be tested in an automatic test mode, thereby solving the problem that the interface element searched by the Selenium framework has certain requirements on the software front-end page framework and testers 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 by storing the mapping relation of the objects, the object name files and the object file storage paths through the data matching unit, thereby solving the problems that in the prior art, the code maintenance mode is single and the test efficiency is influenced because the Selenium framework implantation test script does not have a unified maintenance entrance.
Drawings
FIG. 1 is a schematic flow chart of an automated test method according to one embodiment of the invention;
FIG. 2 is a schematic block diagram of an automated test system according to one embodiment of the invention;
FIG. 3 is a schematic flow chart of an automated test method according to another embodiment of the present invention;
FIG. 4 is a schematic flow chart of an automated test method according to yet another embodiment of the present invention;
FIG. 5 is a schematic flow chart of an automated test method according to yet another embodiment of the present invention;
FIG. 6 is a schematic flow chart of an automated test method according to yet another embodiment of the present invention;
FIG. 7 is a topology of a computer readable medium according to the present disclosure.
Detailed Description
The present invention will be described in detail below with reference to the embodiments shown in the drawings, but it should be understood that the embodiments are not limited to the present invention, and functional, method, or structural equivalents and alternatives according to the embodiments are within the scope of protection of the present invention by those skilled in the art.
The applicant has shown below several examples to illustrate in detail the specific embodiments of the present invention.
Embodiment one:
fig. 1 is a schematic flow chart of an automated test method (hereinafter may be simply referred to as "method" or "test method") according to an embodiment of the present invention, where the method of the present embodiment is implemented based on the Airtest framework, so as to solve the problem that in the UI automated test solution in the prior art, the test efficiency is low and the effect is poor because the areas corresponding to the target objects need to be matched step by step according to the hierarchical directory. As described in connection with fig. 1 and 2, the method may include:
and 102, analyzing the target test case to analyze out the execution task in the target test case.
It should be noted that, the single test case is generally saved in a feature file format, and each feature file includes an application scenario and a plurality of execution tasks or execution steps. For example, one of the Feature files is denoted as Feature file: given login to Haihe web; while create a "KVM" machine; the Then I set a "KVM" machine sequence stream service. Based on the input parameter values, it may be determined to execute a single test case or multiple test cases.
With reference to fig. 3, the operations before parsing the target test case further include:
step 101, a target test case is selected in response to the first target input, and the target test case is transmitted to the test unit, so that the test unit can analyze the target test case.
Specifically, selecting a target test case in response to a first target input includes: and responding to the first target input, and receiving the test parameters transmitted by the user side so as to select target test cases based on the content of the test cases in the test parameters. The "user side" according to the present embodiment refers to a person or an executable program (e.g., a robot program) capable of issuing control instructions, a physical device or an instruction transmitting side including the executable program, or the like.
Wherein the first target input refers to an operation of triggering or starting the test method of the present embodiment. The test parameters generally include software system configuration information, test case content, test execution mode (including synchronous execution mode or asynchronous execution mode), test script configuration information, and the like. The problem of item iteration can be solved through the software system configuration information, and the items supported are preconfigured so as to directly input the names of the supported items when the test operation is executed. And, in the case that different versions (such as naughty existence version 1.0, 2.0, etc., and jingdong existence version 0.1, 0.2, etc.) exist in the same item, each version of the item is configured through software system configuration information so as to execute a test operation on the item 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 the 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 to refer to fig. 3, before step 101, the method may further include:
step 100, generating a mapping relation of the object, the object name file and the object file storage path in response to the second target input, and sending the mapping relation of the object, the object name file and the object file storage path to the data matching unit 300 for storage. Wherein 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 captures or selects a "login" button picture (i.e. a test object) through a screenshot tool, and saves the captured picture as a login file (i.e. an object name file), so as to save the saved login file and the corresponding test object file storage path as "/root/img/login file pgn" in the picture library of the data matching unit 300.
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 100 n) is configured as a web page, a static website, a system desktop, or the like that is accessed remotely or online.
Step 104, triggering the test object 101 of the interface 100 to be tested based on the execution task, so as to record the interface element corresponding to the test object as the identification variable 201 (i.e. logic).
After analyzing the target test case by the test unit 201, the test method of the embodiment obtains a plurality of execution tasks (or test steps), wherein one execution task is to mark the interface element of the test object as the identification variable 201 by the test unit 201. Such as by clicking on a "login" button (i.e., test object) of the interface to be tested, causing test unit 201 to mark the interface element as an identification variable log.
As shown in fig. 4, after step 104 and before step 106, comprising:
step 105, the identification variable is transmitted to the matcher 400, the matcher 400 includes dictionary variables, and the dictionary variables store mapping relations between the identification variable 201 and the test object name file.
Step 106, traversing dictionary variables to obtain test object name files corresponding to the identification variables, inputting the test object name files into the data matching unit 300 to obtain test object file storage paths corresponding to the test object name files, and storing the mapping relation among the objects, the object name files and the object file storage paths in the data matching unit. The data matching unit 300 uses the test object name file as a key value to query a value (i.e., a test object file storage path) matched with the test object name file during the matching process. 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 that the test object name file does not exist or is 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 the relation before key-value, and the test object name file is input to the data matching unit 300 to find a corresponding test object file storage path.
And step 108, downloading the target object based on the test object file storage path so as to determine whether the interface to be tested has an area matched with the target object.
According to the automatic test method, the target test case is analyzed, the test object of the interface to be tested is triggered according to the analyzed execution task, the interface element corresponding to the test object is marked as the identification variable, then the test object name file corresponding to the identification variable is obtained through traversing the dictionary variable, and the test object file storage path corresponding to the test object name file is obtained through inputting the test object name file into the data matching unit, so that the target object is downloaded according to the test object file storage path, and whether the area matched with the target object exists in the interface to be tested is determined. Therefore, according to the method and the device for testing the web page source code, the target object downloaded according to the test object file storage path is used for directly searching the region matched with the target object on the interface to be tested, and compared with the scheme that the web page source code to be tested needs to be traversed to be matched with the region corresponding to the target object step by step according to the hierarchical directory in the prior art, whether the region matched with the target object exists on the interface to be tested can be tested rapidly and effectively, and therefore testing efficiency and testing effect are improved greatly.
Meanwhile, the region matched with the target object is searched on the interface to be tested in an automatic test mode, so that the problem that interface elements searched through a Selenium frame have certain requirements on a software front-end page framework and testers in the prior art can be solved. In addition, the mapping relation among the object, the object name file and the object file storage path is stored by the data matching unit, so that unified management and maintenance of the name files and the storage paths corresponding to different objects are realized, and the problems that in the prior art, the code maintenance mode is single and the test efficiency is influenced due to the fact that a unified maintenance entry is not arranged in the test script implanted in the Selenium framework are solved.
As shown in fig. 5, in this embodiment, after step 106 and before step 108, the method further includes:
step 107, the mapping relationship between the test object file storage path and the identification variable is transmitted to the test unit 201, so that the mapping relationship between the test object file storage path and the identification variable is transmitted to the storage unit 500 for storage by the test unit 201. The storage unit 500 is configured with a memory 401 and a plurality of disks (such as disk 402 and disk 403), and the mapping relationship between the multiple groups of test object file storage paths ("/root/img/log. Pgn") and the corresponding identification variable 201 (i.e., log) is sent to the memory 401, the disk 402 and the disk 403 for storage by the test unit 200.
Further, as shown in fig. 6, the operations after step 107 and before step 108 further include:
step 1071, the mapping relationship between the storage path of the test object file stored in the storage unit 500 and the identification variable is obtained by the test unit 201.
Step 1072, the test object file storage path is parsed by the test unit 201 to query the target object based on the parsed test object file storage path.
In this embodiment, after the data matching unit 300 queries the storage path of the test object file corresponding to the identification variable, the test unit 200 stores the mapping relationship between different groups of identification variables and the corresponding storage path of the test object file in the storage unit 500, and the test unit 200 obtains the mapping relationship between the identification variable stored in the storage unit 500 and the storage path of the test object file, so as to query the target object based on the storage path of the test object file. Therefore, the automatic test method of the embodiment can directly search the area matched with the target object on the interface to be tested by inquiring the test object name file corresponding to the test object and the test object file storage path through the matcher 400 and the data matching unit 300 for different test cases, and does not need to match the area corresponding to the target object step by step according to the hierarchical directory, so that the efficiency of testing different test cases is greatly improved.
In addition, after all test cases are executed, the automatic test method of the embodiment automatically gathers execution logs corresponding to all test cases through the test unit 200, scans each test case log, and stores the test case log into a system variable to generate a statistical report, so as to feed back to appointed personnel.
In a specific embodiment of this embodiment, referring to fig. 2, the specific process of the automated testing method may be:
step (1): the "login" button picture (i.e. test object) is obtained by intercepting or selecting the screenshot tool, and is stored as a login file (i.e. object name file), so that the stored login file and the corresponding test object file storage path are "/root/img/login file pgn" are stored in the picture library of the data matching unit 300.
Step (2): the test cases are selected and transmitted to the test unit 200 in a network mode, the test cases are analyzed by the test unit 200, and the test object 101 of the interface 100 to be tested is triggered according to the execution task obtained after the analysis, so that the interface element corresponding to the test object is marked as an identification variable 201 (i.e. logic).
Step (3): the identification variable is transmitted to the matcher 400, and the matcher 400 traverses the dictionary variable to query the test object name file matched with the identification variable (logic) as a key value of the dictionary.
Step (4): the queried test object name file is transferred to the data matching unit 300, and a test object file storage path matched with the test object name file is queried by using the test object name file as a key value.
Step (5): the mapping relationship between the test object file storage path and the identification variable is transmitted to the test unit 201, so that the step (6) is entered, and the mapping relationship between the test object file storage path and the identification variable is transmitted to the storage unit 500 for storage through the test unit 201.
Step (7): the test unit 201 obtains a mapping relationship between the test object file storage path stored by the storage unit 500 and the identification variable to analyze the test object file storage path.
Step (8): and feeding back the analyzed test object file storage path to the interface to be tested 100 so as to download a corresponding picture (namely a target object) through the test object file storage path, and comparing the downloaded picture with the interface to be tested through an image analysis technology. The specific comparison process is that the image is analyzed step by an image analysis technology to obtain a plurality of groups of characteristic values, the software system 10 is connected in a network remote mode according to the characteristic values to perform visual characteristic value comparison, the comparison result can be obtained through an algorithm, and the result is generally that whether the interface 100 to be tested exists or not (namely, a target object) is downloaded based on a test object file storage path. Wherein, the characteristic value is that the granularity of comparison can be preset to improve the recognition accuracy. In this embodiment, the process of comparing the downloaded image with the interface to be tested is a technology well known in the art, and will not be described in detail.
According to the automatic test method, through the pictures downloaded according to the test object file storage path, the region matched with the pictures is directly searched on the interface to be tested 100, and compared with the scheme that the source codes of the webpage to be tested need to be traversed to be matched with the region corresponding to the target object step by step according to the hierarchical directory in the prior art, the automatic test method can be used for rapidly and effectively testing whether the region matched with the target object exists on the interface to be tested, and therefore the test efficiency and effect are greatly improved.
Embodiment two:
as shown in fig. 2, the present embodiment further provides an automated testing system, including: the test unit 201 is configured to parse the target test case to parse 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, so as to record an interface element corresponding to the test object as an identification variable; the matcher 400 is configured to traverse dictionary variables to obtain a test object name file corresponding to the identification variable; the data matching unit 300 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 300 stores the mapping relation among the object, the object name file and the object file storage path; wherein 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 automated test system of the embodiment first analyzes the target test case, triggers the test object 101 of the interface 100 to be tested according to the analyzed execution task, marks the interface element corresponding to the test object as an 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, and determining whether the area matching with the target object exists in the interface 100 to be tested. In this way, according to the target object downloaded according to the test object file storage path, the region matched with the target object is directly searched on the interface to be tested, and compared with the scheme that the source code of the webpage to be tested needs to be traversed to gradually match the region corresponding to the target object according to the hierarchical directory in the prior art, the method and the device for testing the region matched with the target object can rapidly and effectively test whether the region matched with the target object exists on the interface to be tested, and therefore efficiency and effect of testing are greatly improved.
Meanwhile, the region matched with the target object is searched on the interface to be tested in an automatic test mode, so that the problem that interface elements searched through a Selenium frame have certain requirements on a software front-end page framework and testers in the prior art can be solved. In addition, the mapping relation among the objects, the object name files and the object file storage paths is stored by the data matching unit 300, so that unified management and maintenance of the name files and the storage paths corresponding to different objects are realized, and the problems that in the prior art, the code maintenance mode is single and the test efficiency is influenced due to the fact that a unified maintenance entry is not provided in the test script implanted in the Selenium framework are solved.
The automated test system of the present 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 test unit.
In this embodiment, after the data matching unit 300 queries the storage path of the test object file corresponding to the identification variable, the test unit 200 stores the mapping relationship between different groups of identification variables and the corresponding storage path of the test object file in the storage unit 500, and the test unit 200 obtains the mapping relationship between the identification variable stored in the storage unit 500 and the storage path of the test object file, so as to query the target object based on the storage path of the test object file. Therefore, the automatic test method of the embodiment can directly search the area matched with the target object on the interface to be tested by inquiring the test object name file corresponding to the test object and the test object file storage path through the matcher 400 and the data matching unit 300 for different test cases, and does not need to match the area corresponding to the target object step by step according to the hierarchical directory, so that the efficiency of testing different test cases is greatly improved.
The technical solutions of the same or similar parts as those in the first embodiment are described in the first embodiment, and detailed descriptions thereof are omitted.
Embodiment III:
referring to FIG. 7, this embodiment discloses a specific implementation of a computer-readable medium 700. The computer-readable medium 700 may be configured in whole or in part in a physical form of a computer, server, cluster server, or data center.
In this embodiment, a computer readable medium 700 has stored thereon computer program instructions 701, which when read and executed by a processor 702, perform the steps of the product attribute updating method as disclosed in embodiment one.
Alternatively, the computer-readable medium 700 may be configured as a server, and the server runs on a physical device that builds 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 (Random Access Memory, RAM), a Read Only Memory (ROM), a programmable Read Only Memory (Programmable Read-Only Memory, PROM), an erasable Read Only Memory (Erasable Programmable Read-Only Memory, EPROM), an electrically erasable Read Only Memory (Electric Erasable Programmable Read-Only Memory, EEPROM), or the like.
The computer readable medium 700 is used for storing a program, and the processor 702 executes the product attribute updating method disclosed in the first embodiment after receiving an execution instruction.
Meanwhile, the processor 702 disclosed in the embodiment may be an integrated circuit chip with signal processing capability. The processor 702 may be a general-purpose processor including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; but also digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The disclosed methods, steps, and logic blocks in the embodiments of the present invention may be implemented or performed. The general purpose processor may be a microprocessor or the processor may be any conventional processor.
The technical solutions of the same parts of the computer readable medium disclosed in this embodiment as those of the first and/or second embodiments are referred to in the first and/or second embodiments, and are not described herein again.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable medium. Based on such understanding, the technical solution of the present invention may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a storage medium, including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (processor) to execute all or part of the steps of the methods of 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, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
Preferably, the 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 each process of the method embodiments shown in the foregoing fig. 1, fig. 3 to fig. 6, and the same technical effects are achieved, and for avoiding repetition, a detailed description is omitted herein.
The above list of detailed descriptions is only specific to practical embodiments of the present invention, and they are not intended to limit the scope of the present invention, and all equivalent embodiments or modifications that do not depart from the 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 characteristics 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 disclosure describes embodiments, not every embodiment is provided with a separate embodiment, and that this description is provided for clarity only, and that the disclosure is not limited to the embodiments described in detail below, and that the embodiments described in the examples may be combined as appropriate to form other embodiments that will be apparent to those skilled in the art.

Claims (7)

1. An automated testing method applied to a test service system, comprising:
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 to analyze an execution task in the target test case;
triggering a test object of an interface to be tested based on the execution task, marking an interface element corresponding to the test object as an identification variable, and transmitting the identification variable to a matcher, wherein the matcher comprises a dictionary variable, and the dictionary variable stores a mapping relation between the identification variable and a test object name file;
traversing dictionary variables to obtain test object name files corresponding to the identification variables, 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, and storing the mapping relation among objects, the object name files and the object file storage paths by the data matching unit;
and transmitting the mapping relation between the test object file storage path and the identification variable to a test unit, transmitting the mapping relation between the test object file storage path and the identification variable to a storage unit for storage through the test unit, and downloading a target object based on the test object file storage path to determine whether an area matched with the target object exists on an interface to be tested.
2. The automated test method of claim 1, wherein prior to downloading the target object based on the test object file storage path and after sending, by the test unit, the mapping between the test object file storage path and the identification variable to the storage unit for storage, comprises:
the mapping relation between the test object file storage path stored by the storage unit and the identification variable is obtained through the test unit;
analyzing the test object file storage path through the test unit so as to inquire the target object based on the analyzed test object file storage path.
3. The automated test method of claim 1, wherein selecting the target test case in response to the 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 cases based on the content of the test cases in the test parameters.
4. The automated test method of claim 3, wherein prior to parsing a target test case and after selecting the target test case based on the contents 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.
5. The automated test method of claim 1, comprising, prior to selecting the target test case in response to the target input:
and generating a mapping relation of the object, the object name file and the object file storage path in response to the second target input, and sending the mapping relation of the object, the object name file and the object file storage path to the data matching unit for storage.
6. An automated test system comprising:
the testing unit is used for responding to a first target input to select a target test case, transmitting the target test case to the testing unit, analyzing the target test case through the testing unit to analyze an execution task in the target test case, triggering a test object of an interface to be tested based on the execution task, marking an interface element corresponding to the test object as an identification variable, transmitting the identification variable to the matcher, wherein the matcher comprises a dictionary variable, and the dictionary variable stores a mapping relation between the identification variable and a test object name file;
the matcher is used for traversing dictionary variables to obtain a test object name file corresponding to the identification variable;
the data matching unit is used for receiving the test object name file to obtain a test object file storage path corresponding to the test object name file, storing a mapping relation among objects, the object name file and the object file storage path, transmitting the mapping relation between the test object file storage path and the identification variable to the test unit, and transmitting the mapping relation between the test object file storage path and the identification variable to the storage unit for storage through the test unit;
and the test unit downloads a target object based on the test object file storage path so as to determine whether an area matched with the target object exists on the interface to be tested.
7. The automated test system of claim 6, further comprising:
and the storage unit is used for receiving and storing the mapping relation between the test object file storage path and the identification variable, which are transmitted by the test unit.
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 CN113515455A (en) 2021-10-19
CN113515455B true 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)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115166483A (en) * 2022-07-01 2022-10-11 广州创龙电子科技有限公司 Automated testing method and system for stamp hole core board
CN116187270B (en) * 2023-05-04 2023-08-22 中科亿海微电子科技(苏州)有限公司 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

Also Published As

Publication number Publication date
CN113515455A (en) 2021-10-19

Similar Documents

Publication Publication Date Title
CN102135938B (en) Software product testing method and system
CN108304410B (en) Method and device for detecting abnormal access page and data analysis method
CN113515455B (en) Automatic test method and system
CN107957940B (en) Test log processing method, system and terminal
US10552299B1 (en) Method and apparatus for AI-driven automatic test script generation
JP6514244B2 (en) Difference detection device and program
US11176169B2 (en) Recommending visual and execution templates to enable automation of control and data exploration across systems
US11436116B1 (en) Recovering pre-indexed data from a shared storage system following a failed indexer
US10901811B2 (en) Creating alerts associated with a data storage system based on natural language requests
WO2021072742A1 (en) Assessing an impact of an upgrade to computer software
CN104361115A (en) Entry weight definition method and device based on co-clicking
CN112667697A (en) Method and device for acquiring real estate information by combining RPA and AI
CA2781391A1 (en) Identifying equivalent links on a page
CN111209325A (en) Service system interface identification method, device and storage medium
CN113641742A (en) Data extraction method, device, equipment and storage medium
CN113138906A (en) Call chain data acquisition method, device, equipment and storage medium
CN111026972B (en) Subscription data pushing method, device, equipment and storage medium in Internet of things
CN107330031A (en) A kind of method of data storage, device and electronic equipment
US9824140B2 (en) Method of creating classification pattern, apparatus, and recording medium
CN111026616A (en) Information processing method and device, electronic equipment and storage medium
CN113128848B (en) Data quality monitoring method of all-service index, electronic equipment and storage medium
Pan et al. Detecting excessive data exposures in web server responses with metamorphic fuzzing
Larsson Evaluation of open source data cleaning tools: Open refine and data wrangler
CN107943483B (en) Data forward analysis method in iOS
CN114385656A (en) Script detection method and device, computer equipment and storage medium

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