US11138099B2 - Method for testing software, and computing device and computer-readable storage medium thereof - Google Patents
Method for testing software, and computing device and computer-readable storage medium thereof Download PDFInfo
- Publication number
- US11138099B2 US11138099B2 US16/728,325 US201916728325A US11138099B2 US 11138099 B2 US11138099 B2 US 11138099B2 US 201916728325 A US201916728325 A US 201916728325A US 11138099 B2 US11138099 B2 US 11138099B2
- Authority
- US
- United States
- Prior art keywords
- accuracy
- software
- influencing factors
- determining
- predetermined
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3684—Test management for test design, e.g. generating new test cases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3692—Test management for test results analysis
Definitions
- Embodiments of the present application relate to the technical field of software testing, and in particular, relate to a method and apparatus for testing software, and a computing device and a computer-readable storage medium thereof.
- Software testing is a process for promoting authentication of correctness, integrity, security and quality of the software.
- the software program is run and operated under prescribed conditions. In this way, errors of the program may be detected, and thus the quality of the software may be measured, and it may be evaluated whether the software satisfy design requirements.
- a mainstream test method includes inputting test data into the software program to obtain a test result, and comparing the test result with a label to conclude a qualification rate.
- test data is randomly selected, and if the test data is not complete, the qualification rate indicated in the test result is a relative value which may not reflect merits and demerits of the current software.
- An embodiment of the present application provides a method for testing software.
- the method includes: determining influencing factors which influence implementation of a target function of the software; constructing a test case set for each of the influencing factors; inputting the test case set corresponding to each of the influencing factors to the software; enabling the software to run the test case set; calculating an accuracy of each of the influencing factors against implementation of the target function of the software according to a running result of the test case set run by the software; determining, according to the accuracy achieved each of the influencing factors, whether a predetermined qualification condition is satisfied; determining that the software is tested to be qualified if the predetermined qualification condition is satisfied; and determining that the software is tested to be unqualified if the predetermined qualification condition is not satisfied.
- the computing device includes: a processor, a memory, a communication interface and a communication bus; wherein the processor, the memory and the communication bus communicate with each other via the communication bus; and the memory is configured to store at least one executable instruction, wherein the executable instruction causes the processor to perform the steps of: determining influencing factors which influence implementation of a target function of the software; constructing a test case set for each of the influencing factors; inputting the test case set corresponding to each of the influencing factors to the software; enabling the software to run the test case set; calculating an accuracy of each of the influencing factors against implementation of the target function of the software according to a running result of the test case set run by the software; determining, according to the accuracy achieved each of the influencing factors, whether a predetermined qualification condition is satisfied; determining that the software is tested to be qualified if the predetermined qualification condition is satisfied; and determining that the software is tested to be unqualified if the predetermined qualification condition is not satisfied.
- Still another embodiment of the present application provides a computer-readable storage medium.
- the storage medium storing at least one executable instruction; wherein the executable instruction, when being executed, causes the processor to perform the steps oft determining influencing factors which influence implementation of a target function of the software; constructing a test case set for each of the influencing factors; inputting the test case set corresponding to each of the influencing factors to the software; enabling the software to run the test case set; calculating an accuracy of each of the influencing factors against implementation of the target function of the software according to a running result of the test case set run by the software; determining, according to the accuracy achieved each of the influencing actors, whether a predetermined qualification condition is satisfied; determining that the software is tested to be qualified if the predetermined qualification condition is satisfied; and determining that the software is tested to be unqualified if the predetermined qualification condition is not satisfied.
- FIG. 1 is a flowchart of a method for testing software according to an embodiment of the present application
- FIG. 2 is a schematic structural diagram of a plant color decision tree in a method for testing software according to an embodiment of the present application
- FIG. 3 is a flowchart of accuracy calculation in a method for testing software according to an embodiment of the present application
- FIG. 4 is a functional block diagram of an apparatus for testing software according to an embodiment of the present application.
- FIG. 5 is a schematic diagram of a computing device according to an embodiment of the present application.
- FIG. 1 is a flowchart of a method for testing software according to an embodiment of the present application. As illustrated in FIG. 1 , the method includes the following steps:
- Step S 101 Influencing factors which influence implementation of a target function of the software are determined.
- the target function to be implemented by the software is the objective of design of the software.
- the software is object identification software
- the target function to be implemented by the object identification software is to correctly identifying an object.
- the influencing factors refer to some factors which may influence implementation of the target function of the software. In some embodiments, influencing factors may be determined based on the target function of the software.
- the target function is to correctly identify an object under test, and the influencing factors which influence correct identification of the object include: shape of the object, height of the object, color of the object and the like characteristics of the object.
- Step S 102 A test case is constructed for each of the influencing factors.
- a decision tree is constructed for each of the influencing factors.
- the decision trees for all the influencing factors constitute a decision tree group. During test of the software, all the decision trees in the decision tree group need to be traversed to thoroughly test the software.
- a factor associated with the influencing factor may be analyzed based on the decision tree, and then a test case may be constructed based on the decision tree. In this way, a more complete test case may be prepared for the influencing factor to more accurately test a qualification rate of the software.
- FIG. 2 is a schematic structural diagram of a plant color decision tree. As illustrated in FIG.
- the state nodes include green, yellow and red.
- a result is identified according to the state node. For example, if states of the state nodes are green and yellow, it is determined that the object is the plant to be identified. According to the states of the state nodes, several test case sets are selected respectively. For example, 10 test samples are respectively selected for the green plant, the yellow plant and the red plant. Likewise, with respect to other characteristics, decision trees are also constructed. For example, when the shape of the leaves of the plant to be tested is exhibited as a circular or elliptical shape, the object shall be the plant to be identified. In other plants, the shape of the leaves may be a triangle shape, and test samples are respectively selected with respect to the circular shape of the leaves, the elliptical shape of the leaves, and the triangular shape of leaves.
- the test samples in each of the characteristics during selection of the samples, only the current characteristic is exhibited in different form, and the other characteristics are all exhibited in the same form.
- the other characteristics for example, the shape of the leaves, and the texture of the leaves are all the same.
- a function point to be improved in the software under test may be precisely targeted.
- the exhibition forms of different characteristics are combined.
- green in the color characteristic is respectively combined with circular shape, elliptical shape and triangular shape in the shape characteristic of the leaves to construct a new test case.
- a function point to be improved in the software under test may be targeted with respect to different characteristics.
- Step S 103 The test case set corresponding to each of the influencing factors is input to the software, and the software is enabled to run the test case set.
- the test case set includes several test cases.
- the several test cases in the same test case set may all be selected as different test cases to test various aspects of the influencing factor.
- Step S 104 An accuracy of each of the influencing factors against implementation of the target function of the software is calculated according to a running result of the test case set run by the software.
- test cases in the test case set may be pre-marked with results. After the software runs the test cases, whether a running result of the software is correct may be judged directly according to the pre-marked results.
- the calculating the accuracy includes the following steps:
- Step S 1041 A total accuracy of the software is calculated according to the accuracy of each of the influencing factors.
- the total accuracy of the software is calculated according to the accuracy of each of the influencing factors and in combination with a predetermined weight defined for each of the influencing factors by the following formula:
- Accuracy denotes the total accuracy of the software
- accuracy(i) denotes an accuracy of an i th influencing factor
- weight(i) denotes a weight defined for an i th influencing factor
- n denotes the total number of influencing factors.
- the characteristic of color is used as a distinguishing characteristic, 95 test samples are correctly identified; when the characteristic of shape of leaves is used as a distinguishing characteristic, 80 test samples are correctly identified; and when the characteristic of texture of leaves is used as a distinguishing characteristic, 10 test samples are currently identified.
- a total identification rate is as follows:
- the predetermined weights are defined by the test solution makers, and then agreed by the research and development staff and the test staff upon sufficient discussions. Depending on different test objectives, the weights are also different.
- Step S 1042 Whether the total accuracy is greater than a predetermined standard value is judged. Step S 1043 is performed if the total accuracy is greater than the predetermined standard value, and step S 1044 is performed if the total accuracy is not greater than the predetermined standard value.
- the predetermined standard value is defined collaboratively by solution makers, research and development staff and test staff, which are all software development related departments, and it's defined in combination with the software test standards.
- Step S 1043 It is determined that the predetermined qualification condition is satisfied.
- Step S 1044 It is determined that the predetermined qualification condition is not satisfied.
- Step S 105 Whether the predetermined qualification condition is satisfied is judged according to the accuracy of each of the influencing factors. Step S 106 is performed if the predetermined qualification condition is satisfied, and step S 107 is performed if the predetermined qualification condition is not satisfied.
- the total accuracy is compared with the predetermined standard value; if the total accuracy is greater than or equal to the predetermined standard value, it is considered that the predetermined qualification condition is satisfied; and if the total accuracy is less than the predetermined standard value, it is considered that the predetermined qualification standard is not satisfied.
- the predetermined qualification standard is defined as 90%, in the previous step, the calculated total accuracy is 65%, it is considered that the predetermined qualification condition is not satisfied.
- Step S 106 It is determined that the software is tested to be qualified.
- Step S 107 It is determined that the software is tested to be unqualified.
- test case set is constructed for each of the influencing factors, such that the test case set may include various influencing factors of the designed function of the software, and thus the test result of the software is more reliable.
- FIG. 4 is a functional block diagram of an apparatus for testing software. As illustrated in FIG. 4 , the apparatus includes: a first determining module 401 , a constructing module 402 , an inputting module 403 , a calculating module 404 , a second determining module 405 , a third determining module 406 and a fourth determining module 407 .
- the first determining module 401 is configured to determine influencing factors which influence implementation of a target function of the software; the constructing module 402 is configured to construct a test case set for each of the influencing factors; the inputting module 403 is configured to input the test case set corresponding to each of the influencing factors to the software, and enable the software to run the test case set; the calculating module 404 is configured to calculate an accuracy of each of the influencing factors against implementation of the target function of the software according to a running result of the test case set run by the software; the second determining module 405 is configured to determine, according to the accuracy achieved each of the influencing factors, whether a predetermined qualification condition is satisfied; the third determining module 406 is configured to determine that the software is tested to be qualified if the predetermined qualification condition is satisfied; and the fourth determining module 407 is configured to determine that the software is tested to be unqualified if the predetermined qualification condition is not satisfied.
- the calculating module 404 includes a calculating unit, configured to calculate a total accuracy of the software according to the accuracy of each of the influencing factors.
- the second determining module 405 includes a judging unit 4051 , a first determining unit 4052 and a second determining unit 4053 ; wherein the judging unit 4051 is configured to judge whether the total accuracy is greater than a predetermined standard value; the first determining unit 4052 is configured to determine that the predetermined qualification condition is satisfied if the total accuracy is greater than the predetermined standard value; and the second determining unit 4053 is configured to determine that the predetermined qualification condition is not satisfied if the total accuracy is not greater than the predetermined standard value.
- the calculating unit 4041 is configured to calculate the total accuracy of the software according to the accuracy of each of the influencing factors by the following formula:
- Accuracy denotes the total accuracy of the software
- accuracy(i) denotes an accuracy of an i th influencing factor
- weight(i) denotes a weight defined for an i th influencing factor
- n denotes the total number of influencing factors.
- test case set is constructed by the constructing module for each of the influencing factors, such that the test case set may include various influencing factors of the designed function of the software, and thus the test result of the software is more reliable.
- An embodiment of the present application provides a non-volatile computer-readable storage medium, wherein the computer-readable storage medium stores at least one computer-executable instruction, which may be executed to perform the method for testing software in any of the above method embodiments.
- FIG. 5 is a schematic structural diagram of a computing device according to an embodiment of the present application.
- the specific embodiments of the present application set no limitation to the practice of the computing device.
- the computing device may include: a processor 502 , a communication interface 504 , a memory 506 and a communication bus 508 .
- the processor 502 , the communication interface 504 and the memory 506 communicate with each other via the communication bus 508 .
- the communication interface 504 is configured to communicate with a network element such as a client, a server or the like.
- the processor 502 is configured to execute a program 510 , and may specifically perform steps in the embodiments of the method for testing software.
- the program 510 may include a program code, wherein the program code includes a computer-executable instruction.
- the processor 502 may be a central processing unit (CPU) or an Application Specific Integrated Circuit (ASIC), or configured as one or more integrated circuits for implementing the embodiments of the present invention.
- the computing device includes one or more processors, which may be the same type of processors, for example, one or more CPUs, or may be different types of processors, for example, one or more CPUs and one or more ASICs.
- the memory 506 is configured to store the program 510 .
- the memory 506 may include a high-speed RAM memory, or may also include a non-volatile memory, for example, at least one magnetic disk memory.
- the program 510 may be specifically configured to cause the processor 502 to perform the following operations:
- program 510 may be specifically further configured to cause the processor to perform the following operations:
- the program 510 may be specifically further configured to cause the processor 502 to perform the following operation: calculating the total accuracy of the software according to the accuracy of each of the influencing factors and in combination with a predetermined weight defined for each of the influencing factors.
- the program 510 may be specifically further configured to cause the processor 502 to perform the operation of calculating the total accuracy of the software by the following formula:
- Accuracy denotes the total accuracy of the software
- accuracy(i) denotes an accuracy of an i th influencing factor
- weight(i) denotes a weight defined for an i th influencing factor
- n denotes the total number of influencing factors.
- modules in the devices according to the embodiments may be adaptively modified and these modules may be configured in one or more devices different from the embodiments herein.
- Modules or units or components in the embodiments may be combined into a single module or unit or component, and additionally these modules, units or components may be practiced in a plurality of sub-modules, subunits or subcomponents.
- all the features disclosed in this specification including the appended claims, abstract and accompanying drawings
- all the processes or units in such disclosed methods or devices may be combined in any way.
- Embodiments of the individual components of the present application may be implemented in hardware, or in a software module running one or more processors, or in a combination thereof. It will be appreciated by those skilled in the art that, in practice, some or all of the functions of some or all of the components in the apparatus for testing software according to individual embodiments of the present application may be implemented using a microprocessor or a digital signal processor (DSP).
- DSP digital signal processor
- the present application may also be implemented as an apparatus of a device program (e.g., a computer program and a computer program product) for performing a part or all of the method as described herein.
- Such a program implementing the present application may be stored on a computer readable medium, or may be stored in the form of one or more signals. Such a signal may be obtained by downloading it from an Internet website, or provided on a carrier signal, or provided in any other form.
- any reference sign placed between the parentheses shall not be construed as a limitation to a claim.
- the word “comprise” or “include” does not exclude the presence of an element or a step not listed in a claim.
- the word “a” or “an” used before an element does not exclude the presence of a plurality of such elements.
- the present application may be implemented by means of a hardware including several distinct elements and by means of a suitably programmed computer. In a unit claim enumerating several devices, several of the devices may be embodied by one and the same hardware item. Use of the words “first”, “second”, “third” and the like does not mean any ordering. Such words may be construed as naming.
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
Description
Claims (3)
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811627706.5 | 2018-12-28 | ||
CN201811627706.5A CN109815133B (en) | 2018-12-28 | 2018-12-28 | Software testing method and device, computing equipment and computer storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
US20200379890A1 US20200379890A1 (en) | 2020-12-03 |
US11138099B2 true US11138099B2 (en) | 2021-10-05 |
Family
ID=66602744
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US16/728,325 Active US11138099B2 (en) | 2018-12-28 | 2019-12-27 | Method for testing software, and computing device and computer-readable storage medium thereof |
Country Status (2)
Country | Link |
---|---|
US (1) | US11138099B2 (en) |
CN (1) | CN109815133B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111045951B (en) * | 2019-12-17 | 2023-09-29 | 上海创远仪器技术股份有限公司 | Method for realizing quality test effect analysis and processing of radio application software based on radio service model |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20190079853A1 (en) * | 2017-09-08 | 2019-03-14 | Devfactory Fz-Llc | Automating Identification of Test Cases for Library Suggestion Models |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7958495B2 (en) * | 2007-03-08 | 2011-06-07 | Systemware, Inc. | Program test system |
CN101436128B (en) * | 2007-11-16 | 2012-10-31 | 北京邮电大学 | Software test case automatic generating method and system |
CN103473175A (en) * | 2013-09-11 | 2013-12-25 | 江苏中科梦兰电子科技有限公司 | Extraction method for software testing case set |
CN108073506B (en) * | 2016-11-17 | 2021-04-30 | 百度在线网络技术(北京)有限公司 | Test method and device |
CN109062817B (en) * | 2018-10-15 | 2022-06-03 | 网宿科技股份有限公司 | Automatic testing method and system |
-
2018
- 2018-12-28 CN CN201811627706.5A patent/CN109815133B/en active Active
-
2019
- 2019-12-27 US US16/728,325 patent/US11138099B2/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20190079853A1 (en) * | 2017-09-08 | 2019-03-14 | Devfactory Fz-Llc | Automating Identification of Test Cases for Library Suggestion Models |
Also Published As
Publication number | Publication date |
---|---|
CN109815133A (en) | 2019-05-28 |
US20200379890A1 (en) | 2020-12-03 |
CN109815133B (en) | 2022-08-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20190018753A1 (en) | Software program fault localization | |
Bennin et al. | Empirical evaluation of cross-release effort-aware defect prediction models | |
CN109446524A (en) | A kind of voice quality detecting method and device | |
CN107423613A (en) | The method, apparatus and server of device-fingerprint are determined according to similarity | |
CN110890137A (en) | Modeling method, device and application of compound toxicity prediction model | |
CN105095464B (en) | A kind of detection method and device of searching system | |
US10552300B2 (en) | Oracle-free match testing of a program using covering arrays and equivalence classes | |
CN110059003B (en) | Automatic test method, device, electronic equipment and readable storage medium | |
CN112181804A (en) | Parameter checking method, equipment and storage medium | |
CN110688536A (en) | Label prediction method, device, equipment and storage medium | |
CN107895172A (en) | Utilize the method, apparatus and computing device of image information detection anomalous video file | |
CN112419268A (en) | Method, device, equipment and medium for detecting image defects of power transmission line | |
US11138099B2 (en) | Method for testing software, and computing device and computer-readable storage medium thereof | |
CN103870563B (en) | It is determined that the method and apparatus of the theme distribution of given text | |
CN117376228B (en) | Network security testing tool determining method and device | |
CN107704869A (en) | A kind of corpus data methods of sampling and model training method | |
CN113792298A (en) | Method and device for detecting vehicle safety risk | |
CN110009012A (en) | A kind of risk specimen discerning method, apparatus and electronic equipment | |
CN108399545B (en) | Method and device for detecting quality of electronic commerce platform | |
CN110796178B (en) | Decision model training method, sample feature selection method, device and electronic equipment | |
CN109145821B (en) | Method and device for positioning pupil image in human eye image | |
CN111325255A (en) | Specific crowd delineating method and device, electronic equipment and storage medium | |
CN111144429A (en) | Object classification method and system, computer system and computer readable medium | |
US20230020719A1 (en) | Technology environment for a software application | |
CN113962216A (en) | Text processing method and device, electronic equipment and readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
FEPP | Fee payment procedure |
Free format text: ENTITY STATUS SET TO UNDISCOUNTED (ORIGINAL EVENT CODE: BIG.); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY |
|
AS | Assignment |
Owner name: CLOUDMINDS (SHENZHEN) ROBOTICS SYSTEMS CO., LTD., CHINA Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:DONG, KONGMING;REEL/FRAME:053121/0873 Effective date: 20191209 |
|
STPP | Information on status: patent application and granting procedure in general |
Free format text: RESPONSE TO NON-FINAL OFFICE ACTION ENTERED AND FORWARDED TO EXAMINER |
|
STPP | Information on status: patent application and granting procedure in general |
Free format text: FINAL REJECTION MAILED |
|
AS | Assignment |
Owner name: CLOUDMINDS ROBOTICS CO., LTD., CHINA Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:CLOUDMINDS (SHENZHEN) ROBOTICS SYSTEMS CO., LTD.;REEL/FRAME:055625/0689 Effective date: 20210302 |
|
STPP | Information on status: patent application and granting procedure in general |
Free format text: RESPONSE AFTER FINAL ACTION FORWARDED TO EXAMINER |
|
STPP | Information on status: patent application and granting procedure in general |
Free format text: ADVISORY ACTION MAILED |
|
STPP | Information on status: patent application and granting procedure in general |
Free format text: NOTICE OF ALLOWANCE MAILED -- APPLICATION RECEIVED IN OFFICE OF PUBLICATIONS |
|
STPP | Information on status: patent application and granting procedure in general |
Free format text: PUBLICATIONS -- ISSUE FEE PAYMENT VERIFIED |
|
STCF | Information on status: patent grant |
Free format text: PATENTED CASE |