CN112052170A - Automatic detection method and device, storage medium and electronic equipment - Google Patents

Automatic detection method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN112052170A
CN112052170A CN202010915223.6A CN202010915223A CN112052170A CN 112052170 A CN112052170 A CN 112052170A CN 202010915223 A CN202010915223 A CN 202010915223A CN 112052170 A CN112052170 A CN 112052170A
Authority
CN
China
Prior art keywords
test case
target task
error
execution
detection method
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
CN202010915223.6A
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.)
Bank of China Ltd
Original Assignee
Bank of China 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 Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN202010915223.6A priority Critical patent/CN112052170A/en
Publication of CN112052170A publication Critical patent/CN112052170A/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

Abstract

The invention provides an automatic detection method and device, a storage medium and electronic equipment, wherein the automatic detection method comprises the following steps: determining a target task to be processed currently, wherein at least one test case is arranged under the target task; acquiring an actual execution result of each test case, and calling a test case execution template corresponding to the target task, wherein the test case execution template comprises a standard execution result of each test case; and comparing the actual execution result of each test case with a standard execution result to determine the execution state of each test case. That is to say, the automatic detection method can automatically detect the actual situation of the test case, and inform the tester of carrying out targeted correction and supplementary test on the problems occurring in the execution process of the test case, thereby reducing the occurrence of production problems.

Description

Automatic detection method and device, storage medium and electronic equipment
Technical Field
The present invention relates to the field of automated inspection technologies, and in particular, to an automated inspection method and apparatus, a storage medium, and an electronic device.
Background
In the current testing process, under each task of a plurality of tasks, the post-inspection work of a plurality of executed test cases is carried out manually by a tester, which greatly takes time of the tester, and if a plurality of test cases of the test tasks exist, the problems existing in the test cases are difficult to find by a manual detection mode, thereby causing the occurrence of production problems.
Disclosure of Invention
In view of the above, to solve the above problems, the present invention provides an automatic detection method and apparatus, a storage medium, and an electronic device, and the technical solution is as follows:
an automated detection method, the automated detection method comprising:
determining a target task to be processed currently, wherein at least one test case is arranged under the target task;
acquiring an actual execution result of each test case, and calling a test case execution template corresponding to the target task, wherein the test case execution template comprises a standard execution result of each test case;
and comparing the actual execution result of each test case with a standard execution result to determine the execution state of each test case.
Optionally, in the above automatic detection method, the determining a current target task to be processed includes:
calling the pre-recorded inspection time of each task;
and taking the task with the checking time matched with the current time as a target task to be processed currently.
Optionally, in the above automatic detection method, the automatic detection method further includes:
determining an error test case with execution errors under the target task based on the execution state of each test case;
generating an error log corresponding to each error test case;
and generating an error report of the target task according to all the error logs.
Optionally, in the above automatic detection method, the automatic detection method further includes:
judging whether the proportion of the error test cases in all the test cases under each target task is greater than or equal to a preset threshold value or not based on the error report;
and if so, sending the error report to a terminal of the tester corresponding to the target task number.
An automated detection device, the automated detection device comprising:
the system comprises a first determination module, a second determination module and a third determination module, wherein the first determination module is used for determining a target task to be processed currently, and at least one test case is arranged under the target task;
the calling module is used for obtaining the actual execution result of each test case and calling a test case execution template corresponding to the target task, wherein the test case execution template comprises the standard execution result of each test case;
and the comparison module is used for comparing the actual execution result of each test case with the standard execution result and determining the execution state of each test case.
Optionally, in the above automatic detection apparatus, the first determining module is specifically configured to:
calling the pre-recorded inspection time of each task;
and taking the task with the checking time matched with the current time as a target task to be processed currently.
Optionally, in the above automatic detection apparatus, the automatic detection apparatus further includes:
the second determination module is used for determining an error test case with an execution error under the target task based on the execution state of each test case;
the first generation module is used for generating an error log corresponding to each error test case;
and the second generation module is used for generating an error report of the target task according to all the error logs.
Optionally, in the above automatic detection apparatus, the automatic detection apparatus further includes:
the judging module is used for judging whether the proportion of the error test cases in all the test cases under each target task is greater than or equal to a preset threshold value or not based on the error report;
and the sending module is used for sending the error report to a terminal of the tester corresponding to the target task number if the error report is positive.
A computer-readable storage medium having computer-executable instructions stored thereon for performing any of the automated detection methods described above.
An electronic device, the electronic device comprising: at least one processor, and at least one memory, bus connected with the processor;
the processor and the memory complete mutual communication through the bus;
the processor is configured to call program instructions in the memory to perform any of the automated detection methods described above.
Compared with the prior art, the invention has the following beneficial effects:
the automatic detection method provided by the invention comprises the following steps: determining a target task to be processed currently, wherein at least one test case is arranged under the target task; acquiring an actual execution result of each test case, and calling a test case execution template corresponding to the target task, wherein the test case execution template comprises a standard execution result of each test case; and comparing the actual execution result of each test case with a standard execution result to determine the execution state of each test case. That is to say, the automatic detection method can automatically detect the actual situation of the test case, and inform the tester of carrying out targeted correction and supplementary test on the problems occurring in the execution process of the test case, thereby reducing the occurrence of production problems.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a schematic flow chart of an automated inspection method according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart of another automated inspection method according to an embodiment of the present invention;
FIG. 3 is a schematic flow chart of another automated inspection method according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an automatic detection apparatus according to an embodiment of the present invention;
FIG. 5 is a schematic structural diagram of another automated inspection apparatus according to an embodiment of the present invention;
FIG. 6 is a schematic structural diagram of another automatic detection apparatus according to an embodiment of the present invention;
fig. 7 is a hardware architecture diagram of an electronic device 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.
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
Referring to fig. 1, fig. 1 is a schematic flow chart of an automated detection method according to an embodiment of the present invention.
The automatic detection method comprises the following steps:
s101: determining a target task to be processed currently, wherein at least one test case is under the target task.
In this step, the determining the current target task to be processed includes:
and calling the pre-recorded inspection time of each task.
And taking the task with the checking time matched with the current time as a target task to be processed currently.
That is, the corresponding inspection time is recorded according to the different test periods of each task, and when the current time is matched with the inspection time, the test case under the corresponding task is automatically detected.
S102: and acquiring an actual execution result of each test case, and calling a test case execution template corresponding to the target task, wherein the test case execution template comprises a standard execution result of each test case.
In this step, since at least one test case corresponds to one target task, the standard execution result of each test case under the target task is pre-entered to form a test case execution template, which is the basis of automatic detection.
S103: and comparing the actual execution result of each test case with a standard execution result to determine the execution state of each test case.
In the step, when the actual execution result and the standard execution result are input and output, the test case is characterized to be in error;
when the actual execution result and the standard execution result are not input, the test case is characterized to have no error.
In the embodiment, the automatic detection method can automatically detect the actual situation of the test case, and further can inform a tester of carrying out targeted rectification and supplementary test on problems occurring in the execution process of the test case, so that the occurrence of production problems is reduced.
Further, based on the above embodiment of the present invention, referring to fig. 2, fig. 2 is a schematic flow chart of another automatic detection method provided by the embodiment of the present invention.
The automatic detection method further comprises the following steps:
s104: and determining an error test case with execution errors under the target task based on the execution state of each test case.
S105: and generating an error log corresponding to each error test case.
In this step, the error test cases also need to be numbered, the number is based on the number of the target task, and the specific number form is not limited in the embodiment of the present invention.
S106: and generating an error report of the target task according to all the error logs.
In the step, after all the test cases are detected under a target task, all the error logs are integrated to generate an error report.
In the embodiment, the error test cases are integrated to generate an error report, so that the problem can be found more intuitively, the problem can be solved effectively, and the production problem is reduced.
Further, based on the above embodiment of the present invention, referring to fig. 3, fig. 3 is a schematic flow chart of another automatic detection method provided by the embodiment of the present invention.
The automatic detection method further comprises the following steps:
s107: and judging whether the proportion of the error test cases in all the test cases under each target task is greater than or equal to a preset threshold value or not based on the error report.
In this step, the preset threshold may be set based on the characteristics of different tasks, for example, the preset threshold is 10%.
S108: and if so, sending the error report to a terminal of the tester corresponding to the target task number.
In this embodiment, when the ratio of the erroneous test cases to all the test cases in each target task is greater than or equal to the preset threshold, the error report is sent to the terminal of the tester corresponding to the target task number, and meanwhile, the tester needs to be reminded of paying attention to the actual test condition of the target task for management.
Further, based on all the above embodiments of the present invention, in another embodiment of the present invention, an automatic detection apparatus is further provided, referring to fig. 4, and fig. 4 is a schematic structural diagram of the automatic detection apparatus provided in the embodiment of the present invention.
The automatic detection device comprises:
the first determining module 11 is configured to determine a target task to be currently processed, where the target task has at least one test case;
the calling module 12 is configured to obtain an actual execution result of each test case, and call a test case execution template corresponding to the target task, where the test case execution template includes a standard execution result of each test case;
the comparison module 13 is configured to compare the actual execution result of each test case with a standard execution result, and determine an execution state of each test case.
Further, based on the above embodiment of the present invention, the first determining module 11 is specifically configured to:
calling the pre-recorded inspection time of each task;
and taking the task with the checking time matched with the current time as a target task to be processed currently.
Further, based on the above-mentioned embodiment of the present invention, referring to fig. 5, fig. 5 is a schematic structural diagram of another automatic detection apparatus provided in the embodiment of the present invention.
The automatic detection device further comprises:
a second determining module 14, configured to determine, based on an execution state of each of the test cases, an erroneous test case with an execution error under the target task;
the first generating module 15 is configured to generate an error log corresponding to each error test case;
and a second generating module 16, configured to generate an error report of the target task according to all the error logs.
Further, based on the above-mentioned embodiment of the present invention, referring to fig. 6, fig. 6 is a schematic structural diagram of another automatic detection apparatus provided in the embodiment of the present invention.
The automatic detection device further comprises:
the judging module 17 is configured to judge whether the ratio of the error test cases to all the test cases under each target task is greater than or equal to a preset threshold value based on the error report;
and the sending module 18 is configured to send the error report to a terminal of the tester corresponding to the target task number if the error report is positive.
It should be noted that the principle of an automated inspection apparatus provided in the embodiment of the present invention is the same as that of an automated inspection method provided in the above embodiment of the present invention, and details are not repeated herein.
Further, based on the above embodiments of the present invention, in another embodiment of the present invention, a computer-readable storage medium is further provided, where computer-executable instructions are stored in the computer-readable storage medium, and the computer-executable instructions are used to execute the automated detection method according to the above embodiments of the present invention.
Further, based on the above embodiment of the present invention, in another embodiment of the present invention, an electronic device is further provided, and referring to fig. 7, fig. 7 is a hardware architecture diagram of the electronic device provided in the embodiment of the present invention.
The electronic device includes: at least one processor 19, and at least one memory 20, a bus 21, connected to the processor 19;
the processor 19 and the memory 20 complete mutual communication through the bus 21;
the processor 19 is used for calling the program instructions in the memory 20 to execute the automatic detection method according to the above embodiment of the present invention.
The above detailed description of the automated inspection method and apparatus, the storage medium, and the electronic device provided by the present invention, and the specific examples are applied herein to explain the principle and the implementation of the present invention, and the description of the above embodiments is only used to help understand the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.
It should be noted that, in the present specification, the embodiments are all described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
It is further noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include or include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. An automated detection method, comprising:
determining a target task to be processed currently, wherein at least one test case is arranged under the target task;
acquiring an actual execution result of each test case, and calling a test case execution template corresponding to the target task, wherein the test case execution template comprises a standard execution result of each test case;
and comparing the actual execution result of each test case with a standard execution result to determine the execution state of each test case.
2. The automated detection method of claim 1, wherein the determining a current pending target task comprises:
calling the pre-recorded inspection time of each task;
and taking the task with the checking time matched with the current time as a target task to be processed currently.
3. The automated detection method of claim 1, further comprising:
determining an error test case with execution errors under the target task based on the execution state of each test case;
generating an error log corresponding to each error test case;
and generating an error report of the target task according to all the error logs.
4. The automated detection method of claim 3, further comprising:
judging whether the proportion of the error test cases in all the test cases under each target task is greater than or equal to a preset threshold value or not based on the error report;
and if so, sending the error report to a terminal of the tester corresponding to the target task number.
5. An automated inspection device, comprising:
the system comprises a first determination module, a second determination module and a third determination module, wherein the first determination module is used for determining a target task to be processed currently, and at least one test case is arranged under the target task;
the calling module is used for obtaining the actual execution result of each test case and calling a test case execution template corresponding to the target task, wherein the test case execution template comprises the standard execution result of each test case;
and the comparison module is used for comparing the actual execution result of each test case with the standard execution result and determining the execution state of each test case.
6. The automated detection apparatus according to claim 5, wherein the first determination module is specifically configured to:
calling the pre-recorded inspection time of each task;
and taking the task with the checking time matched with the current time as a target task to be processed currently.
7. The automated inspection device of claim 5, further comprising:
the second determination module is used for determining an error test case with an execution error under the target task based on the execution state of each test case;
the first generation module is used for generating an error log corresponding to each error test case;
and the second generation module is used for generating an error report of the target task according to all the error logs.
8. The automated inspection device of claim 7, further comprising:
the judging module is used for judging whether the proportion of the error test cases in all the test cases under each target task is greater than or equal to a preset threshold value or not based on the error report;
and the sending module is used for sending the error report to a terminal of the tester corresponding to the target task number if the error report is positive.
9. A computer-readable storage medium having computer-executable instructions stored thereon for performing the automated detection method of any one of claims 1-4.
10. An electronic device, characterized in that the electronic device comprises: at least one processor, and at least one memory, bus connected with the processor;
the processor and the memory complete mutual communication through the bus;
the processor is configured to invoke program instructions in the memory to perform the automated detection method of any of claims 1-4.
CN202010915223.6A 2020-09-03 2020-09-03 Automatic detection method and device, storage medium and electronic equipment Pending CN112052170A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010915223.6A CN112052170A (en) 2020-09-03 2020-09-03 Automatic detection method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010915223.6A CN112052170A (en) 2020-09-03 2020-09-03 Automatic detection method and device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN112052170A true CN112052170A (en) 2020-12-08

Family

ID=73606959

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010915223.6A Pending CN112052170A (en) 2020-09-03 2020-09-03 Automatic detection method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN112052170A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112862452A (en) * 2021-03-02 2021-05-28 岭东核电有限公司 Method and device for executing work order equivalence, computer equipment and storage medium
CN112882957A (en) * 2021-03-30 2021-06-01 中信银行股份有限公司 Test task validity checking method and device
CN115543774A (en) * 2022-08-17 2022-12-30 睿智合创(北京)科技有限公司 Automatic case measuring and calculating method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110413517A (en) * 2019-07-17 2019-11-05 北京达佳互联信息技术有限公司 A kind of test report generation method, device, electronic equipment and storage medium
CN110941563A (en) * 2019-12-31 2020-03-31 中国银行股份有限公司 Automatic script testing method and device
CN111274130A (en) * 2020-01-16 2020-06-12 深圳乐信软件技术有限公司 Automatic testing method, device, equipment and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110413517A (en) * 2019-07-17 2019-11-05 北京达佳互联信息技术有限公司 A kind of test report generation method, device, electronic equipment and storage medium
CN110941563A (en) * 2019-12-31 2020-03-31 中国银行股份有限公司 Automatic script testing method and device
CN111274130A (en) * 2020-01-16 2020-06-12 深圳乐信软件技术有限公司 Automatic testing method, device, equipment and storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112862452A (en) * 2021-03-02 2021-05-28 岭东核电有限公司 Method and device for executing work order equivalence, computer equipment and storage medium
CN112882957A (en) * 2021-03-30 2021-06-01 中信银行股份有限公司 Test task validity checking method and device
CN115543774A (en) * 2022-08-17 2022-12-30 睿智合创(北京)科技有限公司 Automatic case measuring and calculating method

Similar Documents

Publication Publication Date Title
CN112052170A (en) Automatic detection method and device, storage medium and electronic equipment
CN105302722B (en) CTS automatic testing method and device
CN110908888B (en) Server testing method and device
CN110658400B (en) Embedded test method, microcontroller and system
CN112486749B (en) Test method and device based on 5G communication terminal and readable storage medium
CN111506341A (en) Software configuration information detection method, device and system
CN111176918A (en) Server testing method, system, equipment and computer readable storage medium
CN105740111A (en) Performance detection method and device
CN110737575A (en) interface testing method, device, electronic equipment and storage medium
CN112583617A (en) Fault determination method, server, control terminal and storage medium
CN111866921A (en) Method, device and equipment for searching service fault of 5G base station and storage medium
CN106940647B (en) Code management method and device
CN116302736A (en) Method and device for testing components of server, electronic equipment and storage medium
CN108845932B (en) Unit testing method and device of network library, storage medium and terminal
CN109165127B (en) Problem interface positioning method and device and electronic equipment
CN114327981A (en) Safety verification system, method and device of function safety mechanism
CN109581193B (en) Circuit filtering function detection method, circuit filtering function detection device and computer storage medium
CN115470075B (en) Application program fault detection method and device, electronic equipment and storage medium
CN115545677B (en) Online process specification detection method and system based on automatic case execution condition
CN114911467B (en) Code detection method, device, electronic equipment and storage medium
CN111309410B (en) Program object determining method and device
CN107391330B (en) Method and system for testing computer performance under Itanium platform
CN113515507B (en) Method and system applied to dam water seepage detection
CN112463704B (en) Method, device and equipment for identifying topology of case and storage medium
CN112099838B (en) Method, device and storage medium for determining version difference

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