CN112905438A - Automatic testing method and device - Google Patents

Automatic testing method and device Download PDF

Info

Publication number
CN112905438A
CN112905438A CN201911217504.8A CN201911217504A CN112905438A CN 112905438 A CN112905438 A CN 112905438A CN 201911217504 A CN201911217504 A CN 201911217504A CN 112905438 A CN112905438 A CN 112905438A
Authority
CN
China
Prior art keywords
defect
module
test case
tested
test
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.)
Pending
Application number
CN201911217504.8A
Other languages
Chinese (zh)
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.)
Maipu Communication Technology Co Ltd
Original Assignee
Maipu Communication Technology 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 Maipu Communication Technology Co Ltd filed Critical Maipu Communication Technology Co Ltd
Priority to CN201911217504.8A priority Critical patent/CN112905438A/en
Publication of CN112905438A publication Critical patent/CN112905438A/en
Pending legal-status Critical Current

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/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

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)
  • Tests Of Electronic Circuits (AREA)

Abstract

The embodiment of the invention discloses an automatic testing method and device, relates to the field of automatic testing, optimizes a test case of a module to be tested, which needs to execute the automatic testing, eliminates the test case with unsolved defects, reduces unnecessary time consumption in the automatic testing process, and improves the execution efficiency of the automatic testing. The method comprises the following steps: and searching whether the test case has a relevant defect list in a case database according to the serial number of the test case corresponding to the module to be tested executing the automated test, if so, acquiring the defect list from the defect database according to the list number of the defect list, and determining whether to execute the test case according to the defect list.

Description

Automatic testing method and device
Technical Field
The invention belongs to the field of automatic testing, and particularly relates to an automatic testing method and device.
Background
In order to improve the efficiency of the test, an automated test is usually adopted, after the automated test is completed, the execution result of the automated test is usually analyzed, and it is known through analysis that the known software or hardware defects exist and are not solved yet, and the automated test case may be repeatedly executed in the following automated test rounds, so that the time is wasted, and the execution efficiency of the automation is reduced.
Disclosure of Invention
The embodiment of the invention provides an automatic test method and device, which are used for solving the problem of low execution efficiency of the conventional automatic test.
In view of the above, in a first aspect, an embodiment of the present invention provides an automated testing method, where the method includes:
and searching whether the test case has a relevant defect list in a case database according to the serial number of the test case corresponding to the module to be tested executing the automated test, if so, acquiring the defect list from the defect database according to the list number of the defect list, and determining whether to execute the test case according to the defect list.
In a second aspect, an embodiment of the present invention further provides an automated testing apparatus, where the apparatus includes:
the acquisition module is used for acquiring the serial number of the test case corresponding to the module to be tested which executes the automatic test;
and the processing module is used for searching whether the test case has a relevant defect list in a case database according to the serial number of the test case corresponding to the module to be tested for executing the automated test, if so, acquiring the defect list from the defect database according to the list number of the defect list, and determining whether to execute the test case according to the defect list.
The embodiment of the invention provides an automatic test method and device, which optimize the test cases of a module to be tested needing to execute automatic test, eliminate the test cases with unsolved defects, reduce unnecessary time consumption in the automatic test process and improve the execution efficiency of the automatic test.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a flowchart of an automated testing method according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of an automatic test apparatus according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The system architecture and the service scenario described in the embodiment of the present invention are for more clearly illustrating the technical solution of the embodiment of the present invention, and do not form a limitation on the technical solution provided in the embodiment of the present invention, and it can be known by those skilled in the art that the technical solution provided in the embodiment of the present invention is also applicable to similar technical problems along with the evolution of the system architecture and the appearance of a new service scenario.
The above method is described in detail with reference to specific examples.
The embodiment of the invention provides an automatic test method and device, which are used for improving the execution efficiency of automatic tests, outputting execution log information after the execution of each automatic test is finished, analyzing the log information, and clearly knowing the automatic test execution condition of each test case of each module to be tested in the automatic test, wherein the execution result of each test case has two types, one type is execution success pass, and the other type is execution failure fail. And if the execution result is pass, the test case has no problem. If the execution result is fail, it indicates that the test case may have a problem, and an important analysis is required to obtain a specific reason for the execution failure.
An embodiment of the present invention provides an automated testing method, as shown in fig. 1, the method includes:
step 101, according to the serial number of the test case corresponding to the module to be tested executing the automated test, searching whether the test case has a related defect list in a case database, if so, entering step 102, obtaining the defect list from the defect database according to the list number of the defect list, and determining whether to execute the test case according to the defect list. If not, step 103 is executed to directly execute the test case to complete the automatic test of the module to be tested.
In the embodiment of the invention, the analysis conclusion of the execution result of the automatic test executed by a certain module to be tested in the previous time can be acted on the next automatic test of the module to be tested, so that the execution efficiency of the next automatic test of the module to be tested is improved. Therefore, in the embodiment of the present invention, before each automated test is performed, information such as information of a module to be tested, a software version, and a hardware model of a device to be tested that performs the automated test needs to be input. Therefore, before searching whether the test case has a related defect list in the case database according to the serial number of the test case corresponding to the module to be tested executing the automated test, the method further comprises: acquiring a module to be tested for executing the automated test; and acquiring the software version and the hardware model of the equipment to be tested to which the module to be tested executing the automated test belongs.
In the embodiment of the invention, if the module to be tested which needs to execute the automatic test does not have an execution record in the execution log information of the automatic test, the automatic test is executed for the first time, and the automatic test is directly executed without performing log analysis processing. If the module to be tested which needs to execute the automatic test has an execution record in the execution log information of the automatic test, the corresponding execution log is continuously analyzed, and whether the automatic test is executed or not is determined according to the analysis result of the execution log. Therefore, before searching whether the test case has a related defect list in the case database according to the serial number of the test case corresponding to the module to be tested executing the automated test at this time, the method further comprises:
and acquiring log information of the automatic test executed by the module to be tested in the previous time, and analyzing the serial number of the test case with the execution result of failure from the log information.
Analyzing the execution result as a failed test case, acquiring the software version and the hardware model of the equipment to be tested to which the module to be tested corresponding to the test case belongs in the previous execution automation test, generating a defect list, and storing the defect list in a defect database.
And associating the single number of the defect list with the serial number of the test case in a case database.
Specifically, each test case of each module to be tested has a unique serial number, and the corresponding test case can be found through the serial number. Each defect of a test case has a unique defect single number, and all information of the defect can be checked according to the defect single number, including but not limited to defect description, defect generation conditions, defect solution state, software version for generating the defect, hardware model for generating the defect, and the like. The defect list is stored in a defect database where all information of each tracked defect list may be saved. The case database for storing the automatic test case is associated with the defect database, and only the single number of the defect list can be associated with the serial number of the automatic test case.
Preferably, when the defect list is generated, the solution state of the defect list is set as processing. After saving the defect order to the defect database, the method further comprises:
and updating the solution state information of the defect list in the defect database immediately, if the defect list is solved, updating the solution state of the defect list to be solved, and if the defect list is not solved, updating the state of the defect list to be an unsolved state.
In the embodiment of the invention, the test case with the execution result of failure is analyzed, and the specific reason of the test case execution failure, such as the software defect or the hardware defect of the tested device, is obtained. And generates a defect list based on the defect. Specifically, if the software is a software defect, the defect list needs to include information such as a software version and a defect description of the device under test. If the hardware is defective, the defect list needs to include hardware related information such as a hardware model. The hardware model here is, for example, a CPU model, a memory model, a switch chip model, or the like. And associating the defect description, the software version, the hardware model and the solution state of the defect with the automatic test case corresponding to the defect, and forming an association record in a case database. The following information may be included in the association record: the serial number of the automatic test case, the single number of the defect list, the defect description, the software version or the hardware model of the tested device and the solution state of the defect list.
In the embodiment of the invention, the defect list comprises defect information and solution state information, wherein the defect information comprises a hardware model and a software version. Determining whether to execute the test case according to the defect list, specifically comprising:
if the solution state of the defect list is the solved state, executing the test case;
if the solution state of the defect list is an unsolved state, whether the software version and the hardware model of the device to be tested to which the module to be tested executing the automated test belongs are the same as those in the defect list or not is judged, if so, the test case is not executed, and if not, the test case is executed.
Preferably, in the embodiment of the present invention, the software version may have a main version and a branch version derived on the basis of the main version. If there is an unresolved defect on the main version, then there will be the same defect on the branch versions that derive it. The hardware model may have a main model and a hardware branch model derived from the main model. If there is an unresolved deficiency in the hardware main model, then the same deficiency will exist for the hardware branch model from which it is derived. Therefore, when the software version and the hardware model are compared, the complete software version or the complete hardware model can be directly compared, and if the software version and the hardware model are completely the same and the automatic test of the previous time has defects, the automatic test can be directly judged not to be executed. Or only comparing with the main version of the software version or the main version of the hardware model, if the software version and the hardware model are the same and the automatic test of the previous time has defects, the automatic test can be directly judged not to be executed.
For example, after an automated test is executed for the first time, a test case execution failure exists in a module a to be tested of the device to be tested, the serial number of the test case is S101, execution log information is obtained, the reason for the test case execution failure is analyzed, it is determined that the reason for the test case execution failure is that the device to be tested has a defect, and a defect list is generated in a defect database, for example, the list number of the defect list is Bug001, the software version Ver01 for generating the defect, the hardware model for generating the defect is Hard01, and the initial state of the defect is the in-process state. And after the defect list is processed, updating the solution state of the defect list into a solution state or an unresolved state. And (4) performing association recording on the Bug list single number Bug001 and the test case with the serial number of S101 in a case database. The following are recorded: s101, Bug001, software version Ver01, hardware model Hard01 and solution state.
And performing automatic test for the second time, wherein the software version of the equipment to be tested of the automatic test is Ver01, the hardware model is Hard01, and the module to be tested A needs to be executed. Inquiring whether the module A to be tested has an automatic test execution record, wherein the module A to be tested has the execution record because the module A to be tested has been executed for the first time, inquiring in a case database according to the serial number of the test case of the module A to be tested to find a defect list of the test case S101, namely a single-number Bug001, and if the solution state of the defect list is the solution state, directly executing the test case S101. If the solution state of the defect list is an unsolved state, continuously comparing whether the software version Ver01 and the hardware model Hard01 of the device to be tested, to which the module A to be tested belongs, are the same as the software version and the hardware model in the defect list Bug 001. If the two are the same, the automatic test may not execute the test case S101 of the module a to be tested. The test time of the automatic test is reduced, and the execution efficiency of the automatic test is improved.
The embodiment of the invention provides an automatic test method, which optimizes the test cases of a module to be tested needing to execute automatic test, eliminates the test cases with unsolved defects, reduces unnecessary time consumption in the automatic test process and improves the execution efficiency of the automatic test.
An embodiment of the present invention provides an automatic testing apparatus, as shown in fig. 2, the apparatus 20 includes:
the obtaining module 201 is configured to obtain a serial number of a test case corresponding to a module to be tested that executes the automated test this time.
The processing module 202 is configured to search, in the case database, whether the test case has an associated defect order according to the serial number of the test case corresponding to the module to be tested that executes the automated test, and if so, obtain the defect order from the defect database according to the order number of the defect order, and determine whether to execute the test case according to the defect order. The defect list comprises defect information and solution state information, and the defect information comprises a hardware model and a software version.
The processing module 202 is specifically configured to:
if the solution state of the defect list is the solved state, executing the test case;
if the solution state of the defect list is an unsolved state, whether the software version and the hardware model of the device to be tested to which the module to be tested executing the automated test belongs are the same as those in the defect list or not is judged, if so, the test case is not executed, and if not, the test case is executed.
In the embodiment of the present invention, the apparatus 20 further includes a parsing module 203 and an association module 204.
The obtaining module 201 is configured to obtain log information of a module to be tested, where the automatic test was executed last time, and analyze, from the log information, a serial number of a test case with an execution result being a failure.
The analysis module 203 is configured to analyze the test case with the failed execution result, obtain the software version and the hardware model of the device to be tested to which the previous automated test executed by the module to be tested corresponding to the test case belongs, generate a defect list, and store the defect list in the defect database.
And the associating module 204 is configured to associate the single number of the defect list with the serial number of the test case in the case database.
The parsing module 203 is further configured to update the resolution status of the defect list to a resolved status or an unresolved status.
The obtaining module 201 is further configured to obtain a module to be tested that performs the automated test this time; and acquiring the software version and the hardware model of the equipment to be tested to which the module to be tested executing the automated test belongs.
The embodiment of the invention provides an automatic testing device, which optimizes the test cases of a module to be tested needing to execute automatic testing, eliminates the test cases with unsolved defects, reduces unnecessary time consumption in the automatic testing process and improves the execution efficiency of the automatic testing.
An embodiment of the present invention provides an electronic device, and specifically, the electronic device includes: the system comprises a processor, a memory and a computer program stored on the memory and capable of running on the processor, wherein the computer program realizes the steps of the automatic testing method provided by the embodiment when being executed by the processor.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements multiple processes of the automatic testing method provided in the foregoing embodiment, and can achieve the same technical effect, and is not described herein again to avoid repetition. Examples of the computer-readable storage medium include a Random-Access Memory (RAM), a Read-Only Memory (ROM), a Flash Memory (Flash Memory), a Hard Disk Drive (HDD), a Solid-State Drive (SSD), and an optical disc.
The memory above may include volatile memory, such as random access memory; non-volatile memory, such as read-only memory, flash memory, hard disks, solid state disks, etc.; combinations of the above categories of memory may also be included.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses and modules may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, a module may be divided into only one logical function, and may be divided into other ways in actual implementation.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the present invention.

Claims (10)

1. An automated testing method, the method comprising:
and searching whether the test case has a relevant defect list in a case database according to the serial number of the test case corresponding to the module to be tested executing the automated test, if so, acquiring the defect list from the defect database according to the list number of the defect list, and determining whether to execute the test case according to the defect list.
2. The method of claim 1, wherein the defect ticket includes defect information and resolution status information, the defect information including a hardware model and a software version; the determining whether to execute the test case according to the defect list comprises:
if the solution state of the defect list is the solved state, executing the test case;
and if the solution state of the defect list is an unsolved state, judging whether the software version and the hardware model of the equipment to be tested to which the module to be tested belongs are the same as those in the defect list, if so, not executing the test case, and if not, executing the test case.
3. The method according to claim 1, wherein before searching whether the test case has a related defect list in a case database according to the serial number of the test case corresponding to the module to be tested executing the automated test this time, the method comprises:
acquiring log information of the automatic test executed by the module to be tested in the previous time, and analyzing the serial number of the test case with the execution result of failure from the log information;
analyzing the execution result as a failed test case, acquiring the software version and the hardware model of the equipment to be tested to which the module to be tested corresponding to the test case belongs in the previous execution automation test, generating a defect list, and storing the defect list in a defect database;
and associating the single number of the defect list with the serial number of the test case in the case database.
4. The method of claim 3, wherein after saving the defect ticket in a defect database, the method further comprises:
updating a resolved state of the defect ticket to a resolved state or an unresolved state.
5. The method according to any one of claims 1 to 4, wherein before searching whether the test case has a related defect list in a case database according to the serial number of the test case corresponding to the module to be tested executing the automated test this time, the method further comprises:
acquiring a module to be tested for executing the automated test;
and acquiring the software version and the hardware model of the equipment to be tested to which the module to be tested belongs.
6. An automated testing apparatus, the apparatus comprising:
the acquisition module is used for acquiring the serial number of the test case corresponding to the module to be tested which executes the automatic test;
and the processing module is used for searching whether the test case has a relevant defect list in a case database according to the serial number of the test case corresponding to the module to be tested for executing the automated test, if so, acquiring the defect list from the defect database according to the list number of the defect list, and determining whether to execute the test case according to the defect list.
7. The apparatus of claim 6, wherein the defect ticket comprises defect information and resolution status information, the defect information comprising a hardware model and a software version;
the processing module is specifically configured to: if the solution state of the defect list is the solved state, executing the test case; and if the solution state of the defect list is an unsolved state, judging whether the software version and the hardware model of the equipment to be tested to which the module to be tested belongs are the same as those in the defect list, if so, not executing the test case, and if not, executing the test case.
8. The apparatus of claim 6, further comprising a parsing module and an association module,
the acquisition module is further configured to acquire log information of a previous automated test executed by the module to be tested, and analyze, from the log information, a serial number of a test case with an execution result of failure;
the analysis module is used for analyzing the execution result into a failed test case, acquiring the software version and the hardware model of the equipment to be tested to which the previous execution automation test of the module to be tested corresponding to the test case belongs, generating a defect list and storing the defect list in a defect database;
and the association module is used for associating the single number of the defect list with the serial number of the test case in the case database.
9. The apparatus of claim 8, wherein the parsing module is further configured to update a resolution status of the defect ticket to a resolved status or an unresolved status.
10. The device according to any one of claims 6 to 9, wherein the obtaining module is further configured to obtain a module under test that performs the automated test this time; and acquiring the software version and the hardware model of the equipment to be tested to which the module to be tested belongs.
CN201911217504.8A 2019-12-03 2019-12-03 Automatic testing method and device Pending CN112905438A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911217504.8A CN112905438A (en) 2019-12-03 2019-12-03 Automatic testing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911217504.8A CN112905438A (en) 2019-12-03 2019-12-03 Automatic testing method and device

Publications (1)

Publication Number Publication Date
CN112905438A true CN112905438A (en) 2021-06-04

Family

ID=76103605

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911217504.8A Pending CN112905438A (en) 2019-12-03 2019-12-03 Automatic testing method and device

Country Status (1)

Country Link
CN (1) CN112905438A (en)

Similar Documents

Publication Publication Date Title
CN108829584B (en) Service logic interface mock test method and system
US9384117B2 (en) Machine and methods for evaluating failing software programs
US9940215B2 (en) Automatic correlation accelerator
JP7404839B2 (en) Identification of software program defect location
CN109669436B (en) Test case generation method and device based on functional requirements of electric automobile
CN113342685A (en) Precise test method and device, computer equipment and storage medium
CN112328499A (en) Test data generation method, device, equipment and medium
CN113010413A (en) Automatic interface testing method and device
CN110990289B (en) Method and device for automatically submitting bug, electronic equipment and storage medium
CN116431522A (en) Automatic test method and system for low-code object storage gateway
CN112905438A (en) Automatic testing method and device
CN111666200A (en) Testing method and terminal for time consumption of cold start of PC software
CN108345541A (en) A kind of program detecting method and system
CN111177014B (en) Software automatic test method, system and storage medium
CN114490413A (en) Test data preparation method and device, storage medium and electronic equipment
CN110347589B (en) Software unit test automatic detection method and system
CN115878448A (en) Database test method, distributed database and storage medium
CN113111009A (en) Software testing device and testing method
CN107102938B (en) Test script updating method and device
CN113946511B (en) Full-function test case set acquisition method and system
US20230216727A1 (en) Identification of root causes in data processing errors
CN115878482A (en) Product testing method and related device
CN113297093A (en) Testing method and device for bank software
CN114357918A (en) Chip verification method and device, electronic equipment and storage medium
CN115202843A (en) Data loading method and device

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
CB02 Change of applicant information

Address after: 610041 nine Xing Xing Road 16, hi tech Zone, Sichuan, Chengdu

Applicant after: MAIPU COMMUNICATION TECHNOLOGY Co.,Ltd.

Address before: 610041 15-24 floor, 1 1 Tianfu street, Chengdu high tech Zone, Sichuan

Applicant before: MAIPU COMMUNICATION TECHNOLOGY Co.,Ltd.

CB02 Change of applicant information