Nothing Special   »   [go: up one dir, main page]

CN112882937A - Test case processing method and device, computer equipment and storage medium - Google Patents

Test case processing method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN112882937A
CN112882937A CN202110210346.4A CN202110210346A CN112882937A CN 112882937 A CN112882937 A CN 112882937A CN 202110210346 A CN202110210346 A CN 202110210346A CN 112882937 A CN112882937 A CN 112882937A
Authority
CN
China
Prior art keywords
test case
test
format
evaluation value
instruction
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
CN202110210346.4A
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.)
Ping An Puhui Enterprise Management Co Ltd
Original Assignee
Ping An Puhui Enterprise Management 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 Ping An Puhui Enterprise Management Co Ltd filed Critical Ping An Puhui Enterprise Management Co Ltd
Priority to CN202110210346.4A priority Critical patent/CN112882937A/en
Publication of CN112882937A publication Critical patent/CN112882937A/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/3684Test management for test design, e.g. generating new test cases

Landscapes

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

Abstract

The application relates to a method and a device for processing a test case, computer equipment and a storage medium, wherein the method comprises the following steps: receiving a test instruction, wherein the test instruction comprises at least two requirement characteristics; searching at least one first test case corresponding to at least two requirement characteristics from a test case management system, wherein the first test case is composed based on a first format; generating a second test case based on at least one first test case, wherein the second test case is written based on a second format, and the readability of the second format is stronger than that of the first format; and displaying the second test case at a position corresponding to the test instruction. By the method and the device, readability of the test cases can be improved, and utilization rate of the test cases can be improved conveniently.

Description

Test case processing method and device, computer equipment and storage medium
Technical Field
The application relates to the technical field of computers, and mainly relates to a method and a device for processing a test case, computer equipment and a storage medium.
Background
In order to facilitate other testers to use the test cases of the same service line, a test case management system can be configured in a company and used for storing the test cases compiled by the testers. However, because the writing styles of each person are different, the specifications of the test cases in the test case management system are not uniform, and the test cases are difficult to be directly used by others. And the test cases in the test case management system are usually based on an Excel format or a Word format, readability is poor, and the usable test cases are difficult to directly identify, so that the use rate of the test cases is low.
Disclosure of Invention
The embodiment of the application provides a method and a device for processing a test case, computer equipment and a storage medium, which can improve the readability of the test case and facilitate the utilization rate of the test case.
In a first aspect, an embodiment of the present application provides a method for processing a test case, where:
receiving a test instruction, wherein the test instruction comprises at least two requirement characteristics;
searching at least one first test case corresponding to at least two requirement characteristics from a test case management system, wherein the first test case is composed based on a first format;
generating a second test case based on at least one first test case, wherein the second test case is written based on a second format, and the readability of the second format is stronger than that of the first format;
and displaying the second test case at a position corresponding to the test instruction.
In a second aspect, an embodiment of the present application provides a device for processing a test case, where:
a communication unit for receiving a test instruction, the test instruction comprising at least two requirement characteristics;
the processing unit is used for searching at least one first test case corresponding to at least two requirement characteristics from a test case management system, and the first test case is composed based on a first format; generating a second test case based on at least one first test case, wherein the second test case is written based on a second format, and the readability of the second format is stronger than that of the first format;
and the display unit is used for displaying the second test case at a position corresponding to the test instruction.
In a third aspect, an embodiment of the present application provides a computer apparatus, including a processor, a memory, a communication interface, and one or at least one program, where the one or at least one program is stored in the memory and configured to be executed by the processor, and the program includes instructions for some or all of the steps described in the first aspect.
In a fourth aspect, the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, where the computer program makes a computer execute to implement part or all of the steps described in the first aspect.
The embodiment of the application has the following beneficial effects:
after the method and the device for processing the test cases, the computer equipment and the storage medium are adopted, if a test instruction comprising at least two requirement characteristics is received, a first test case corresponding to the at least two requirement characteristics is searched from the test case management system. And generating a second test case based on the first test case, and then displaying the second test case. The second test case is written based on the second format, and the readability of the second format is higher than that of the first format, so that the readability of the test case can be improved, a tester can conveniently determine whether to download the second test case based on the displayed second test case, and the utilization rate of the test case is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application 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 some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Wherein:
fig. 1 is a schematic flowchart of a method for processing a test case according to an embodiment of the present disclosure;
fig. 2 is a schematic structural diagram of a device for processing a test case according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions of the present application better understood, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art without any inventive work according to the embodiments of the present application are within the scope of the present application.
The terms "first," "second," and the like in the description and claims of the present application and in the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
The network architecture applied by the embodiment of the application comprises a server and electronic equipment. The electronic device may be a Personal Computer (PC), a notebook computer, or a smart phone, and may also be an all-in-one machine, a palm computer, a tablet computer (pad), a smart television playing terminal, a vehicle-mounted terminal, or a portable device. The operating system of the PC-side electronic device, such as a kiosk or the like, may include, but is not limited to, operating systems such as Linux system, Unix system, Windows series system (e.g., Windows xp, Windows 7, etc.), Mac OS X system (operating system of apple computer), and the like. The operating system of the electronic device at the mobile end, such as a smart phone, may include, but is not limited to, an operating system such as an android system, an IOS (operating system of an apple mobile phone), a Window system, and the like.
The server is used for providing services for the electronic equipment. The electronic device in the embodiment of the application can install and run the application program, and the server can be a server corresponding to the application program installed in the electronic device and provide application service for the application program. The application program can be directed to a project development management system, a test case management system and the like. The application program may be a single integrated application program, or an embedded applet in other applications, or a system on a web page, etc., which is not limited herein. The number of the electronic devices and the number of the servers are not limited in the embodiment of the application, and the servers can provide services for at least two electronic devices simultaneously. The server may be implemented as a stand-alone server or as a server cluster of at least two servers.
In the embodiment of the application, the test cases entered by each tester can be pre-stored by the test case management system, and the test cases can be entered manually by the tester or automatically after receiving the test cases uploaded by the tester, which is not limited herein. The test cases in the test case management system can comprise the entry personnel, the entry time, the modification time, the download times, the browsing times and the like of the test cases. The input personnel can be personnel for manually inputting the test cases or personnel for uploading the test cases. The logging time may be a time stored to the test case management system. The modification time may be the time that the test case is updated, that is, the time that is modified. The downloading times and the browsing times are the times of downloading the test case and the times of browsing. Furthermore, the method may further include entering information such as departments, positions, and test seniorities of the personnel, or include information such as test items or test names, test types, and test requirements of the test cases, which is not limited herein.
It should be noted that the test case in the test case management system is written based on a first format, and the first format may be at least one of a Word format, an Excel format, a Hypertext Markup Language (HTML) format, and the like, which is not limited herein. When the test case received by the test case management system is not in the first format, format conversion is required. The embodiment of the application is exemplified by taking a non-first format as a second format, where the second format may be an xmnd format, and the xmnd format is a visual test case based on a tree structure. Therefore, the readability of the test case can be improved through the Xmind format, and the modification by a tester is facilitated.
In a possible example, if a fourth test case written based on the second format is received, the fourth test case is converted based on the second format and the first format to obtain a fifth test case, and the fifth test case is written based on the first format; and storing the fifth test case in the test case management system.
The fourth test case is composed based on the second format and is different from the first format required by the test case management system. When the tester uploads the fourth test case, the fourth test case can be converted into a fifth test case written based on the first format and the second format, and the fifth test case is stored in the test case management system. Therefore, the fourth test case does not need to be modified manually by a tester, and the efficiency of storing the test cases can be improved. And after the test cases are stored in the test case management system, the test cases can be provided for other testers for reuse, so that the utilization rate of the test cases is improved.
The method for converting the fourth test case into the fifth test case is not limited, the fourth test case can be analyzed according to the second format to obtain the test logic of each test submodule, and then the test logic of each test submodule is written according to the first format to obtain the fifth test case; or converting the fourth test case according to the composition relationship between the first format and the second format to obtain a fifth test case and the like.
The method for processing the test case provided by the embodiment of the application can be executed by a device for processing the test case, wherein the device can be realized by software and/or hardware, can be generally integrated in a server, and can improve the data utilization rate of the test case.
Referring to fig. 1, fig. 1 is a schematic flow chart illustrating a method for processing a test case according to the present application. The method is exemplified by being applied to a server, and comprises the following steps:
s101: receiving a test instruction, wherein the test instruction comprises at least two requirement characteristics.
In the embodiment of the application, the test instruction can be obtained according to the text information input by the tester, or can be obtained by performing voice recognition and analysis according to the audio file input by the tester through voice. The test instruction may be input by a tester on the current electronic device, or may be received from another electronic device on the current electronic device, which is not limited herein.
The test instructions may include at least two requirement characteristics, which may be based on a test type, e.g., performance testing, interface testing, etc. The demand characteristics may also be based on test objects, such as financial management systems, attendance management systems, sub-modules in the system, and the like. The demand characteristics may also include a demand based test indicator, such as error, accuracy, precision, etc. It can be understood that different test types and test methods thereof are different, and different test objects and different test indexes and methods thereof to be tested are different. The second test case is searched based on different requirement characteristics, so that the accuracy of searching the test case can be improved, and the test efficiency and the accuracy are improved conveniently. The test instruction may be for a completely new system or a module in the system, or may be for a test on an improvement point of the system or the module in the system, and the like, which is not limited herein.
S102: and searching at least one first test case corresponding to the at least two requirement characteristics from the test case management system, wherein the first test case is composed based on the first format.
The first format and the second format are not limited in the present application, and as described above, the first format may be a Word format, an Excel format, or a Hypertext Markup Language (HTML) format, and the second format may be an Xmind format, or the like. It should be noted that the readability of the second format is stronger than that of the first format, and the readability of the test case can be improved when the test case in the second format is displayed.
In the embodiment of the present application, the first test case is a test case that completely satisfies or satisfies part of the test instructions in the test case management system, and may be understood as a test case that can be directly used by the test instructions, or a test case that can be used by the test instructions after being modified. It should be noted that the number of the first test cases may be one or at least two, which may be understood as a part of the test instructions that are satisfied in each first test case, or may be understood as a test case corresponding to the test instruction that is obtained by combining at least two first test cases.
The method for searching for the first test case is not limited, and the test cases in the test case management system can be analyzed to obtain the requirement characteristics of each test case, such as the test name, the related function module, the test data and other information, and the information is stored. Therefore, when the test instruction is received, the test instruction can be analyzed to obtain the requirement characteristic corresponding to the test instruction, and therefore the first test case corresponding to the test instruction is searched in the test case management system.
In one possible example, step S102 includes the following steps A1-A3, wherein:
a1: and searching at least one third test case corresponding to each requirement characteristic from the test case management system.
In this embodiment of the application, the third test case is a test case corresponding to at least one requirement characteristic in the test case management system. The number of the third test cases is not limited, one requirement characteristic can correspond to at least one third test case, and one third test case can also correspond to at least one requirement characteristic. The method for searching for the third test case is not limited, and the third test case can be searched based on each requirement characteristic, so that the searched third test case meets at least one requirement characteristic.
A2: and acquiring the target evaluation values of the third test cases to obtain at least two target evaluation values.
In the embodiment of the present application, the target evaluation value is used to describe whether the third test case satisfies the matching degree of the test instruction. The method for obtaining the target evaluation value is not limited in the present application, and is exemplified by a reference test case in the third test case, and in a possible example, the step a2 includes the following steps a21 to a24, where:
a21: and acquiring a first evaluation value of the reference test case meeting at least two requirement characteristics.
The first evaluation value is used for describing the amplitude of the reference test case meeting all the requirement characteristics. The method for obtaining the first evaluation value is not limited, and the evaluation sub-values corresponding to the requirement characteristics which are met by the reference test case can be obtained, and then the first evaluation value and the like are obtained by weighting according to the preset weight of the requirement characteristics. The preset weight of each requirement characteristic can be determined according to the influence of the requirement characteristic on the test data and the test result, and is not limited herein.
A22: and acquiring the downloading times and the reference writing style of the reference test case.
A23: and acquiring a second evaluation value of the reference test case based on the downloading times and/or the reference writing style.
The number of downloads can be referred to above, and is not described herein again. It is to be understood that the number of downloads may be used to describe the number of times the reference test case is reused, may reflect the popularity of the reference test case, and may also reflect the writing quality of the reference test case. The evaluation value of the reference test case is obtained through the downloading times, so that the accuracy of obtaining the second evaluation value can be improved, and the accuracy of selecting the reference test case as the first test case is improved conveniently.
The reference writing style is a writing style of the reference test case. It can be understood that the test cases written by different testers have different writing styles, and the evaluation value of the reference test case is obtained by referring to the writing styles, so that the accuracy of obtaining the second evaluation value can be improved, and the accuracy of selecting the reference test case as the first test case can be improved conveniently.
The method for acquiring the second evaluation value is not limited in the present application, and may be acquired based on the number of downloads or the reference writing style, or may be acquired based on the number of downloads and the reference writing style. In one possible example, the test instruction includes identification information of the tester, and step a23 includes the following steps a231 to a234, where:
a231: and acquiring a third evaluation value of the reference test case based on the downloading times.
The third evaluation value may be used to reflect the popularity of the reference test case, and may also reflect the writing quality of the reference test case. The third evaluation value may be obtained according to a preset association relationship between the download times and the evaluation value, may also be obtained according to a ratio between the download times and the browsing times, or may be obtained according to a ratio between the download times and the total download times of all the third test cases, and the like, which is not limited herein.
A232: and determining the target writing style of the tester according to the identification information.
Wherein, the target writing style is the writing style of the tester corresponding to the test instruction. The identification information is used to determine the identity of the tester, and the identification information may be a serial number, a name, an identification number, a telephone number, an email, etc. of the tester, which is not limited herein. The method for determining the target writing style is not limited, and the test cases input by different testers as input personnel can be recorded in the test case management system in advance, so that the test cases corresponding to the testers in the test case management system can be searched according to the identification information of the testers, the test cases are analyzed, and the target writing style of the testers can be obtained.
A233: and acquiring a fourth evaluation value of the reference test case based on the reference writing style and the target writing style.
And the fourth evaluation value is used for describing the probability that the reference test case is used as the probability that the tester corresponding to the test instruction of the first test case uses the reference test case. It will be appreciated that as the target composition style and the reference composition style are more similar, the tester is more likely to understand the reference test cases, and the server takes less time to convert similar types of test cases. Therefore, the fourth evaluation value may be acquired based on the reference writing style and the target writing style. The method for obtaining the fourth evaluation value is not limited in the present application, and may be obtained based on a similarity value between the reference writing style and the target writing style, or based on a difference value between the reference writing style and the target writing style, or the like.
A234: and determining a second evaluation value of the reference test case based on the third evaluation value and/or the fourth evaluation value.
The second evaluation value may be a third evaluation value, a fourth evaluation value, or a weighted average of the third evaluation value and the fourth evaluation value, and the preset weights of the third evaluation value and the fourth evaluation value may be determined according to the requirement characteristics corresponding to the reference test case, which is not limited herein.
It is to be understood that, in steps a231 to a234, determining the second evaluation value based on the third evaluation value acquired based on the number of downloads and/or the fourth evaluation value acquired with reference to the writing style and the target writing style can improve the accuracy of the second evaluation value.
A24: a target evaluation value of the reference test case is determined based on the first evaluation value and the second evaluation value.
The target evaluation value may be a weighted average value of the first evaluation value and the second evaluation value, and the preset weights of the first evaluation value and the second evaluation value may be determined according to the requirement characteristics corresponding to the reference test case, for example, the preset weight of the first evaluation value is determined according to the importance of the requirement characteristics, or the first evaluation value is determined according to the number of the requirement characteristics satisfied by the reference test case; and acquiring a preset weight value of the second evaluation value and the like according to the difference value between the 1 and the first evaluation value.
It is understood that, in steps a 21-a 24, the target evaluation value is obtained based on the first evaluation value that the reference test case satisfies the plurality of requirement characteristics, and the second evaluation value corresponding to the download number and/or the reference writing style, and the accuracy of obtaining the target evaluation value can be improved.
A3: and selecting at least one first test case from the third test cases based on the at least two target evaluation values.
The method for selecting the first test case is not limited, and a third test case corresponding to the maximum value of at least two target evaluation values can be selected as the first test case; or the third test case corresponding to the maximum target evaluation value corresponding to each demand characteristic can be obtained as the first test case by classifying according to the demand characteristics.
It can be understood that, in steps a1 to A3, at least one third test case corresponding to each requirement characteristic is searched from the test case management system, the target evaluation value of each third test case is obtained, and then the first test case is selected from the third test cases based on the obtained target evaluation value, so that the accuracy of selecting the test cases can be improved, and the subsequent processing efficiency can be improved.
S103: and generating a second test case based on at least one first test case, wherein the second test case is written based on a second format, and the readability of the second format is stronger than that of the first format.
The method for generating the second test case is not limited in the present application, and in a possible example, the step S103 includes the following steps B1 and B2, where:
b1: and determining test logics corresponding to the at least two requirement characteristics.
In the embodiment of the present application, the test logic may be understood as a test script corresponding to a test method or a test step of a test case, and may include test parameters related to a test process, a value range of the test parameters, a test sequence of the test parameters, and the like. The method for determining the test logic is not limited in this application, and in one possible example, step B1 includes the following steps B11-B13, wherein:
b11: and determining a test sequence corresponding to at least two requirement characteristics.
The test sequence may be a sequence specified in the test instruction, or may be a test sequence determined according to the position and importance of the functional module corresponding to the requirement characteristic. It is to be understood that when the execution of the functional module itself depends on other functional modules, the test sequence of the functional module needs to be arranged after the other functional modules. When the execution among the functional modules does not depend on other functional modules, and the functional modules and other functional modules are in the same page, the test sequence can be determined according to rules of first foundation and then complex, or first complex and then foundation, and the like, which are not limited herein.
B12: and determining the test sub-logic corresponding to each requirement characteristic to obtain at least two test sub-logics.
The test sub-logic may be understood as a test method of the functional module corresponding to the requirement characteristic or a test script corresponding to the test step, and may include test parameters related to the test process, a value range of the test parameters, a test sequence of the test parameters, and the like.
B13: and combining the at least two testing sub-logics based on the testing sequence to obtain testing logics corresponding to the at least two requirement characteristics.
It can be understood that, in steps B11 to B13, the test order corresponding to at least two requirement characteristics and the test sub-logic corresponding to each requirement characteristic are obtained first, and then the obtained test sub-logics are combined based on the test order to obtain the test logics corresponding to at least two requirement characteristics, so that the rationality of the test logics can be improved, and the logics of the second test case can be improved conveniently.
B2: and converting at least one first test case based on the test logic to obtain a second test case.
The method for converting the first test case by the test logic is not limited, and in one possible example, the list hierarchical relationship of the test objects corresponding to the test instruction is obtained; and acquiring information corresponding to the first test case based on the list hierarchical relationship and the template in the second format to obtain a second test case.
The list hierarchical relationship is used for describing the association relationship among the test objects. When the test object is a system, in the second test case, the system is located at the root node of the second test case, the functional module below the system is a child node of the root node, the sub-module of the functional module can be a grandchild node of the root node, and the node at the lowest layer is a specific test case.
The template in the second format is used to describe the composition format in the second format. The information corresponding to the first test case is the information required by the second test case, and when the first test case can completely meet the second test case, all data obtained by analyzing the first test case can be used as the information corresponding to the first test case. When the first test case needs to be modified before the second test case can be obtained, the data obtained by analyzing the first test case and processing the data can be used as the information corresponding to the first test case.
In this example, the list hierarchy relationship of the test objects corresponding to the test instruction is determined, then the information corresponding to each list hierarchy in the first test case is sequentially obtained based on the template in the second format, and the test case of each test object is written in the node in the bottom layer, that is, the test case corresponding to the list hierarchy can be used as the second test case. It can be understood that the second test case is displayed in a list hierarchy mode, so that the readability of the second test case can be improved. And the second test case is written step by step, so that the accuracy of the second test case is improved.
S104: and displaying the second test case at the position corresponding to the test instruction.
The position corresponding to the test instruction is not limited in the present application, and the position may be a reply area corresponding to the test instruction, for example, below the test instruction. In one possible example, the method further comprises: and displaying the downloading prompt information of the second test case. The method and the device have the advantages that the downloading prompt information is not limited, and the downloading prompt information can include a test instruction corresponding to the second test case, or information such as a test name, a test type and a test index of the second test case, so that testers can know the second test case conveniently, and the utilization rate of the second test case can be improved. The download prompt information can be a download link of the second test case, so that when the download prompt information is clicked, the second test case can be skipped to a download page of the second test case based on the download link to realize downloading. When the test instruction is information received by the electronic device from other electronic devices, the download prompt information of the second test case can be sent to the other electronic devices, so that the download prompt information is provided for testers corresponding to the other electronic devices.
In the method shown in fig. 1, if a test instruction including at least two requirement characteristics is received, a first test case corresponding to the at least two requirement characteristics is searched from the test case management system. And generating a second test case based on the first test case, and then displaying the second test case. The second test case is written based on the second format, and the readability of the second format is higher than that of the first format, so that the readability of the test case can be improved, a tester can conveniently determine whether to download the second test case based on the displayed second test case, and the utilization rate of the test case is improved.
The method of the embodiments of the present application is set forth above in detail and the apparatus of the embodiments of the present application is provided below.
Referring to fig. 2, fig. 2 is a schematic structural diagram of a device for processing test cases according to the present application, and as shown in fig. 2, the device 200 for processing test cases includes:
a communication unit 202, configured to receive a test instruction, where the test instruction includes at least two requirement characteristics;
the processing unit 201 is configured to search at least one first test case corresponding to at least two requirement characteristics from a test case management system, where the first test case is written based on a first format; generating a second test case based on at least one first test case, wherein the second test case is written based on a second format, and the readability of the second format is stronger than that of the first format;
and the display unit 203 is configured to display the second test case at a position corresponding to the test instruction.
In a possible example, the processing unit 201 is specifically configured to search for at least one test case corresponding to each requirement characteristic from a test case management system; acquiring target evaluation values of the third test cases to obtain at least two target evaluation values; and selecting at least one first test case from the third test cases based on at least two target evaluation values.
In a possible example, the third test case includes a reference test case, and the processing unit 201 is specifically configured to obtain a first evaluation value that the reference test case satisfies at least two requirement characteristics; acquiring the downloading times and/or the reference writing style of the reference test case; acquiring a second evaluation value of the reference test case based on the downloading times and/or the reference writing style; and determining a target evaluation value of the reference test case based on the first evaluation value and the second evaluation value.
In a possible example, the test instruction includes identification information of a tester, and the processing unit 201 is specifically configured to obtain a third evaluation value of the reference test case based on the download times; determining a target writing style of the tester according to the identification information; acquiring a fourth evaluation value of the reference test case based on the reference writing style and the target writing style; and determining a second evaluation value of the reference test case based on the third evaluation value and/or the fourth evaluation value.
In one possible example, the processing unit 201 is specifically configured to determine test logic corresponding to at least two of the requirement characteristics; and converting at least one first test case based on the test logic to obtain a second test case.
In one possible example, the processing unit 201 is specifically configured to determine a test sequence corresponding to at least two of the requirement characteristics; determining a test sub-logic corresponding to each requirement characteristic to obtain at least two test sub-logics; and combining at least two test sub-logics based on the test sequence to obtain at least two test logics corresponding to the requirement characteristics.
In one possible example, the communication unit 202 is further configured to receive a fourth test case composed based on the second format; the processing unit 201 is further configured to convert the fourth test case based on the second format and the first format to obtain a fifth test case, where the fifth test case is written based on the first format; the device 200 for processing the test case further includes a storage unit 204, configured to store the fifth test case in the test case management system.
For detailed processes executed by each unit in the processing apparatus 200 for test cases, reference may be made to the execution steps in the foregoing method embodiments, which are not described herein again.
Referring to fig. 3, fig. 3 is a schematic structural diagram of a computer device according to an embodiment of the present disclosure. The computer device comprises the electronic device and the server. As shown in fig. 3, the computer device 300 includes a processor 310, a memory 320, a communication interface 330, and one or more programs 340. The related functions implemented by the communication unit 202 shown in fig. 2 can be implemented by the communication interface 330, the related functions implemented by the storage unit 204 shown in fig. 2 can be implemented by the memory 320, and the related functions implemented by the processing unit 201 and the display unit 203 shown in fig. 2 can be implemented by the processor 310.
The one or more programs 340 are stored in the memory 320 and configured to be executed by the processor 310, the programs 340 including instructions for:
receiving a test instruction, wherein the test instruction comprises at least two requirement characteristics;
searching at least one first test case corresponding to at least two requirement characteristics from a test case management system, wherein the first test case is composed based on a first format;
generating a second test case based on at least one first test case, wherein the second test case is written based on a second format, and the readability of the second format is stronger than that of the first format;
and displaying the second test case at a position corresponding to the test instruction.
In a possible example, in the aspect of searching for at least one first test case corresponding to at least two requirement characteristics from the test case management system, the program 340 is specifically configured to execute instructions of the following steps:
searching at least one test case corresponding to each requirement characteristic from a test case management system;
acquiring target evaluation values of the third test cases to obtain at least two target evaluation values;
and selecting at least one first test case from the third test cases based on at least two target evaluation values.
In one possible example, the third test case includes a reference test case, and in terms of obtaining the target evaluation value of each third test case, the program 340 is specifically configured to execute the following instructions:
acquiring a first evaluation value of the reference test case meeting at least two requirement characteristics;
acquiring the downloading times and/or the reference writing style of the reference test case;
acquiring a second evaluation value of the reference test case based on the downloading times and/or the reference writing style;
and determining a target evaluation value of the reference test case based on the first evaluation value and the second evaluation value.
In one possible example, the test instruction includes identification information of a tester, and in the aspect of obtaining the second evaluation value of the reference test case based on the download number and/or the reference writing style, the program 340 is specifically configured to execute the following steps:
acquiring a third evaluation value of the reference test case based on the downloading times;
determining a target writing style of the tester according to the identification information;
acquiring a fourth evaluation value of the reference test case based on the reference writing style and the target writing style;
and determining a second evaluation value of the reference test case based on the third evaluation value and/or the fourth evaluation value.
In one possible example, in the aspect of generating the second test case based on the at least one first test case, the program 340 is specifically configured to execute the following instructions:
determining test logics corresponding to at least two requirement characteristics;
and converting at least one first test case based on the test logic to obtain a second test case.
In one possible example, in terms of the determining the test logic corresponding to at least two of the demand characteristics, the program 340 is specifically configured to execute the following steps:
determining a test sequence corresponding to at least two of the demand characteristics;
determining a test sub-logic corresponding to each requirement characteristic to obtain at least two test sub-logics;
and combining at least two test sub-logics based on the test sequence to obtain at least two test logics corresponding to the requirement characteristics.
In one possible example, the program 340 is further for executing the instructions of:
if a fourth test case written based on the second format is received, converting the fourth test case based on the second format and the first format to obtain a fifth test case, wherein the fifth test case is written based on the first format;
and storing the fifth test case in the test case management system.
Embodiments of the present application also provide a computer storage medium, where the computer storage medium stores a computer program for causing a computer to execute to implement part or all of the steps of any one of the methods described in the method embodiments, and the computer includes an electronic device and a server.
Embodiments of the application also provide a computer program product comprising a non-transitory computer readable storage medium storing a computer program operable to cause a computer to perform to implement some or all of the steps of any of the methods recited in the method embodiments. The computer program product may be a software installation package, the computer comprising an electronic device and a server.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art will also appreciate that the embodiments described in this specification are presently preferred and that no particular act or mode of operation is required in the present application.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, a division of a unit is merely a logical division, and an actual implementation may have another division, for example, at least one unit or component may be combined or integrated with another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of some interfaces, devices or units, and may be an electric or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may also be distributed on at least one network unit. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a hardware mode or a software program mode.
The integrated unit, if implemented in the form of a software program module and sold or used as a stand-alone product, may be stored in a computer readable memory. With such an understanding, the technical solution of the present application may be embodied in the form of a software product, which is stored in a memory and includes several instructions for causing a computer device (which may be a personal computer, a server, a network device, or the like) to perform all or part of the steps of the method according to the embodiments of the present application. And the aforementioned memory comprises: various media capable of storing program codes, such as a usb disk, a read-only memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and the like.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable memory, which may include: flash disk, ROM, RAM, magnetic or optical disk, and the like.
The foregoing detailed description of the embodiments of the present application has been presented to illustrate the principles and implementations of the present application, and the above description of the embodiments is only provided to help understand the method and the core concept of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. A method for processing a test case is characterized by comprising the following steps:
receiving a test instruction, wherein the test instruction comprises at least two requirement characteristics;
searching at least one first test case corresponding to at least two requirement characteristics from a test case management system, wherein the first test case is composed based on a first format;
generating a second test case based on at least one first test case, wherein the second test case is written based on a second format, and the readability of the second format is stronger than that of the first format;
and displaying the second test case at a position corresponding to the test instruction.
2. The processing method according to claim 1, wherein said searching for at least one first test case corresponding to at least two of the requirement characteristics from the test case management system comprises:
searching at least one third test case corresponding to each requirement characteristic from a test case management system;
acquiring target evaluation values of the third test cases to obtain at least two target evaluation values;
and selecting at least one first test case from the third test cases based on at least two target evaluation values.
3. The processing method according to claim 2, wherein the third test case includes a reference test case, and the obtaining the target evaluation value of each third test case includes:
acquiring a first evaluation value of the reference test case meeting at least two requirement characteristics;
acquiring the downloading times and/or the reference writing style of the reference test case;
acquiring a second evaluation value of the reference test case based on the downloading times and/or the reference writing style;
and determining a target evaluation value of the reference test case based on the first evaluation value and the second evaluation value.
4. The processing method according to claim 2, wherein the test instruction includes identification information of a tester, and the obtaining of the second evaluation value of the reference test case based on the download number and/or the reference writing style includes:
acquiring a third evaluation value of the reference test case based on the downloading times;
determining a target writing style of the tester according to the identification information;
acquiring a fourth evaluation value of the reference test case based on the reference writing style and the target writing style;
and determining a second evaluation value of the reference test case based on the third evaluation value and/or the fourth evaluation value.
5. The processing method according to any one of claims 1 to 4, wherein the generating a second test case based on at least one of the first test cases comprises:
determining test logics corresponding to at least two requirement characteristics;
and converting at least one first test case based on the test logic to obtain a second test case.
6. The processing method according to claim 5, wherein the determining the test logic corresponding to at least two of the demand characteristics comprises:
determining a test sequence corresponding to at least two of the demand characteristics;
determining a test sub-logic corresponding to each requirement characteristic to obtain at least two test sub-logics;
and combining at least two test sub-logics based on the test sequence to obtain at least two test logics corresponding to the requirement characteristics.
7. The processing method according to any one of claims 1 to 4, characterized in that the method further comprises:
if a fourth test case written based on the second format is received, converting the fourth test case based on the second format and the first format to obtain a fifth test case, wherein the fifth test case is written based on the first format;
and storing the fifth test case in the test case management system.
8. An apparatus for processing a test case, comprising:
a communication unit for receiving a test instruction, the test instruction comprising at least two requirement characteristics;
the processing unit is used for searching at least one first test case corresponding to at least two requirement characteristics from a test case management system, and the first test case is composed based on a first format; generating a second test case based on at least one first test case, wherein the second test case is written based on a second format, and the readability of the second format is stronger than that of the first format;
and the display unit is used for displaying the second test case at a position corresponding to the test instruction.
9. A computer device comprising a processor, a memory, a communication interface, and one or at least one program, wherein the one or at least one program is stored in the memory and configured to be executed by the processor, the program comprising instructions for performing the steps in the method of any of claims 1-7.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program, the computer program causing a computer to execute to implement the method of any one of claims 1-7.
CN202110210346.4A 2021-02-25 2021-02-25 Test case processing method and device, computer equipment and storage medium Pending CN112882937A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110210346.4A CN112882937A (en) 2021-02-25 2021-02-25 Test case processing method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110210346.4A CN112882937A (en) 2021-02-25 2021-02-25 Test case processing method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112882937A true CN112882937A (en) 2021-06-01

Family

ID=76054465

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110210346.4A Pending CN112882937A (en) 2021-02-25 2021-02-25 Test case processing method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112882937A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113568833A (en) * 2021-07-28 2021-10-29 深圳Tcl新技术有限公司 Test case determination method and device, computer equipment and readable storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102364449A (en) * 2011-10-24 2012-02-29 中兴通讯股份有限公司 Generation method and system for minimum test case set
US20130275946A1 (en) * 2012-04-16 2013-10-17 Oracle International Corporation Systems and methods for test development process automation for a test harness
CN108628748A (en) * 2018-05-09 2018-10-09 平安普惠企业管理有限公司 Automatic test management method and automatic test manage system
CN109446076A (en) * 2018-10-15 2019-03-08 广东省科技基础条件平台中心 Software project testing method, system, storage medium and terminal device
CN110083527A (en) * 2019-03-18 2019-08-02 平安普惠企业管理有限公司 A kind of generation method and device, electronic equipment of test case
CN110389889A (en) * 2018-04-20 2019-10-29 伊姆西Ip控股有限责任公司 For the visualization method of test case, equipment and computer readable storage medium
CN110941546A (en) * 2019-10-12 2020-03-31 平安健康保险股份有限公司 Automatic test method, device, equipment and storage medium for WEB page case
CN111124917A (en) * 2019-12-23 2020-05-08 平安国际智慧城市科技股份有限公司 Public test case management and control method, device, equipment and storage medium
CN111563041A (en) * 2020-05-08 2020-08-21 吴迪 Test case on-demand accurate execution method

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102364449A (en) * 2011-10-24 2012-02-29 中兴通讯股份有限公司 Generation method and system for minimum test case set
US20130275946A1 (en) * 2012-04-16 2013-10-17 Oracle International Corporation Systems and methods for test development process automation for a test harness
CN110389889A (en) * 2018-04-20 2019-10-29 伊姆西Ip控股有限责任公司 For the visualization method of test case, equipment and computer readable storage medium
CN108628748A (en) * 2018-05-09 2018-10-09 平安普惠企业管理有限公司 Automatic test management method and automatic test manage system
CN109446076A (en) * 2018-10-15 2019-03-08 广东省科技基础条件平台中心 Software project testing method, system, storage medium and terminal device
CN110083527A (en) * 2019-03-18 2019-08-02 平安普惠企业管理有限公司 A kind of generation method and device, electronic equipment of test case
CN110941546A (en) * 2019-10-12 2020-03-31 平安健康保险股份有限公司 Automatic test method, device, equipment and storage medium for WEB page case
CN111124917A (en) * 2019-12-23 2020-05-08 平安国际智慧城市科技股份有限公司 Public test case management and control method, device, equipment and storage medium
CN111563041A (en) * 2020-05-08 2020-08-21 吴迪 Test case on-demand accurate execution method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113568833A (en) * 2021-07-28 2021-10-29 深圳Tcl新技术有限公司 Test case determination method and device, computer equipment and readable storage medium

Similar Documents

Publication Publication Date Title
CN110221982B (en) Performance test method, device and equipment of business system and readable storage medium
CN109740122B (en) Method and device for converting thinking guide graph use case file
CN111552633A (en) Interface abnormal call testing method and device, computer equipment and storage medium
CN110825618A (en) Method and related device for generating test case
CN112181835B (en) Automatic test method, device, computer equipment and storage medium
CN112506757A (en) Automatic test method, system, computer device and medium thereof
CN112363814A (en) Task scheduling method and device, computer equipment and storage medium
CN114510305B (en) Model training method and device, storage medium and electronic equipment
CN117389890A (en) Method and device for generating test case, electronic equipment and storage medium
CN112559866B (en) University book reading recommendation method, device, equipment and storage medium
CN112882937A (en) Test case processing method and device, computer equipment and storage medium
CN111832254B (en) Drawing annotation display processing method and device
CN108629012B (en) Intelligent verification method and system for forensic data analysis accuracy
CN108268545B (en) Method and device for establishing hierarchical user label library
CN110471708B (en) Method and device for acquiring configuration items based on reusable components
CN110674839B (en) Abnormal user identification method and device, storage medium and electronic equipment
CN114265777A (en) Application program testing method and device, electronic equipment and storage medium
CN109542986B (en) Element normalization method, device, equipment and storage medium of network data
CN115495570A (en) Application user classification method, application user evaluation method, application user classification device, application user evaluation device and application user evaluation equipment
CN113535594B (en) Method, device, equipment and storage medium for generating service scene test case
CN113609451B (en) Risk equipment identification method and device based on relational network feature derivation
CN110427935B (en) Webpage element identification method and server
CN114662700A (en) Model acquisition method, electronic device and storage medium
CN118568006A (en) Application interface calling method, device, equipment, storage medium and program product
CN118519869A (en) Page performance testing method, device, medium and equipment

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