A test case detection method and device

By monitoring the method call link of the test case to call the checkpoint in the automated test platform, and judging its effectiveness, the problem of test case inefficiency caused by not calling the checkpoint is solved, the test time and resource waste are reduced, and the test efficiency is improved.

CN112286803BActive Publication Date: 2024-10-25BEIJING SANKUAI ONLINE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011149969.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-10-23
Publication Date
2024-10-25
Estimated Expiration
2040-10-23

AI Technical Summary

Technical Problem

In automated testing, the business information cannot be detected when the test case does not call the checkpoint, causing the test to take a long time and causing a waste of resources.

Method used

By monitoring the method call link of the checkpoint in the test platform, it is determined whether the test case contains a unique identifier, its validity is determined, and the tester is prompted to modify according to the invalid use case information.

Benefits of technology

Reduce the execution of invalid use cases, shorten testing time, avoid resource waste, and improve testing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112286803B_ABST
    Figure CN112286803B_ABST
Patent Text Reader

Abstract

This specification discloses a method and device for detecting test cases. The test platform can first obtain a test case set and perform tests based on the test case set. After that, the method call link that calls the checkpoint in the test platform is monitored through the monitoring code, and for each test case, it is determined whether each monitored method call link contains a unique identifier corresponding to the test case. When it is determined that the unique identifier corresponding to the test case is contained, the test case is determined to be a valid case. Otherwise, the test case is determined to be an invalid case, and the tester is prompted to modify the invalid case. By monitoring each method call link that calls the checkpoint and judging whether each method call link contains a unique identifier corresponding to the test case, the validity of the test case is determined, thereby reducing the execution of invalid cases, further reducing the test time, and avoiding waste of resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of testing technology, and in particular to a method and device for detecting a test case. Background Art

[0002] At present, in order to improve testing efficiency, automated testing methods are usually used in combination with automated testing frameworks for testing.

[0003] When the function of the application to be tested is tested through the automated testing method, the test platform can first obtain a test case, which is used to test a certain business information in the application to be tested. After that, the test case is executed in the test framework, and the response result of the application to be tested is captured. Then, the checkpoint in the test framework is called through the test case to compare the captured response result of the application to be tested with the expected result. Finally, based on the comparison result, a quality assessment report for the test case is generated. The quality assessment report contains information such as whether the functional test is normal, so as to prompt the tester whether the function of the application needs to be improved. Among them, the checkpoint refers to a function in the test framework that is used to compare the captured information with the expected result. Summary of the invention

[0004] The embodiments of this specification provide a test case detection method and device, which are used to partially solve the problem in the prior art that when a checkpoint is not called in a test case, the test case cannot detect business information, and executing the test case takes a long time and causes a waste of resources.

[0005] The embodiments of this specification adopt the following technical solutions:

[0006] This specification provides a test case detection method, including:

[0007] The test platform obtains a test case set, and performs testing according to each test case in the test case set;

[0008] Monitoring a method call chain of a checkpoint in the test platform through a preset monitoring code, wherein the method call chain includes a unique identifier corresponding to the test case;

[0009] For each test case, determine whether each monitored method call link contains a unique identifier corresponding to the test case;

[0010] If yes, the test case is determined to be a valid test case;

[0011] If not, the test case is determined to be an invalid test case, and the tester is prompted to make modifications based on the information of the invalid test case.

[0012] Optionally, monitoring the method call link of calling the checkpoint in the test platform through a preset monitoring code specifically includes:

[0013] Monitoring, by means of a preset monitoring code, a call request of the test case to call a checkpoint in the test platform;

[0014] According to the monitored call request, a method call link corresponding to the call request is determined.

[0015] Optionally, determining whether each monitored method call link contains a unique identifier corresponding to the test case specifically includes:

[0016] Determine the unique identifier corresponding to each test case contained in each method call chain that calls the checkpoint;

[0017] Matching the unique identifier corresponding to the test case with the unique identifiers corresponding to the test cases included in the method call chain respectively;

[0018] According to the matching result, it is determined whether each method call link of the call checkpoint contains the unique identifier corresponding to the test case.

[0019] Optionally, when the test case set includes a test case, the method further includes:

[0020] If a method call link that calls a checkpoint in the test platform is detected through a preset monitoring code, the test cases included in the test case set are determined to be valid test cases.

[0021] Optionally, the method further comprises:

[0022] For each checkpoint in the test platform, determine whether the monitored method call link for calling the checkpoint contains the unique identifier corresponding to the test case;

[0023] When the method call link contains the unique identifier corresponding to the test case, it is determined that the test case has called the checkpoint.

[0024] Optionally, the method further comprises:

[0025] The business information detected by the checkpoint is tested according to a number of test cases that call the checkpoint and are included in the test case set.

[0026] Optionally, the method further comprises:

[0027] Testing is performed according to each valid case included in the determined test case set.

[0028] This specification provides a test case detection device, including:

[0029] An acquisition module is used to acquire a test case set through a test platform, and perform a test according to each test case in the test case set;

[0030] A monitoring module, used to monitor the method call chain of the checkpoint in the test platform through a preset monitoring code, wherein the method call chain contains a unique identifier corresponding to the test case;

[0031] The judgment module is used to judge, for each test case, whether the monitored method call link contains the unique identifier corresponding to the test case. If so, the test case is determined to be a valid case. If not, the test case is determined to be an invalid case, and the tester is prompted to make modifications based on the information of the invalid case.

[0032] This specification provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the detection method of the above test case is implemented.

[0033] This specification provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned test case detection method when executing the program.

[0034] At least one of the above technical solutions adopted in the embodiments of this specification can achieve the following beneficial effects:

[0035] In this specification, the test platform can first obtain a set of test cases for testing, and perform testing according to the test case set. After that, the method call link that calls the checkpoint in the test platform is monitored through the monitoring code, and for each test case, it is determined whether each monitored method call link contains the unique identifier corresponding to the test case. When each monitored method call link contains the unique identifier corresponding to the test case, the test case is determined to be a valid case. When each monitored method call link does not contain the unique identifier corresponding to the test case, the test case is determined to be an invalid case, and the tester is prompted to modify the invalid case. By monitoring each method call link that calls the checkpoint and determining whether each method call link contains the unique identifier corresponding to the test case, the validity of the test case is determined, thereby reducing the execution of invalid cases, further reducing the test time, and avoiding waste of resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0037] Figure 1 A flowchart of a test case detection method provided in an embodiment of this specification;

[0038] Figure 2 A schematic diagram of the structure of a test platform provided in an embodiment of this specification;

[0039] Figure 3 A schematic diagram of the structure of a detection device for a test case provided in an embodiment of this specification;

[0040] Figure 4 A schematic diagram of an electronic device for implementing a detection method for a test case provided in an embodiment of this specification. DETAILED DESCRIPTION

[0041] In order to make the purpose, technical solutions and advantages of this specification more clear, the technical solutions of this application will be clearly and completely described below in combination with the specific embodiments of this specification and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in the specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0042] At present, in order to improve the testing efficiency, the testing method is gradually changing from manual testing to automated testing. In the manual testing stage, due to the manual participation of testers, when the functions of some test cases are more complex, the testers can directly judge whether the functions can be implemented normally. For example: when detecting whether the color of the text on the page is red, since it is more complicated to write the function of detecting the color of the text in the test case, the written test case only needs to realize the operation of opening the page, and the tester can independently judge the color of the text on the opened page.

[0043] In the stage of automated testing, since the manual participation of testers is reduced, there is no need to manually judge the execution results of test cases. Therefore, when executing test cases in the automated testing framework, the checkpoints in the testing framework can be directly called by the test cases, and the captured response results of the application to be tested can be compared with the expected results to determine whether the test functions are normal.

[0044] However, for the test cases written in the manual testing phase, which do not include the detection function but are manually judged, directly executing the test cases in the automated testing framework cannot detect whether the function is normal. In other words, for the test cases that do not call the checkpoint and execute the detection function, the function cannot be detected. Instead, executing the test cases takes a long time, resulting in a waste of testing resources.

[0045] Therefore, this specification provides a test case detection method, which can determine whether the test case can realize the function detection according to whether the test case calls the checkpoint, and the test case that can perform the function detection is regarded as a valid test case, which can be used in the subsequent test process to reduce the test time and the waste of test resources. The test case that does not perform the function detection is regarded as an invalid test case, prompting the tester to modify or delete it.

[0046] The technical solutions provided by various embodiments of the present application are described in detail below in conjunction with the accompanying drawings.

[0047] Figure 1 A flow chart of a test case detection method provided in an embodiment of this specification may specifically include the following steps:

[0048] S100: The test platform obtains a test case set, and performs a test according to each test case in the test case set.

[0049] Usually, when testing various functions (business information) in the application to be tested, it is necessary to write a set of test cases for testing in advance according to the business logic of the application to be tested. And when performing automated testing, the automated testing process can be executed in the automated testing platform. Among them, the automated testing platform includes a test framework, a console, and a data collection platform, such as Figure 2 As shown, the test framework is used to execute test cases, and in this specification, the test framework can also be used to monitor the calling of checkpoints. Among them, the test framework can be an aframe or an xframe framework, etc., which can be set as needed. The console is used to display the execution results of the test case to prompt the tester to make modifications, and the data collection platform is used to read and parse the execution results of the test case and generate a quality assessment report for the test case.

[0050] When performing automated testing in this specification, specifically, first, the test platform can obtain a test case set. The test case set contains several test cases, which can be written by the tester in advance according to the business logic of the application to be tested, or can be generated based on the tester's operation recording in the application to be tested. This specification does not limit the source of the test case, which can be set as needed. After that, the test is performed by running each test case in the test case set simultaneously in the test framework.

[0051] S102: monitoring the method call link of the checkpoint in the test platform through a preset monitoring code.

[0052] The test case detection method provided in this specification is used to determine whether the test case is valid according to whether the test case calls the checkpoint. Therefore, when executing the test case in this specification, the calling of each checkpoint in the test framework can be monitored, and the validity of the test case can be determined according to the calling of each checkpoint.

[0053] Specifically, for each checkpoint provided in the test platform, a monitoring code for monitoring the call of the checkpoint can be automatically inserted when the test platform is started, and the call of the checkpoint can be monitored in real time through the monitoring code during the running of the test case. Among them, the checkpoint is a function for detection provided by the test platform, such as: text checkpoint, object checkpoint, etc., which are used to detect text and objects respectively to determine whether they are consistent with the expected results.

[0054] Afterwards, since each test case performs different operations during the running process, that is, calls different methods, in other words, a test case corresponds to a method call link during the running process. The method call link refers to the set of methods called in sequence by the test case during the running process. Therefore, the method call link that calls the checkpoint can be monitored through the monitoring code. Among them, the method call link contains the unique identifier corresponding to the test case, which is expressed in the form of "class + method".

[0055] Furthermore, since the checkpoint is a detection method encapsulated in the test framework, when adding monitoring code, the monitoring code can be added to the checkpoint through code insertion when the test platform is started to monitor the situation where the checkpoint is called.

[0056] Furthermore, when the monitoring code monitors the method call link of calling the checkpoint, the monitoring code can monitor the call request for calling the checkpoint sent during the test case execution, and determine the method call link corresponding to the call request based on the monitored call request.

[0057] It should be noted that in this specification, when monitoring the method call link of the call checkpoint through the monitoring code, it can be monitored specifically through Java dynamic tracing technology. Since Java dynamic tracing technology is already a relatively mature existing technology, this specification will not elaborate on it.

[0058] S104: for each test case, determine whether each monitored method call link contains a unique identifier corresponding to the test case, if so, execute step S106, if not, execute step S108.

[0059] In one or more embodiments of the present specification, after monitoring the calling of each checkpoint in the test framework during the execution of each test case, the test case that called the checkpoint can be determined based on the monitored method call links.

[0060] Specifically, for each test case, the test platform can first determine the unique identifier corresponding to the test case in the method call chain, and then match the unique identifier corresponding to the test case with the unique identifier corresponding to each test case contained in each method call chain monitored to the call checkpoint. Finally, based on the matching result, it is determined whether each method call chain of the call checkpoint contains the unique identifier corresponding to the test case.

[0061] S106: Determine that the test case is a valid test case.

[0062] In one or more embodiments of the present specification, when the match is determined to be successful through step S104, that is, each method call link monitored contains a unique identifier corresponding to the test case, it can be determined that the test case actually calls the checkpoint in the test framework during operation, and the function can be tested. Therefore, the test case can be determined to be a valid test case, and the detected valid test case can be used for testing in subsequent tests to avoid wasting test time and test resources. That is, the test case determined to be a valid test case is used for application testing.

[0063] Of course, the information of the valid test case can also be sent to the data collection platform, so that the information of the valid test case can be read and analyzed by the data collection platform to generate a quality assessment report of the test case, wherein the quality assessment report includes information such as the running time of the test case, the execution result, and whether it is valid.

[0064] S108: Determine that the test case is an invalid test case, and prompt the tester to modify it according to the information of the invalid test case.

[0065] In one or more embodiments of the present specification, when it is determined through step S104 that the match is unsuccessful, that is, the monitored method call links do not contain the unique identifier corresponding to the test case, it can be determined that the test case did not actually call any checkpoint in the test framework during operation, nor did it test any function.

[0066] Therefore, the test case can be determined to be an invalid test case, and the information of the detected invalid test case can be sent to the console to prompt the tester to modify the test case. And / or the information of the invalid test case can be sent to the data collection platform, so that the data collection platform can read and analyze the information of the invalid test case, generate a quality assessment report of the test case, and enable the tester to modify it according to the quality assessment report of the test case. Among them, the quality assessment report contains information such as the running time of the test case, the execution result, and whether it is valid.

[0067] based on Figure 1 The test case detection method shown is that the test platform can first obtain the test case set for testing, and perform testing according to the test case set. After that, the method call link that calls the checkpoint in the test platform is monitored through the monitoring code, and for each test case, it is judged whether each monitored method call link contains the unique identifier corresponding to the test case. When each monitored method call link contains the unique identifier corresponding to the test case, the test case is determined to be a valid case. When each monitored method call link does not contain the unique identifier corresponding to the test case, the test case is determined to be an invalid case, and the tester is prompted to modify the invalid case. The validity of the test case is determined by monitoring each method call link that calls the checkpoint and judging whether each method call link contains the unique identifier corresponding to the test case, thereby reducing the execution of invalid cases, further reducing the test time, and avoiding waste of resources.

[0068] The test case detection method provided in this specification is to monitor the method call chains that call each checkpoint to determine whether the test case calls the checkpoint during execution. Compared with static detection of test cases, the validity of the test case is determined by identifying whether the test case contains code that calls the checkpoint, which reduces the situation where the test case contains code that calls the checkpoint due to code logic, but is not executed during execution, resulting in judgment errors. For example, suppose the business logic when writing a test case is: if the preset conditions are met, the checkpoint is called, otherwise the checkpoint is not called. Then, by statically judging the code in the test case, it can be determined that the test case contains code that calls the checkpoint and is a valid case. However, during the running of the test case, the preset conditions are not met, so the checkpoint is not called, and the static judgment of the validity of the test case is wrong.

[0069] In this specification, when testing test cases, test cases that call a certain checkpoint can also be detected in a targeted manner. Specifically, for each checkpoint in the test platform, after the method call link that calls the checkpoint is detected through the monitoring code, for each test case, it can be determined whether the method call link that calls the checkpoint contains the unique identifier corresponding to the test case. When the method call link contains the unique identifier corresponding to the test case, it can be determined that the test case has called the checkpoint. Afterwards, the business information detected by the checkpoint can be tested through the test case that has been determined to call the checkpoint.

[0070] Of course, in this specification, the test case set may also include only one test case. In step S102, when the method call link that calls the checkpoint in the test platform is monitored through the preset monitoring code, it can be determined that the test case included in the test case set is a valid test case.

[0071] Furthermore, after determining the validity of each test case in the present specification, that is, determining whether each test case is an invalid case or a valid case, the test platform can generate a quality assessment report for each test case based on the running time, execution results and validity of the test case.

[0072] It should be noted that the test case detection method provided in this specification can be executed before using the test case for testing, or can be executed during the test case for testing. Of course, in order to reduce the waste of test resources, it is usually executed during the first test using the test case, and in subsequent tests, the test can be performed according to the determined valid case.

[0073] based on Figure 1 The test case detection method shown in the figure, the embodiment of this specification also provides a structural schematic diagram of a test case detection device, such as Figure 3 shown.

[0074] Figure 3 A schematic diagram of a detection device for a test case provided in an embodiment of this specification, the device comprising:

[0075] An acquisition module 200 is used to acquire a test case set through a test platform, and perform a test according to each test case in the test case set;

[0076] A monitoring module 202, used to monitor the method call chain of the checkpoint in the test platform through a preset monitoring code, wherein the method call chain includes a unique identifier corresponding to the test case;

[0077] The judgment module 204 is used to judge, for each test case, whether the monitored method call link contains the unique identifier corresponding to the test case. If so, the test case is determined to be a valid case. If not, the test case is determined to be an invalid case, and the tester is prompted to make modifications based on the information of the invalid case.

[0078] Optionally, the monitoring module 202 is specifically used to monitor the call request of the test case to call the checkpoint in the test platform through a preset monitoring code, and determine the method call link corresponding to the call request based on the monitored call request.

[0079] Optionally, the judgment module 204 is specifically used to determine the unique identifier corresponding to each test case contained in each method call chain of the calling checkpoint, match the unique identifier corresponding to the test case with the unique identifier corresponding to each test case contained in the method call chain, and judge whether the unique identifier corresponding to the test case is contained in each method call chain of the calling checkpoint based on the matching result.

[0080] Optionally, when the test case set includes one test case, the test case detection device also includes a single case detection module 206, and the single case detection module 206 is specifically used to determine that the test case included in the test case set is a valid case if a method call link that calls a checkpoint in the test platform is monitored through a preset monitoring code.

[0081] Optionally, the judgment module 204 is also used to determine, for each checkpoint in the test platform, whether the monitored method call link that calls the checkpoint contains a unique identifier corresponding to the test case; when the method call link contains a unique identifier corresponding to the test case, it is determined that the test case has called the checkpoint.

[0082] Optionally, the judgment module 204 is further configured to test the business information detected by the checkpoint according to a number of test cases in the test case set that call the checkpoint.

[0083] Optionally, the test case detection device further includes a test module 208, and the test module 208 is specifically used to perform testing according to each valid test case included in the test case set.

[0084] The present specification also provides a computer-readable storage medium, which stores a computer program, which can be used to execute the above Figure 1 Provides the detection method for the test case.

[0085] based on Figure 1The test case detection method shown in the specification also proposes Figure 4 The schematic structure diagram of the electronic device shown in FIG. Figure 4 At the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, and may also include other hardware required for the business. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to achieve the above Figure 1 The instrumentation method for the test case shown.

[0086] Of course, in addition to software implementation, this specification does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is to say, the executor of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0087] In the 1990s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages ​​and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.

[0088] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the devices for implementing various functions can be regarded as both software modules for implementing the method and structures within the hardware component.

[0089] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0090] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0091] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0092] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0093] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0094] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0095] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0096] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0097] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0098] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0099] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems or computer program products. Therefore, this specification may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0100] This specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0101] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0102] The above description is only an embodiment of the present specification and is not intended to limit the present specification. For those skilled in the art, the present specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification shall be included in the scope of the claims of the present specification.

Claims

1. A method for detecting a test case, characterized in that: The method comprises: The test platform obtains a test case set, and performs testing according to each test case in the test case set; Monitoring a method call link of a checkpoint in the test platform through a preset monitoring code, wherein the method call link includes a unique identifier corresponding to the test case; For each test case, determine whether each monitored method call link contains a unique identifier corresponding to the test case; If yes, the test case is determined to be a valid test case; If not, the test case is determined to be an invalid test case, and the tester is prompted to make modifications based on the information of the invalid test case.

2. The method according to claim 1, characterized in that Monitoring the method call link of calling the checkpoint in the test platform through the preset monitoring code specifically includes: Monitoring, by means of a preset monitoring code, a call request of the test case to call a checkpoint in the test platform; According to the monitored call request, a method call link corresponding to the call request is determined.

3. The method according to claim 1, characterized in that Determine whether each monitored method call link contains the unique identifier corresponding to the test case, specifically including: Determine the unique identifier corresponding to each test case contained in each method call link of the call checkpoint; Matching the unique identifier corresponding to the test case with the unique identifiers corresponding to the test cases included in the method call link respectively; According to the matching result, it is determined whether each method call link of the call checkpoint contains the unique identifier corresponding to the test case.

4. The method according to claim 1, characterized in that When the test case set includes a test case, the method further includes: If a method call link that calls a checkpoint in the test platform is detected through a preset monitoring code, the test cases included in the test case set are determined to be valid test cases.

5. The method according to claim 1, characterized in that The method further comprises: For each checkpoint in the test platform, determine whether the monitored method call link for calling the checkpoint contains the unique identifier corresponding to the test case; When the method call link contains the unique identifier corresponding to the test case, it is determined that the test case has called the checkpoint.

6. The method according to claim 5, characterized in that The method further comprises: The business information detected by the checkpoint is tested according to a number of test cases that call the checkpoint and are included in the test case set.

7. The method according to claim 1, characterized in that The method further comprises: Testing is performed according to each valid test case included in the test case set.

8. A test case detection device, characterized in that: include: An acquisition module is used to acquire a test case set through a test platform, and perform a test according to each test case in the test case set; A monitoring module, used to monitor the method call link of calling the checkpoint in the test platform through a preset monitoring code, wherein the method call link includes a unique identifier corresponding to the test case; The judgment module is used to judge, for each test case, whether the monitored method call link contains the unique identifier corresponding to the test case. If so, the test case is determined to be a valid case. If not, the test case is determined to be an invalid case, and the tester is prompted to make modifications based on the information of the invalid case.

9. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method described in any one of claims 1 to 7 is implemented.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method described in any one of claims 1 to 7 is implemented.