CN110008132B - Test case design method and device, computer equipment and storage medium - Google Patents

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

Info

Publication number
CN110008132B
CN110008132B CN201910298075.5A CN201910298075A CN110008132B CN 110008132 B CN110008132 B CN 110008132B CN 201910298075 A CN201910298075 A CN 201910298075A CN 110008132 B CN110008132 B CN 110008132B
Authority
CN
China
Prior art keywords
function
combination
functions
existence
test case
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910298075.5A
Other languages
Chinese (zh)
Other versions
CN110008132A (en
Inventor
华晨
范胜利
谢后乐
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Allwinner Technology Co Ltd
Original Assignee
Allwinner Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Allwinner Technology Co Ltd filed Critical Allwinner Technology Co Ltd
Priority to CN201910298075.5A priority Critical patent/CN110008132B/en
Publication of CN110008132A publication Critical patent/CN110008132A/en
Application granted granted Critical
Publication of CN110008132B publication Critical patent/CN110008132B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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)
  • Stored Programmes (AREA)

Abstract

The application relates to a method and a device for designing a test case, computer equipment and a storage medium. The method comprises the following steps: acquiring a plurality of functions of a product to be detected; combining each function with other functions respectively to obtain a plurality of function combination items; the function combination item comprises at least two functions; determining a test case according to the plurality of function combination items and the combination existence of each function combination item; the combination existence is used for characterizing whether each function in the function combination item can form effective existence combination. Because each function and other functions can be combined respectively by the method to determine the final test case, and various combination conditions of each function are considered, the test case obtained by the method can ensure the comprehensiveness of the function test, and further improve the test quality.

Description

Test case design method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for designing a test case, a computer device, and a storage medium.
Background
With the continuous development of computer technology, various software products are more and more, and the requirements on the product quality are higher and higher, so a series of software tests are required to be performed to improve the quality of the software products. In the software testing process, the design and the compilation of the test case are crucial, and how to effectively design the test case is always a problem concerned by testers. For example, in a car product with rich functions, the product problem mainly occurs when a user uses different functions at the same time, and a test case design using the functions is urgently needed.
For the design of test cases, the conventional technology usually forms different test scenarios for each single function based on a basic flow or path scanning method, and then adds test data to form test cases.
However, for software products (e.g., car products) with more functions and heavily used functions, the test cases formed by using the conventional technology cannot ensure the comprehensiveness of the function test, resulting in lower test quality.
Disclosure of Invention
Therefore, it is necessary to provide a method and an apparatus for designing a test case, a computer device, and a storage medium, for solving the problem that the test case formed in the conventional technology cannot guarantee the comprehensiveness of the functional test, resulting in lower test quality.
In a first aspect, an embodiment of the present application provides a method for designing a test case, including:
acquiring a plurality of functions of a product to be detected;
combining each function with other functions respectively to obtain a plurality of function combination items; the function combination item comprises at least two functions;
determining a test case according to the combination existence of the plurality of function combination items and each function combination item; the combination existence is used for characterizing whether each function in the function combination item can form effective existence combination.
The design method of the test case comprises the steps of firstly obtaining a plurality of functions of a product to be tested, then combining each function with other functions respectively to obtain a plurality of function combination items, and then determining the test case according to the plurality of function combination items and the combination existence of the plurality of function combination items. Because each function and other functions can be combined respectively by the method to determine the final test case, and various combination conditions of each function are considered, the test case obtained by the method can ensure the comprehensiveness of the function test, and further improve the test quality.
In one embodiment, determining a test case according to a plurality of function combination items and the combination existence of each function combination item includes:
determining the operation of the test case: judging the combination existence of a plurality of function combination items, and determining the function combination items with the combination existence as test cases, wherein the function combination items can form effective combination;
and combining each function with the test case respectively to obtain a plurality of new function combination items, and returning to the step of executing the operation of determining the test case until a preset convergence condition is reached.
In one embodiment, the preset convergence condition includes at least one of the following conditions:
the combination existence of all new function combination items cannot form effective existence combination; the new function combination item comprises all functions of the product to be tested.
In one embodiment, determining the existence of a combination of a plurality of function combination items comprises:
and judging whether each function and other functions meet preset conditions after being combined, wherein the preset conditions are used for indicating whether the function combination items can form effective existing combinations.
In one embodiment, the determining whether each function satisfies a preset condition after being combined with other functions includes:
combining each function with other functions, matching with a requirement definition table of a product to be tested, and meeting a preset condition if matching is successful; the requirement definition table comprises functional requirements of products to be tested, which can form effective existing combinations.
In one embodiment, combining each function with other functions respectively to obtain a plurality of function combination items includes:
and taking each function as a horizontal row and a vertical column respectively to obtain a pairwise intersected matrix, and determining pairwise intersected points in the matrix as function combination items.
In one embodiment, the plurality of functions of the product under test includes: shutdown, main page display, application list display, navigation, local video playing, local music playing, bluetooth telephone dialing, DVR video recording and reverse picture display.
In a second aspect, an embodiment of the present application provides a device for designing a test case, including:
the acquisition module is used for acquiring a plurality of functions of a product to be detected;
the combination module is used for respectively combining each function with other functions to obtain a plurality of function combination items; the function combination item comprises at least two functions;
the determining module is used for determining a test case according to the combination existence of the plurality of function combination items and each function combination item; the combination existence is used for characterizing whether each function in the function combination item can form effective existence combination.
In a third aspect, an embodiment of the present application provides a computer device, including a memory and a processor, where the memory stores a computer program, and the processor implements the following steps when executing the computer program:
acquiring a plurality of functions of a product to be detected;
combining each function with other functions respectively to obtain a plurality of function combination items; the function combination item comprises at least two functions;
determining a test case according to the combination existence of the plurality of function combination items and each function combination item; the combination existence is used for characterizing whether each function in the function combination item can form effective existence combination.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the following steps:
acquiring a plurality of functions of a product to be detected;
combining each function with other functions respectively to obtain a plurality of function combination items; the function combination item comprises at least two functions;
determining a test case according to the plurality of function combination items and the combination existence of each function combination item; the combination existence is used for characterizing whether each function in the function combination item can form effective existence combination.
The design device, the computer equipment and the storage medium of the test case can firstly acquire a plurality of functions of a product to be tested, then combine each function with other functions respectively to obtain a plurality of function combination items, and then determine the test case according to the plurality of function combination items and the combination existence of the function combination items. Because each function and other functions can be combined respectively to determine the final test case, and various combination conditions of each function are considered, the obtained test case can ensure the comprehensiveness of the use function test, and further the test quality is improved.
Drawings
FIG. 1 is a flowchart illustrating a method for designing a test case according to an embodiment;
FIG. 2 is a flowchart illustrating a method for designing test cases according to another embodiment;
FIG. 3 is a matrix diagram illustrating a plurality of function grouping items provided by one embodiment;
fig. 4 is a schematic flowchart of a method for designing a test case according to an embodiment;
FIG. 5 is a schematic structural diagram of a device for designing a test case according to an embodiment;
fig. 6 is a schematic structural diagram of a device for designing a test case according to another embodiment;
fig. 7 is a schematic internal structural diagram of a computer device according to an embodiment.
Detailed Description
The design method of the test case provided by the embodiment can be applied to a multifunctional combined software product (for example, a car machine product), and in the using process of a user, the user usually uses the function a and the function B, so that the functional requirements on the software are higher. When testing such software products, the conventional technology generally forms different test scenes based on a basic flow or path scanning method for each single function, and then increases test data to form test cases, but the test cases cannot ensure the comprehensiveness of the functional test, resulting in lower test quality. The design method and device of the test case, the computer device and the storage medium provided by the embodiment of the application aim to solve the technical problems of the traditional technology.
In order to make the objects, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
It should be noted that the execution subject of the method embodiments described below may be a design apparatus of a test case, and the apparatus may be implemented as part of or all of a computer device by software, hardware, or a combination of software and hardware. The method embodiments described below take the example where the executing agent is a computer device.
Fig. 1 is a schematic flow diagram of a method for designing a test case according to an embodiment, where the embodiment relates to a specific process in which a computer device determines a plurality of function combination items according to a plurality of functions of a product to be tested, and determines a test case according to the presence of the plurality of function combination items and combinations thereof. As shown in fig. 1, the method includes:
s101, acquiring a plurality of functions of a product to be detected.
Specifically, the computer device needs to obtain a plurality of functions of a product to be tested, where the product to be tested is a software product that needs to test its functional performance. Optionally, the mode of acquiring the plurality of functions by the computer device may be reading from a product function table stored in advance, or may be receiving function information input by a user.
Optionally, if the product to be tested is a car product, a plurality of functions thereof may include: shutdown, main page display, application list display, navigation, local video playing, local music playing, bluetooth telephone dialing, DVR video recording and reverse picture display.
S102, combining each function with other functions respectively to obtain a plurality of function combination items; the function combination item comprises at least two functions.
Specifically, after the computer device obtains a plurality of functions of the product to be tested, each function is combined with other functions, optionally, each function can be combined with other functions one by one, and each function can be combined with other functions one by one, so as to obtain a plurality of function combination items. When each function is combined with other functions respectively, the function combination item comprises two functions; when each function is combined with other functions in one or more combinations, the functions are included in the combination items.
For example, assuming that the product to be tested is a car product, the functions of the product to be tested are as described above, and if each function is combined with other functions one by one, a plurality of function combination items can be obtained: the method includes the steps of (displaying a main page, turning off), (displaying an application list, and turning off)...... -. (playing local music and playing Bluetooth music). -. (recording a DVR and displaying a reversing picture).
S103, determining a test case according to the combination existence of the plurality of function combination items and each function combination item; the combination existence is used for characterizing whether each function in the function combination item can form effective existence combination.
Specifically, after the computer device obtains the plurality of function combination items, it may determine the combined existence of the function combination item by determining whether each function in the function combination item can form a valid existence combination. If each function in the function combination item can form an effective existing combination, determining that the function combination item can exist, and further determining the function combination item as a test case. If the functions in the function combination item can not form effective existing combination, determining that the function combination item can not exist, and deleting the function combination item by the computer equipment. Optionally, whether each function can form an effective existing combination is judged, which may be to judge whether each function can operate simultaneously on a foreground and a background of the product to be tested, or to judge whether the product to be tested enters a new use scene when each function operates.
For example, assuming that a product to be tested is a car product, one of the function combination items is (navigation, local music playing), when a foreground navigates, a background can play the local music, which does not affect the navigation function of the foreground, so that it can be determined that the function combination item can form an effective existing combination, that is, the function combination item can exist, and further, the function combination item is determined as a test case. For another example, a function combination item is (navigation, shutdown), when the foreground performs navigation, a shutdown operation is added, the product is switched from the power-on state to the power-off state, and enters a new scenario, it may be determined that the function combination item can form an effective existing combination, that is, the function combination item may exist, and then it is determined as a test case. For another example, for a function combination item (playing a local video, dialing a bluetooth phone), for the car product, the simultaneous existence of audio and video cannot be realized, that is, in the bluetooth phone process, the local video cannot be played in the background, and cannot be switched to a local video playing interface, so that it may be determined that the function combination item cannot form an effective existence combination, that is, the function combination item cannot exist, and then the function combination item may be deleted.
In the method for designing the test case provided in this embodiment, the computer device first obtains a plurality of functions of the product to be tested, then combines each function with other functions, respectively, to obtain a plurality of function combination items, and then determines the test case according to the plurality of function combination items and the combination existence thereof. Because each function and other functions can be combined respectively by the method to determine the final test case, and various combination conditions of each function are considered, the test case obtained by the method can ensure the comprehensiveness of the function test, and further improve the test quality.
Fig. 2 is a flowchart illustrating a method for designing a test case according to another embodiment, where this embodiment relates to a specific process of determining a test case by a computer device according to a plurality of function combination items and a combination existence of each function combination item. On the basis of the foregoing embodiment, optionally, as shown in fig. 2, the foregoing S103 may include:
s201, determining the operation of a test case: judging the combination existence of a plurality of function combination items, and determining the function combination items with the combination existence as effective existence combinations as test cases.
Optionally, the method for determining the existence of a combination of multiple function combination items in this step may include: and judging whether each function and other functions after being combined meet a preset condition, wherein the preset condition is used for indicating whether the function combination items can form effective existing combinations. Optionally, after combining each function with other functions, the computer device may match the function with a requirement definition table in the product to be tested, where the requirement definition table includes function requirements that the product to be tested can form an effective existing combination, and if the matching is successful, it is determined that a preset condition is met, and then the function combination item may exist. And otherwise, the functional combination items cannot exist.
Alternatively, the function combination item in this step may be a combination item that includes two functions and is obtained by combining each function with other functions one by one.
S202, combining each function with the test case respectively to obtain a plurality of new function combination items, and returning to the step of executing the operation of determining the test case until a preset convergence condition is reached.
Specifically, after obtaining a plurality of test cases including two functions, the computer device may combine each function with the test case, respectively, to obtain a plurality of new function combination items, where each function combination item includes three functions. And then the computer equipment returns to the step of executing the operation of determining the test case in the step S201, determines the function combination item capable of forming the effective combination as a new test case, and circularly executes the processes of obtaining the new function combination item and determining the test case until a preset convergence condition is reached.
Optionally, the preset convergence condition includes at least one of the following conditions: the combined existence of all the new function combination items cannot form effective existence combination; the new function combination item comprises all functions of the product to be tested.
Specifically, for one, if each function in all the new function combination items cannot form a valid existing combination, that is, all the new function combination items cannot exist, and at this time, no new test case is generated, the computer device stops executing the step of determining the test case operation. Secondly, if the new function combination item already contains all functions of the product to be tested, that is, all the functions are combined at this time, the new function combination item is not generated any more, and the computer device stops executing the step of determining the test case operation.
In the method for designing a test case provided in this embodiment, after determining, as the test case, the function combination item whose combination existence is capable of forming an effective existence combination, the computer device combines each function with the test case respectively to obtain a new function combination item, and returns to execute the operation of determining the test case. When determining a new function combination item, the method combines each function with the determined test case, and eliminates the function combination items which can not exist, thereby greatly reducing the calculation amount of determining the test case and improving the design efficiency of the test case.
In an embodiment, the combining each function with other functions to obtain a plurality of function combination items includes: and taking each function as a horizontal row and a vertical column respectively to obtain a pairwise intersected matrix, and determining pairwise intersected points in the matrix as function combination items. Further, if the new function combination item is obtained by respectively combining each function and the determined test case, each test case is used as a horizontal row, each function is used as a vertical column, and pairwise intersected matrixes are obtained.
For example, assuming that the product to be tested is a car product, an exemplary diagram of two-by-two intersected matrixes can be seen in fig. 3.
In order to better understand the design method of the test case in this embodiment, a specific embodiment is described below. Fig. 4 is a flowchart illustrating a method for designing a test case according to a specific embodiment, as shown in fig. 4, including:
s301, acquiring n functions of a product to be detected;
s302, combining each function with other functions one by one respectively to obtain a function combination item containing two functions;
s303, judging the combination existence of a plurality of function combination items;
s304, determining (1 + 1) a combined test case;
s305, combining each function with the combined test case (1 + 1) one by one to obtain a function combination item containing three functions;
s306, judging the combination existence of a plurality of function combination items;
s307, determining a combined test case (1 + 2);
...
s308, combining each function with the (1 + (n-2)) combined test case one by one respectively to obtain function combined items containing n functions;
s309, judging the combination existence of a plurality of function combination items;
s310, determining the (1 + (n-1)) combined test case.
The implementation manner of the embodiment shown in fig. 4 is similar to the implementation manner of the process of the embodiment shown above, and is not described again here.
It should be understood that although the various steps in the flowcharts of fig. 1-4 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not limited to being performed in the exact order illustrated and, unless explicitly stated herein, may be performed in other orders. Moreover, at least some of the steps in fig. 1-4 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternating with other steps or at least some of the sub-steps or stages of other steps.
Fig. 5 is a schematic structural diagram of a device for designing a test case according to an embodiment. As shown in fig. 5, the apparatus includes: an acquisition module 11, a combination module 12 and a determination module 13.
Specifically, the obtaining module 11 is configured to obtain a plurality of functions of a product to be tested;
the combination module 12 is used for combining each function with other functions respectively to obtain a plurality of function combination items; the function combination item comprises at least two functions;
the determining module 13 is configured to determine a test case according to the multiple function combination items and the combination existence of each function combination item; the combination existence is used for characterizing whether each function in the function combination item can form effective existence combination.
The device for designing a test case provided in this embodiment may implement the method embodiments described above, and the implementation principle and the technical effect are similar, which are not described herein again.
Fig. 6 is a schematic structural diagram of a test case design apparatus according to another embodiment. On the basis of the embodiment shown in fig. 5, as shown in fig. 6, the determining module 13 includes: a determination unit 131 and a circulation unit 132.
Specifically, the determining unit 131 is configured to perform an operation of determining a test case: judging the combination existence of a plurality of function combination items, and determining the function combination items with the combination existence as test cases, wherein the function combination items can form effective combination;
and a loop unit 132, configured to combine each function with the test case to obtain a plurality of new function combination items, and return to the step of determining the test case operation until a preset convergence condition is reached.
In one embodiment, the preset convergence condition includes at least one of the following conditions: the combined existence of all the new function combination items cannot form effective existence combination; the new function combination item comprises all functions of the product to be tested.
In one embodiment, the determining unit 131 is specifically configured to determine whether each function satisfies a preset condition after being combined with other functions, where the preset condition is used to indicate whether the function combination items can form a valid presence combination.
In one embodiment, the determining unit 131 is specifically configured to combine each function with other functions, match the combined function with a requirement definition table of a product to be tested, and if the matching is successful, meet a preset condition; the requirement definition table comprises functional requirements of products to be tested, which can form effective existing combinations.
In one embodiment, the combining module 12 is specifically configured to use each function as a horizontal row and a vertical column, respectively, to obtain a matrix intersecting two by two, and determine two intersecting points in the matrix as the function combining items.
In one embodiment, the plurality of functions of the product under test includes: shutdown, main page display, application list display, navigation, local video playing, local music playing, bluetooth telephone dialing, DVR video recording and reverse picture display.
The device for designing a test case provided in this embodiment may implement the method embodiments, and the implementation principle and technical effects are similar, which are not described herein again.
For specific limitations of the test case design apparatus, reference may be made to the above limitations of the test case design method, which is not described herein again. The modules in the test case design apparatus may be implemented in whole or in part by software, hardware, or a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 7. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operating system and the computer program to run on the non-volatile storage medium. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a method for designing test cases. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the configuration shown in fig. 7 is a block diagram of only a portion of the configuration associated with the present application, and is not intended to limit the computing device to which the present application may be applied, and that a particular computing device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory having a computer program stored therein and a processor that when executing the computer program performs the steps of:
acquiring a plurality of functions of a product to be detected;
combining each function with other functions respectively to obtain a plurality of function combination items; the function combination item comprises at least two functions;
determining a test case according to the combination existence of the plurality of function combination items and each function combination item; the combination existence is used for characterizing whether each function in the function combination item can form effective existence combination.
In one embodiment, the processor when executing the computer program further performs the steps of:
determining the operation of the test case: judging the combination existence of a plurality of function combination items, and determining the function combination items with the combination existence as effective existence combinations as test cases;
and combining each function with the test case respectively to obtain a plurality of new function combination items, and returning to the step of executing the operation of determining the test case until a preset convergence condition is reached.
In one embodiment, the preset convergence condition includes at least one of the following conditions: the combined existence of all the new function combination items cannot form effective existence combination; the new function combination item comprises all functions of the product to be tested.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
and judging whether each function and other functions meet preset conditions after being combined, wherein the preset conditions are used for indicating whether the function combination items can form effective existing combinations.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
combining each function with other functions, matching with a requirement definition table of a product to be tested, and meeting a preset condition if matching is successful; the requirement definition table comprises functional requirements of products to be tested, which can form effective existing combinations.
In one embodiment, the processor when executing the computer program further performs the steps of:
and taking each function as a horizontal row and a vertical column respectively to obtain a pairwise intersected matrix, and determining pairwise intersected points in the matrix as function combination items.
In one embodiment, the plurality of functions of the product under test include: shutdown, display of a home page, display of an application list, navigation, local video play, local music play, bluetooth phone dialing, DVR recording, and display of a reverse image.
The implementation principle and technical effect of the computer device provided in this embodiment are similar to those of the method embodiment described above, and are not described herein again.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
acquiring a plurality of functions of a product to be detected;
combining each function with other functions respectively to obtain a plurality of function combination items; the function combination item comprises at least two functions;
determining a test case according to the combination existence of the plurality of function combination items and each function combination item; the combination existence is used for characterizing whether each function in the function combination item can form effective existence combination.
In one embodiment, the computer program when executed by the processor further performs the steps of:
determining the operation of the test case: judging the combination existence of a plurality of function combination items, and determining the function combination items with the combination existence as effective existence combinations as test cases;
and combining each function with the test case respectively to obtain a plurality of new function combination items, and returning to the step of executing the operation of determining the test case until a preset convergence condition is reached.
In one embodiment, the preset convergence condition includes at least one of the following conditions: the combination existence of all new function combination items cannot form effective existence combination; the new function combination item comprises all functions of the product to be tested.
In one embodiment, the computer program when executed by the processor further performs the steps of:
and judging whether each function and other functions after being combined meet a preset condition, wherein the preset condition is used for indicating whether the function combination item can form an effective existence combination.
In one embodiment, the computer program when executed by the processor further performs the steps of:
combining each function with other functions, matching with a requirement definition table of a product to be tested, and meeting a preset condition if matching is successful; the requirement definition table comprises functional requirements of products to be tested, which can form effective existing combinations.
In one embodiment, the computer program when executed by the processor further performs the steps of:
and respectively taking each function as a horizontal row and a vertical column to obtain a pairwise intersected matrix, and determining pairwise intersected points in the matrix as function combination items.
In one embodiment, the plurality of functions of the product under test include: shutdown, main page display, application list display, navigation, local video playing, local music playing, bluetooth telephone dialing, DVR video recording and reverse picture display.
The implementation principle and technical effect of the computer-readable storage medium provided by this embodiment are similar to those of the above-described method embodiment, and are not described herein again.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), rambus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
All possible combinations of the technical features in the above embodiments may not be described for the sake of brevity, but should be considered as being within the scope of the present disclosure as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is specific and detailed, but not to be understood as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A method for designing a test case is characterized by comprising the following steps:
acquiring a plurality of functions of a product to be detected;
combining each function with other functions respectively to obtain a plurality of function combination items; the function combination item comprises at least two functions;
determining the operation of the test case: judging the combination existence of the plurality of function combination items, and determining the function combination items with the combination existence as effective existence combinations as the test cases;
combining each function with the test case respectively to obtain a plurality of new function combination items, and returning to the step of executing the operation of determining the test case until a preset convergence condition is reached; the combination existence is used for characterizing whether each function in the function combination item can form effective existence combination.
2. The method according to claim 1, wherein the preset convergence condition comprises at least one of the following conditions:
the combined existence of all the new function combination items is incapable of forming effective existence combination;
and the new function combination item comprises all functions of the product to be tested.
3. The method according to claim 1 or 2, wherein the determining the existence of the combination of the plurality of function combination items comprises:
and judging whether each function and other functions after being combined meet a preset condition, wherein the preset condition is used for indicating whether the function combination item can form an effective existing combination.
4. The method according to claim 3, wherein the determining whether each of the functions satisfies a predetermined condition after being combined with other functions comprises:
combining each function with other functions, matching with the demand definition table of the product to be tested, and meeting preset conditions if matching is successful; and the requirement definition table comprises functional requirements that the products to be tested can form effective existing combinations.
5. The method according to claim 1, wherein the combining each of the functions with other functions respectively to obtain a plurality of function combination items comprises:
and taking each function as a horizontal row and a vertical column respectively to obtain a pairwise intersected matrix, and determining pairwise intersected points in the matrix as the function combination items.
6. The method of claim 1, wherein the plurality of functions of the product under test comprise: shutdown, display of a home page, display of an application list, navigation, local video play, local music play, bluetooth phone dialing, DVR recording, and display of a reverse image.
7. The method according to claim 1, wherein the determining the existence of the combination of the plurality of function combination items comprises:
and judging whether the functions can be simultaneously operated on the foreground and the background of the product to be detected respectively, or judging whether the product to be detected enters a new use scene.
8. A device for designing a test case, comprising:
the acquisition module is used for acquiring a plurality of functions of a product to be detected;
the combination module is used for respectively combining each function with other functions to obtain a plurality of function combination items; the function combination item comprises at least two functions;
the determining module is used for determining the test case operation: judging the combined existence of the plurality of function combination items, and determining the function combination items with the combined existence as effective existence combinations as the test cases; combining each function with the test case respectively to obtain a plurality of new function combination items, and returning to the step of executing the operation of determining the test case until a preset convergence condition is reached; the combination existence is used for characterizing whether each function in the function combination item can form effective existence combination.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method according to any of claims 1-7.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
CN201910298075.5A 2019-04-15 2019-04-15 Test case design method and device, computer equipment and storage medium Active CN110008132B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910298075.5A CN110008132B (en) 2019-04-15 2019-04-15 Test case design method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910298075.5A CN110008132B (en) 2019-04-15 2019-04-15 Test case design method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110008132A CN110008132A (en) 2019-07-12
CN110008132B true CN110008132B (en) 2022-11-08

Family

ID=67171963

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910298075.5A Active CN110008132B (en) 2019-04-15 2019-04-15 Test case design method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110008132B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101645012A (en) * 2009-09-11 2010-02-10 兰雨晴 Combinational selection method of foundational software platform integrated test
JP2014170285A (en) * 2013-03-01 2014-09-18 Hitachi Ltd Test support apparatus, test support method and test support program
CN108038060A (en) * 2017-12-28 2018-05-15 上海璞恒新能源科技有限公司 A kind of test method, device, terminal and computer-readable medium
CN108415830A (en) * 2018-02-05 2018-08-17 广东睿江云计算股份有限公司 A kind of generation method and device of software test case

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101645012A (en) * 2009-09-11 2010-02-10 兰雨晴 Combinational selection method of foundational software platform integrated test
JP2014170285A (en) * 2013-03-01 2014-09-18 Hitachi Ltd Test support apparatus, test support method and test support program
CN108038060A (en) * 2017-12-28 2018-05-15 上海璞恒新能源科技有限公司 A kind of test method, device, terminal and computer-readable medium
CN108415830A (en) * 2018-02-05 2018-08-17 广东睿江云计算股份有限公司 A kind of generation method and device of software test case

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"一种基于正交表的功能组合测试设计方法";夏镇等;《微型电脑应用》;20070320;第23卷(第3期);第3-6、9页 *

Also Published As

Publication number Publication date
CN110008132A (en) 2019-07-12

Similar Documents

Publication Publication Date Title
CN109194960B (en) Image frame rendering method and device and electronic equipment
KR101623415B1 (en) Drawing method, apparatus, and terminal
CN110968585B (en) Storage method, device, equipment and computer readable storage medium for alignment
CN102023843B (en) Function calling method and device as well as smart card
CN109960491A (en) Application program generation method, generating means, electronic equipment and storage medium
CN112130729A (en) Page processing method and device, computer equipment and storage medium
CN111797015A (en) Testing method and device based on dynamic byte codes
CN110119490A (en) Web browser method, device, computer equipment and storage medium
US20130286028A1 (en) Address generator of image processing device and operating method of address generator
CN110008132B (en) Test case design method and device, computer equipment and storage medium
CN115293873A (en) Page processing method and device for credit granting flow, computer equipment and storage medium
CN111124932B (en) Scheme verification method, system, device, computer equipment and storage medium
CN113730917A (en) Game script generation method and device, computer equipment and storage medium
CN111159027A (en) Automatic testing method and device, computer equipment and readable storage medium
CN109739752B (en) Built-in resource testing method and device, electronic equipment and readable storage medium
CN111190574A (en) Method, device, equipment and storage medium for selecting options of multi-stage linkage assembly
CN115658351B (en) 2D copying method, device, electronic equipment and computer readable storage medium
CN112306838A (en) Page layout compatibility testing method, device and equipment and readable storage medium
CN109327732B (en) Multimedia file playing control method and device, computer equipment and storage medium
CN112783759B (en) White box test task execution method and device, storage medium and computer equipment
US9569105B2 (en) Method for managing virtual control interface of an electronic device, and associated apparatus and associated computer program product
CN115982018B (en) UI test method, system, computer device and storage medium based on OCR
CN114710441B (en) Link aggregation method, system, computer equipment and storage medium
CN111506299B (en) Front-end data verification method and device and computer equipment
CN109584335B (en) Graph filling method, device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant