CN110750447A - Software testing method and related equipment - Google Patents

Software testing method and related equipment Download PDF

Info

Publication number
CN110750447A
CN110750447A CN201910880742.0A CN201910880742A CN110750447A CN 110750447 A CN110750447 A CN 110750447A CN 201910880742 A CN201910880742 A CN 201910880742A CN 110750447 A CN110750447 A CN 110750447A
Authority
CN
China
Prior art keywords
software
tested
target
types
test
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.)
Granted
Application number
CN201910880742.0A
Other languages
Chinese (zh)
Other versions
CN110750447B (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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201910880742.0A priority Critical patent/CN110750447B/en
Publication of CN110750447A publication Critical patent/CN110750447A/en
Application granted granted Critical
Publication of CN110750447B publication Critical patent/CN110750447B/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
    • 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/3688Test management for test execution, e.g. scheduling of test suites
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application relates to a test flow improvement in the technical field of software test, in particular to a software test method and related equipment, wherein the method comprises the following steps: acquiring first software to be tested and second software to be tested, wherein the first software to be tested is the software to be tested after version updating, and the second software to be tested is the software to be tested before version updating; determining N target demand types corresponding to the first software to be tested according to the first software to be tested and the second software to be tested, wherein N is an integer greater than 1; inputting N target demand types into a test strategy model for processing, and outputting N target test strategies, wherein the N target test strategies correspond to the N target demand types one by one; and testing the first software to be tested by adopting the N target testing strategies to obtain a software testing result corresponding to the first software to be tested. By adopting the embodiment of the application, the test efficiency of the software test is improved.

Description

Software testing method and related equipment
Technical Field
The application relates to the technical field of software testing, in particular to a software testing method and related equipment.
Background
At present, the process of testing software to be tested is as follows: the method comprises the steps of manually determining a plurality of target requirement types corresponding to software to be tested, manually selecting a plurality of target testing strategies corresponding to the plurality of target requirement types, and touching a testing button to enable electronic equipment to test the software to be tested according to the plurality of target testing strategies to obtain a software testing result of the software to be tested. This approach results in less efficient testing of the software test.
Disclosure of Invention
The embodiment of the application provides a software testing method and related equipment, which are used for improving the testing efficiency of software testing.
In a first aspect, an embodiment of the present application provides a software testing method, where the method includes:
acquiring first software to be tested and second software to be tested, wherein the first software to be tested is the software to be tested after the version is updated, and the second software to be tested is the software to be tested before the version is updated;
determining N target demand types corresponding to the first software to be tested according to the first software to be tested and the second software to be tested, wherein N is an integer greater than 1;
inputting the N target demand types into a test strategy model for processing, and outputting N target test strategies, wherein the N target test strategies correspond to the N target demand types one by one;
and testing the first software to be tested by adopting the N target testing strategies to obtain a software testing result corresponding to the first software to be tested.
In a second aspect, an embodiment of the present application provides a software testing apparatus, including:
the device comprises an acquisition unit, a judgment unit and a control unit, wherein the acquisition unit is used for acquiring first software to be tested and second software to be tested, the first software to be tested is the software to be tested after version updating, and the second software to be tested is the software to be tested before version updating;
the determining unit is used for determining N target demand types corresponding to the first software to be tested according to the first software to be tested and the second software to be tested, wherein N is an integer greater than 1;
the processing unit is used for inputting the N target demand types into a test strategy model for processing and outputting N target test strategies, wherein the N target test strategies correspond to the N target demand types one by one;
and the testing unit is used for testing the first software to be tested by adopting the N target testing strategies to obtain a software testing result corresponding to the first software to be tested.
In a third aspect, an embodiment of the present application provides an electronic device, including a processor, a memory, a communication interface, and one or more programs, where the one or more programs are stored in the memory and configured to be executed by the processor, and where the program includes instructions for performing some or all of the steps of the method according to the first aspect of the embodiment of the present application.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium for storing a computer program, where the computer program is executed by a processor to implement some or all of the steps described in the method according to the first aspect of the embodiments of the present application.
Compared with the method that a plurality of target requirement types corresponding to software to be tested and a plurality of target test strategies corresponding to the plurality of target requirement types are determined manually, the software to be tested is tested according to the plurality of target test strategies, and a software test result of the software to be tested is obtained.
These and other aspects of the present application will be more readily apparent from the following description of the embodiments.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments or the background art of the present application, the drawings required to be used in the embodiments or the background art of the present application will be described below.
FIG. 1 is a schematic structural diagram of a software testing system according to an embodiment of the present disclosure;
FIG. 2 is a schematic flowchart of a software testing method according to an embodiment of the present disclosure;
FIG. 3 is a schematic flow chart diagram illustrating another software testing method provided by the embodiments of the present application;
FIG. 4 is a block diagram illustrating functional units of a software testing apparatus according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed description of the invention
In order to make the technical solutions better understood by those skilled in the art, 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 partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The following are detailed below.
The terms "first," "second," "third," and "fourth," etc. in the description and claims of this application and in the accompanying 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 following describes embodiments of the present application in detail.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a software testing system according to an embodiment of the present application, the software testing system including a processor, wherein:
the system comprises a processor and a control module, wherein the processor is used for acquiring first software to be tested and second software to be tested, the first software to be tested is the software to be tested after version updating, and the second software to be tested is the software to be tested before version updating;
the processor is used for determining N target demand types corresponding to the first software to be tested according to the first software to be tested and the second software to be tested, wherein N is an integer larger than 1;
the processor is used for inputting the N target requirement types into the test strategy model for processing and outputting N target test strategies, and the N target test strategies correspond to the N target requirement types one by one;
and the processor is used for testing the first software to be tested by adopting the N target testing strategies to obtain a software testing result corresponding to the first software to be tested.
Referring to fig. 2, fig. 2 is a schematic flow chart of a software testing method according to an embodiment of the present application, where the software testing method includes steps 201 and 204 as follows:
201: the electronic equipment obtains first software to be tested and second software to be tested, wherein the first software to be tested is the software to be tested after version updating, and the second software to be tested is the software to be tested before version updating.
In one possible example, before the electronic device obtains the first software to be tested and the second software to be tested, the method further includes:
the electronic equipment acquires a target software type, a target software testing period and target software aiming at the crowd corresponding to the first software to be tested;
the electronic equipment determines a first software score corresponding to the target software type according to the mapping relation between the software type and the software score;
the electronic equipment determines a second software score corresponding to the target software test period according to the mapping relation between the software test period and the software score;
the electronic equipment determines a third software score corresponding to the target software aiming at the crowd according to the mapping relation between the software aiming at the crowd and the software score;
the electronic equipment determines a target software score corresponding to the first software to be tested according to the first software score, the second software score, the third software score and a software score formula;
and the electronic equipment adjusts the test sequence of the first software to be tested in the software test queue according to the target software score.
Specifically, the electronic device includes a display screen, and the implementation of the electronic device for acquiring the type of the target software, the test cycle of the target software, and the target software corresponding to the first software to be tested, for the crowd, may be: the electronic equipment displays a software information interface to be tested on a display screen, wherein the software information interface to be tested comprises a software type input box, a software testing period input box and a software crowd-oriented input box; when first touch operation aiming at the software type input box, the software testing period input box and the crowd input box is detected, the electronic equipment acquires a target software type, a target software testing period and a target software corresponding to the first touch operation aiming at the crowd.
The mapping relation between the software type and the software score, the mapping relation between the software testing period and the software score and the mapping relation between the software and the software score aiming at the crowd are stored in the electronic equipment in advance.
Wherein, the software score formula is as follows:
S=A1×α1+A2×α2+A3×α3,
s is a target software score corresponding to the first software to be tested, a1 is a first software score corresponding to the target software type, α 1 is a weight corresponding to the target software type, a2 is a second software score corresponding to the target software testing period, α 2 is a weight corresponding to the target software testing period, A3 is a third software score corresponding to the target software for the crowd, α 3 is a weight corresponding to the target software for the crowd, and α 1+ α 2+ α 3 is equal to 1.
As can be seen, in this example, the electronic device determines the target software score corresponding to the first software to be tested for the crowd according to the target software type corresponding to the first software to be tested, the target software testing period, and the target software, and adjusts the testing sequence of the first software to be tested in the software testing queue according to the target software score, which is beneficial to shortening the time length for testing the first software to be tested and accelerating the release rate of the first software to be tested.
In one possible example, the electronic device obtains first software to be tested and second software to be tested, including:
when a software testing request is detected, the electronic equipment acquires a first software version number and a second software version number which are included in the software testing request, wherein the first software version number is the version number of software to be tested after version updating, and the second software version number is the version number of the software to be tested before version updating;
the electronic equipment respectively determines a first storage position corresponding to the first software version number and a second storage position corresponding to the second software version number according to the mapping relation between the pre-stored software version number and the storage position of the software to be tested;
the electronic equipment respectively selects first software to be tested corresponding to the first storage position and second software to be tested corresponding to the second storage position from a plurality of software to be tested included in a software library to be tested.
The mapping relation between the software version number and the storage position of the software to be tested is stored in the electronic equipment in advance.
The software library to be tested is stored in the electronic equipment in advance.
202: the electronic equipment determines N target requirement types corresponding to the first software to be tested according to the first software to be tested and the second software to be tested, wherein N is an integer greater than 1.
Wherein the requirement types comprise function requirements, performance requirements, safety requirements and reliability requirements. Compatibility requirements, etc.
In one possible example, the determining, by the electronic device, the N target requirement types corresponding to the first software to be tested according to the first software to be tested and the second software to be tested includes:
the electronic equipment respectively acquires a first program code set corresponding to the first software to be tested and a second program code set corresponding to the second software to be tested;
the electronic device determining N target program code segments for which the first set of program code is different from the second set of program code;
the electronic equipment acquires N object program annotations corresponding to the N object program code segments, wherein the N object program annotations correspond to the N object program code segments one by one;
the electronic equipment determines N target requirement types corresponding to the first software to be tested according to a mapping relation between pre-stored program annotations and requirement types, wherein the N target requirement types correspond to the N target program annotations one by one.
Wherein the program annotations are input by a developer when writing the program code segments.
Specifically, the embodiment of the electronic device determining that the first program code set and the second program code set are different from each other in the N target program code sections may be: the electronic device commands N target program code sections, different from the first program code set and the second program code set, according to gitdiff.
The git diff HEAD ^ -the filename command is used for comparing the change information of different versions of software to be tested submitted in the software library to be tested in two times recently.
Specifically, the mapping relationship between the program annotation and the requirement type is stored in the electronic device in advance.
In one possible example, the determining, by the electronic device, the N target requirement types corresponding to the first software to be tested according to the first software to be tested and the second software to be tested includes:
the electronic equipment respectively acquires a first program code set corresponding to the first software to be tested and a second program code set corresponding to the second software to be tested;
the electronic device determining N target program code segments for which the first set of program code is different from the second set of program code;
the electronic equipment acquires N object program annotations corresponding to the N object program code segments, wherein the N object program annotations correspond to the N object program code segments one by one;
the electronic equipment determines N first requirement types according to a mapping relation between pre-stored program annotations and requirement types, wherein the N first requirement types correspond to the N target program annotations one by one;
the electronic equipment acquires N second requirement types corresponding to the first software to be tested, wherein the N second requirement types are input by a tester aiming at the N target program code segments;
if the N second requirement types are the same as the N first requirement types, the electronic device determines the N first requirement types as N target requirement types corresponding to the first software to be tested.
Specifically, the implementation manner of the electronic device obtaining the N second requirement types corresponding to the first software to be tested may be as follows: the electronic equipment displays a demand type information interface on a display screen, wherein the demand type information interface comprises N object program code segments and N demand type input frames, and the N demand type input frames correspond to the N object program code segments one by one; when second touch operation aiming at the N requirement type input frames is detected, the electronic equipment acquires N target requirement types corresponding to the second touch operation.
In one possible example, the method further comprises:
if the N second requirement types are different from the N first requirement types, the electronic device sends a requirement type request carrying the N target program code segments to a requirement type platform, wherein the requirement type request is used for indicating the requirement type platform to feed back a requirement type corresponding to each target program code segment in the N target program code segments;
the electronic equipment receives N third demand types sent by the demand type platform aiming at the demand type request;
if the N third requirement types are the same as the N first requirement types and the N third requirement types are different from the N second requirements, the electronic device determines the N first requirement types as N target requirement types corresponding to the first software to be tested;
if the N third requirement types are different from the N first requirement types and the N third requirement types are the same as the N second requirement types, the electronic device determines the N second requirement types as N target requirement types corresponding to the first software to be tested.
In one possible example, the method further comprises:
if the N third requirement types are different from the N first requirement types and the N third requirement types are different from the N second requirement types, the electronic device determines the N third requirement types as N target requirement types corresponding to the first software to be tested.
In one possible example, the determining, by the electronic device, N target requirement types corresponding to the first software to be tested according to the first software to be tested and the second software to be tested includes:
the electronic equipment respectively acquires a first program code set corresponding to first software to be tested and a second program code set corresponding to second software to be tested;
the electronic device determining N target program code segments for which the first set of program code is different from the second set of program code;
the electronic equipment acquires N object program comments corresponding to the N object program code segments, wherein the N object program comments correspond to the N object program code segments one by one;
the electronic equipment determines N first requirement types according to the mapping relation between the annotation program and the requirement types, wherein the N first requirement types correspond to N target program annotations one by one;
the electronic equipment sends a requirement type request carrying N target program code segments to a requirement type platform, wherein the requirement type request is used for indicating the requirement type platform to feed back a requirement type corresponding to each target program code segment in the N target program code segments;
the electronic equipment receives N third demand types sent by the demand type platform aiming at the demand type request;
if the N third requirement types are the same as the N first requirement types, the electronic equipment determines the N first requirement types as N target requirement types corresponding to the first software to be tested;
if the N third requirement types are different from the N first requirement types, the electronic device determines the N third requirement types as N target requirement types corresponding to the first software to be tested.
203: and the electronic equipment inputs the N target requirement types into a test strategy model for processing and outputs N target test strategies, wherein the N target test strategies correspond to the N target requirement types one by one.
The test strategy model is used for selecting a test strategy matched with the requirement type.
In one possible example, the inputting, by the electronic device, the N target requirement types into the test policy model for processing, and outputting N target test policies includes:
the electronic equipment inputs the N target demand types into a test strategy model, wherein the test strategy model comprises a mapping relation between the demand types and test strategy names and a mapping relation between the test strategy names and storage positions of test strategies;
the electronic equipment determines N target test strategy names according to the mapping relation between the requirement types and the test strategy names, wherein the N target test strategy names correspond to the N target requirement types one by one;
the electronic equipment determines N third storage positions according to the mapping relation between the test strategy names and the storage positions of the test strategies, wherein the N third storage positions correspond to the N target test strategy names one by one;
the electronic equipment selects N target test strategies corresponding to the N third storage positions from a plurality of test strategies included in a test strategy library, wherein the N target test strategies are in one-to-one correspondence with the N third storage positions.
The test strategy library is stored in the electronic equipment in advance.
204: and the electronic equipment tests the first software to be tested by adopting the N target test strategies to obtain a software test result corresponding to the first software to be tested.
In one possible example, the step of testing, by the electronic device, the first software to be tested by using the N target test strategies to obtain a software test result corresponding to the first software to be tested includes:
the electronic equipment adopts an ith target test strategy to test the first software to be tested, and an ith software part test result corresponding to the ith target test strategy is obtained;
after the ith software part test result is obtained, the electronic equipment adopts an (i +1) th target test strategy to test the first software to be tested, so as to obtain an (i +1) th software part test result corresponding to the (i +1) th target test strategy;
the electronic equipment stops testing the first software to be tested until i is equal to N, so that N software partial test results are obtained, wherein i is an increasing integer with an initial value of 1 and an interval of 1;
and the electronic equipment determines the N software part test results as the software test results corresponding to the first software to be tested.
Compared with the method that a plurality of target requirement types corresponding to software to be tested and a plurality of target test strategies corresponding to the plurality of target requirement types are determined manually, the software to be tested is tested according to the plurality of target test strategies, and a software test result of the software to be tested is obtained.
In one possible example, the electronic device includes a display screen, and after the electronic device tests the first software to be tested by using the N target test strategies and obtains a software test result corresponding to the first software to be tested, the method further includes:
the electronic equipment converts a software test result corresponding to the first software to be tested into a truth table;
the electronic device displays the truth table through the display screen.
It can be seen that, in this example, the electronic device converts the software test result corresponding to the first software to be tested into the truth table, displays the truth table through the display screen, and displays the software test result of the first software to be tested in the form of the truth table, which is helpful for improving the look-up property of the software test result of the software to be tested.
Referring to fig. 3, fig. 3 is a schematic flow chart of another software testing method provided in the embodiment of the present application, where the software testing method includes steps 301 and 311, as follows:
301: when a software testing request is detected, the electronic equipment obtains a first software version number and a second software version number which are included in the software testing request, wherein the first software version number is the version number of software to be tested after version updating, and the second software version number is the version number of the software to be tested before version updating.
302: and the electronic equipment respectively determines a first storage position corresponding to the first software version number and a second storage position corresponding to the second software version number according to the mapping relation between the pre-stored software version number and the storage position of the software to be tested.
303: the electronic equipment respectively selects first software to be tested corresponding to the first storage position and second software to be tested corresponding to the second storage position from a plurality of software to be tested included in a software library to be tested.
304: and the electronic equipment respectively acquires a first program code set corresponding to the first software to be tested and a second program code set corresponding to the second software to be tested.
305: the electronic device determines N target program code sections of the first set of program code that are different from the second set of program code.
306: the electronic equipment acquires N object program annotations corresponding to the N object program code segments, wherein the N object program annotations correspond to the N object program code segments one by one.
307: the electronic equipment determines N first requirement types corresponding to the first software to be tested according to a mapping relation between pre-stored program annotations and requirement types, wherein the N first requirement types correspond to the N target program annotations one by one.
308: the electronic equipment acquires N second requirement types corresponding to the first software to be tested, wherein the N second requirement types are input by a tester aiming at the N target program code segments.
309: if the N second requirement types are the same as the N first requirement types, the electronic device determines the N first requirement types as N target requirement types corresponding to the first software to be tested.
310: and the electronic equipment inputs the N target requirement types into a test strategy model for processing and outputs N target test strategies, wherein the N target test strategies correspond to the N target requirement types one by one.
311: and the electronic equipment tests the first software to be tested by adopting the N target test strategies to obtain a software test result corresponding to the first software to be tested.
It should be noted that, the specific implementation of the steps of the method shown in fig. 3 can refer to the specific implementation described in the above method, and will not be described here.
The above embodiments mainly introduce the scheme of the embodiments of the present application from the perspective of the method-side implementation process. It is understood that the electronic device comprises corresponding hardware structures and/or software modules for performing the respective functions in order to realize the above-mentioned functions. Those of skill in the art would readily appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as hardware or combinations of hardware and computer software. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiment of the present application, the electronic device may be divided into the functional units according to the method example, for example, each functional unit may be divided corresponding to each function, or two or more functions may be integrated into one processing unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit. It should be noted that the division of the unit in the embodiment of the present application is schematic, and is only a logic function division, and there may be another division manner in actual implementation.
Referring to fig. 4, fig. 4 is a block diagram of functional units of a software testing apparatus according to an embodiment of the present application, where the software testing apparatus 400 includes:
an obtaining unit 401, configured to obtain first software to be tested and second software to be tested, where the first software to be tested is software to be tested after version update, and the second software to be tested is software to be tested before version update;
a determining unit 402, configured to determine, according to the first software to be tested and the second software to be tested, N target requirement types corresponding to the first software to be tested, where N is an integer greater than 1;
a processing unit 403, configured to input the N target requirement types into a test policy model for processing, and output N target test policies, where the N target test policies correspond to the N target requirement types one to one;
the testing unit 404 is configured to test the first software to be tested by using the N target testing strategies to obtain a software testing result corresponding to the first software to be tested.
Compared with the method that a plurality of target requirement types corresponding to software to be tested and a plurality of target test strategies corresponding to the plurality of target requirement types are determined manually, the software to be tested is tested according to the plurality of target test strategies, and a software test result of the software to be tested is obtained.
In one possible example, in terms of acquiring the first software to be tested and the second software to be tested, the acquiring unit 401 is specifically configured to:
when a software testing request is detected, acquiring a first software version number and a second software version number which are included in the software testing request, wherein the first software version number is the version number of software to be tested after version updating, and the second software version number is the version number of the software to be tested before version updating;
respectively determining a first storage position corresponding to the first software version number and a second storage position corresponding to the second software version number according to the mapping relation between the pre-stored software version number and the storage position of the software to be tested;
and respectively selecting first software to be tested corresponding to the first storage position and second software to be tested corresponding to the second storage position from a plurality of software to be tested in a software library to be tested.
In a possible example, in terms of determining the N target demand types corresponding to the first software to be tested according to the first software to be tested and the second software to be tested, the determining unit 402 is specifically configured to:
respectively acquiring a first program code set corresponding to the first software to be tested and a second program code set corresponding to the second software to be tested;
determining N target program code sections of the first set of program code that are different from the second set of program code;
acquiring N object program annotations corresponding to the N object program code segments, wherein the N object program annotations correspond to the N object program code segments one by one;
and determining N target requirement types corresponding to the first software to be tested according to a mapping relation between pre-stored program annotations and requirement types, wherein the N target requirement types correspond to the N target program annotations one by one.
In a possible example, in terms of determining the N target demand types corresponding to the first software to be tested according to the first software to be tested and the second software to be tested, the determining unit 402 is specifically configured to:
respectively acquiring a first program code set corresponding to the first software to be tested and a second program code set corresponding to the second software to be tested;
determining N target program code sections of the first set of program code that are different from the second set of program code;
acquiring N object program annotations corresponding to the N object program code segments, wherein the N object program annotations correspond to the N object program code segments one by one;
determining N first requirement types according to a mapping relation between pre-stored program annotations and requirement types, wherein the N first requirement types correspond to the N target program annotations one by one;
acquiring N second requirement types corresponding to the first software to be tested, wherein the N second requirement types are input by a tester aiming at the N target program code segments;
and if the N second demand types are the same as the N first demand types, determining the N first demand types as N target demand types corresponding to the first software to be tested.
In a possible example, in terms of determining the N target demand types corresponding to the first software to be tested according to the first software to be tested and the second software to be tested, the determining unit 402 is specifically configured to:
if the N second requirement types are different from the N first requirement types, sending a requirement type request carrying the N target program code segments to a requirement type platform, wherein the requirement type request is used for indicating the requirement type platform to feed back a requirement type corresponding to each target program code segment in the N target program code segments;
receiving N third demand types sent by the demand type platform aiming at the demand type request;
if the N third requirement types are the same as the N first requirement types and the N third requirement types are different from the N second requirements, determining the N first requirement types as N target requirement types corresponding to the first software to be tested;
and if the N third demand types are different from the N first demand types and the N third demand types are the same as the N second demand types, determining the N second demand types as N target demand types corresponding to the first software to be tested.
In a possible example, in terms of inputting the N target requirement types into the test policy model for processing and outputting N target test policies, the processing unit 403 is specifically configured to:
inputting the N target demand types into a test strategy model, wherein the test strategy model comprises a mapping relation between the demand types and test strategy names and a mapping relation between the test strategy names and storage positions of test strategies;
determining N target test strategy names according to the mapping relation between the requirement types and the test strategy names, wherein the N target test strategy names correspond to the N target requirement types one by one;
determining N third storage positions according to the mapping relation between the test strategy names and the storage positions of the test strategies, wherein the N third storage positions correspond to the N target test strategy names one by one;
and selecting N target test strategies corresponding to the N third storage positions from a plurality of test strategies included in a test strategy library, wherein the N target test strategies correspond to the N third storage positions one by one.
In a possible example, in terms of obtaining a software test result corresponding to the first software to be tested by testing the first software to be tested by using the N target test policies, the testing unit 404 is specifically configured to:
testing the first software to be tested by adopting an ith target test strategy to obtain an ith software part test result corresponding to the ith target test strategy;
after the ith software part test result is obtained, testing the first software to be tested by adopting an (i +1) th target test strategy to obtain an (i +1) th software part test result corresponding to the (i +1) th target test strategy;
stopping testing the first software to be tested until i is equal to N, and obtaining N software partial testing results, wherein i is an increasing integer with an initial value of 1 and an interval of 1;
and determining the N software part test results as the software test results corresponding to the first software to be tested.
In accordance with the embodiments shown in fig. 2 and fig. 3, please refer to fig. 5, fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application, where the electronic device 500 includes a processor, a memory, a communication interface, and one or more programs, the one or more programs are stored in the memory and configured to be executed by the processor, and the programs include instructions for:
acquiring first software to be tested and second software to be tested, wherein the first software to be tested is the software to be tested after the version is updated, and the second software to be tested is the software to be tested before the version is updated;
determining N target demand types corresponding to the first software to be tested according to the first software to be tested and the second software to be tested, wherein N is an integer greater than 1;
inputting the N target demand types into a test strategy model for processing, and outputting N target test strategies, wherein the N target test strategies correspond to the N target demand types one by one;
and testing the first software to be tested by adopting the N target testing strategies to obtain a software testing result corresponding to the first software to be tested.
Compared with the method that a plurality of target requirement types corresponding to software to be tested and a plurality of target test strategies corresponding to the plurality of target requirement types are determined manually, the software to be tested is tested according to the plurality of target test strategies, and a software test result of the software to be tested is obtained.
In one possible example, in obtaining the first software to be tested and the second software to be tested, the program comprises instructions for performing the following steps:
when a software testing request is detected, acquiring a first software version number and a second software version number which are included in the software testing request, wherein the first software version number is the version number of software to be tested after version updating, and the second software version number is the version number of the software to be tested before version updating;
respectively determining a first storage position corresponding to the first software version number and a second storage position corresponding to the second software version number according to the mapping relation between the pre-stored software version number and the storage position of the software to be tested;
and respectively selecting first software to be tested corresponding to the first storage position and second software to be tested corresponding to the second storage position from a plurality of software to be tested in a software library to be tested.
In one possible example, in terms of determining the N target requirement types corresponding to the first software to be tested according to the first software to be tested and the second software to be tested, the program includes instructions specifically configured to perform the following steps:
respectively acquiring a first program code set corresponding to the first software to be tested and a second program code set corresponding to the second software to be tested;
determining N target program code sections of the first set of program code that are different from the second set of program code;
acquiring N object program annotations corresponding to the N object program code segments, wherein the N object program annotations correspond to the N object program code segments one by one;
and determining N target requirement types corresponding to the first software to be tested according to a mapping relation between pre-stored program annotations and requirement types, wherein the N target requirement types correspond to the N target program annotations one by one.
In one possible example, in terms of determining the N target requirement types corresponding to the first software to be tested according to the first software to be tested and the second software to be tested, the program includes instructions specifically configured to perform the following steps:
respectively acquiring a first program code set corresponding to the first software to be tested and a second program code set corresponding to the second software to be tested;
determining N target program code sections of the first set of program code that are different from the second set of program code;
acquiring N object program annotations corresponding to the N object program code segments, wherein the N object program annotations correspond to the N object program code segments one by one;
determining N first requirement types according to a mapping relation between pre-stored program annotations and requirement types, wherein the N first requirement types correspond to the N target program annotations one by one;
acquiring N second requirement types corresponding to the first software to be tested, wherein the N second requirement types are input by a tester aiming at the N target program code segments;
and if the N second demand types are the same as the N first demand types, determining the N first demand types as N target demand types corresponding to the first software to be tested.
In one possible example, in terms of determining the N target requirement types corresponding to the first software to be tested according to the first software to be tested and the second software to be tested, the program includes instructions specifically configured to perform the following steps:
if the N second requirement types are different from the N first requirement types, sending a requirement type request carrying the N target program code segments to a requirement type platform, wherein the requirement type request is used for indicating the requirement type platform to feed back a requirement type corresponding to each target program code segment in the N target program code segments;
receiving N third demand types sent by the demand type platform aiming at the demand type request;
if the N third requirement types are the same as the N first requirement types and the N third requirement types are different from the N second requirements, determining the N first requirement types as N target requirement types corresponding to the first software to be tested;
determining the N second demand types as the N first demand types if the N third demand types are different from the N first demand types and the N third demand types are the same as the N second demand types
And N target requirement types corresponding to the first software to be tested.
In one possible example, in terms of inputting the N target requirement types into the test policy model for processing and outputting N target test policies, the program includes instructions specifically configured to:
inputting the N target demand types into a test strategy model, wherein the test strategy model comprises a mapping relation between the demand types and test strategy names and a mapping relation between the test strategy names and storage positions of test strategies;
determining N target test strategy names according to the mapping relation between the requirement types and the test strategy names, wherein the N target test strategy names correspond to the N target requirement types one by one;
determining N third storage positions according to the mapping relation between the test strategy names and the storage positions of the test strategies, wherein the N third storage positions correspond to the N target test strategy names one by one;
and selecting N target test strategies corresponding to the N third storage positions from a plurality of test strategies included in a test strategy library, wherein the N target test strategies correspond to the N third storage positions one by one.
In one possible example, in terms of obtaining the software test result corresponding to the first software to be tested by testing the first software to be tested by using the N target test policies, the program includes instructions specifically configured to perform the following steps:
testing the first software to be tested by adopting an ith target test strategy to obtain an ith software part test result corresponding to the ith target test strategy;
after the ith software part test result is obtained, testing the first software to be tested by adopting an (i +1) th target test strategy to obtain an (i +1) th software part test result corresponding to the (i +1) th target test strategy;
stopping testing the first software to be tested until i is equal to N, and obtaining N software partial testing results, wherein i is an increasing integer with an initial value of 1 and an interval of 1;
and determining the N software part test results as the software test results corresponding to the first software to be tested.
Embodiments of the present application further provide a computer storage medium for storing a computer program, where the computer program is executed by a processor to implement part or all of the steps of any one of the methods described in the above method embodiments, and the computer includes an electronic device.
Embodiments of the present 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 some or all of the steps of any of the methods as described in the above method embodiments. The computer program product may be a software installation package, the computer comprising an electronic device.
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 should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this 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, the above-described division of the units is only one type of division of logical functions, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into 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 be distributed on a plurality of network units. 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 form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit may be stored in a computer readable memory if it is implemented in the form of a software functional unit and sold or used as a stand-alone product. Based on such understanding, the technical solution of the present application may be substantially implemented or a part of or all or part of the technical solution contributing to the prior art may be embodied in the form of a software product stored in a memory, and including several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the above-mentioned method of the embodiments of the present application. And the aforementioned memory comprises: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
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 Memory disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, 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 implementation and application scope, and in view of the above, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. A method for testing software, the method comprising:
acquiring first software to be tested and second software to be tested, wherein the first software to be tested is the software to be tested after the version is updated, and the second software to be tested is the software to be tested before the version is updated;
determining N target demand types corresponding to the first software to be tested according to the first software to be tested and the second software to be tested, wherein N is an integer greater than 1;
inputting the N target demand types into a test strategy model for processing, and outputting N target test strategies, wherein the N target test strategies correspond to the N target demand types one by one;
and testing the first software to be tested by adopting the N target testing strategies to obtain a software testing result corresponding to the first software to be tested.
2. The method of claim 1, wherein said obtaining a first software under test and a second software under test comprises:
when a software testing request is detected, acquiring a first software version number and a second software version number which are included in the software testing request, wherein the first software version number is the version number of software to be tested after version updating, and the second software version number is the version number of the software to be tested before version updating;
respectively determining a first storage position corresponding to the first software version number and a second storage position corresponding to the second software version number according to the mapping relation between the pre-stored software version number and the storage position of the software to be tested;
and respectively selecting first software to be tested corresponding to the first storage position and second software to be tested corresponding to the second storage position from a plurality of software to be tested in a software library to be tested.
3. The method of claim 2, wherein the determining the N target requirement types corresponding to the first software to be tested according to the first software to be tested and the second software to be tested comprises:
respectively acquiring a first program code set corresponding to the first software to be tested and a second program code set corresponding to the second software to be tested;
determining N target program code sections of the first set of program code that are different from the second set of program code;
acquiring N object program annotations corresponding to the N object program code segments, wherein the N object program annotations correspond to the N object program code segments one by one;
and determining N target requirement types corresponding to the first software to be tested according to a mapping relation between pre-stored program annotations and requirement types, wherein the N target requirement types correspond to the N target program annotations one by one.
4. The method of claim 2, wherein the determining the N target requirement types corresponding to the first software to be tested according to the first software to be tested and the second software to be tested comprises:
respectively acquiring a first program code set corresponding to the first software to be tested and a second program code set corresponding to the second software to be tested;
determining N target program code sections of the first set of program code that are different from the second set of program code;
acquiring N object program annotations corresponding to the N object program code segments, wherein the N object program annotations correspond to the N object program code segments one by one;
determining N first requirement types according to a mapping relation between pre-stored program annotations and requirement types, wherein the N first requirement types correspond to the N target program annotations one by one;
acquiring N second requirement types corresponding to the first software to be tested, wherein the N second requirement types are input by a tester aiming at the N target program code segments;
and if the N second demand types are the same as the N first demand types, determining the N first demand types as N target demand types corresponding to the first software to be tested.
5. The method of claim 4, further comprising:
if the N second requirement types are different from the N first requirement types, sending a requirement type request carrying the N target program code segments to a requirement type platform, wherein the requirement type request is used for indicating the requirement type platform to feed back a requirement type corresponding to each target program code segment in the N target program code segments;
receiving N third demand types sent by the demand type platform aiming at the demand type request;
if the N third requirement types are the same as the N first requirement types and the N third requirement types are different from the N second requirements, determining the N first requirement types as N target requirement types corresponding to the first software to be tested;
and if the N third demand types are different from the N first demand types and the N third demand types are the same as the N second demand types, determining the N second demand types as N target demand types corresponding to the first software to be tested.
6. The method according to any one of claims 3-5, wherein the inputting the N target demand types into a test strategy model for processing and outputting N target test strategies comprises:
inputting the N target demand types into a test strategy model, wherein the test strategy model comprises a mapping relation between the demand types and test strategy names and a mapping relation between the test strategy names and storage positions of test strategies;
determining N target test strategy names according to the mapping relation between the requirement types and the test strategy names, wherein the N target test strategy names correspond to the N target requirement types one by one;
determining N third storage positions according to the mapping relation between the test strategy names and the storage positions of the test strategies, wherein the N third storage positions correspond to the N target test strategy names one by one;
and selecting N target test strategies corresponding to the N third storage positions from a plurality of test strategies included in a test strategy library, wherein the N target test strategies correspond to the N third storage positions one by one.
7. The method according to claim 6, wherein the testing the first software to be tested by using the N target testing strategies to obtain a software testing result corresponding to the first software to be tested includes:
testing the first software to be tested by adopting an ith target test strategy to obtain an ith software part test result corresponding to the ith target test strategy;
after the ith software part test result is obtained, testing the first software to be tested by adopting an (i +1) th target test strategy to obtain an (i +1) th software part test result corresponding to the (i +1) th target test strategy;
stopping testing the first software to be tested until i is equal to N, and obtaining N software partial testing results, wherein i is an increasing integer with an initial value of 1 and an interval of 1;
and determining the N software part test results as the software test results corresponding to the first software to be tested.
8. A software testing apparatus, characterized in that the apparatus comprises:
the device comprises an acquisition unit, a judgment unit and a control unit, wherein the acquisition unit is used for acquiring first software to be tested and second software to be tested, the first software to be tested is the software to be tested after version updating, and the second software to be tested is the software to be tested before version updating;
the determining unit is used for determining N target demand types corresponding to the first software to be tested according to the first software to be tested and the second software to be tested, wherein N is an integer greater than 1;
the processing unit is used for inputting the N target demand types into a test strategy model for processing and outputting N target test strategies, wherein the N target test strategies correspond to the N target demand types one by one;
and the testing unit is used for testing the first software to be tested by adopting the N target testing strategies to obtain a software testing result corresponding to the first software to be tested.
9. An electronic device comprising a processor, memory, a communication interface, and one or more programs stored in the memory and configured to be executed by the processor, the programs comprising instructions for performing some or all of the steps of the method of any of claims 1-7.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium is used to store a computer program, which is executed by a processor to implement the method according to any of claims 1-7.
CN201910880742.0A 2019-09-18 2019-09-18 Software testing method and related equipment Active CN110750447B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910880742.0A CN110750447B (en) 2019-09-18 2019-09-18 Software testing method and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910880742.0A CN110750447B (en) 2019-09-18 2019-09-18 Software testing method and related equipment

Publications (2)

Publication Number Publication Date
CN110750447A true CN110750447A (en) 2020-02-04
CN110750447B CN110750447B (en) 2023-07-25

Family

ID=69276647

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910880742.0A Active CN110750447B (en) 2019-09-18 2019-09-18 Software testing method and related equipment

Country Status (1)

Country Link
CN (1) CN110750447B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111538647A (en) * 2020-04-15 2020-08-14 杭州迪普科技股份有限公司 Equipment health state detection method and device and client
CN111930634A (en) * 2020-09-09 2020-11-13 北京瑞莱智慧科技有限公司 Model processing method, device, medium and computing equipment
CN113190433A (en) * 2021-04-01 2021-07-30 联想凌拓科技有限公司 Program testing method and device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104461877A (en) * 2014-11-27 2015-03-25 百度在线网络技术(北京)有限公司 Software testing method and device
CN109101420A (en) * 2018-07-20 2018-12-28 中国邮政储蓄银行股份有限公司 Determine the method, apparatus and system, terminal of Test Strategy
CN109240929A (en) * 2018-09-18 2019-01-18 百度在线网络技术(北京)有限公司 Software quality prediction method, apparatus, terminal and computer readable storage medium
CN110096438A (en) * 2019-04-12 2019-08-06 平安普惠企业管理有限公司 Method for testing software and relevant apparatus
CN110134595A (en) * 2019-04-19 2019-08-16 平安科技(深圳)有限公司 Analysis method, device, computer equipment before SVN resource library test
CN110134594A (en) * 2019-04-19 2019-08-16 平安科技(深圳)有限公司 Function test method, device and the computer equipment of application including account name

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104461877A (en) * 2014-11-27 2015-03-25 百度在线网络技术(北京)有限公司 Software testing method and device
CN109101420A (en) * 2018-07-20 2018-12-28 中国邮政储蓄银行股份有限公司 Determine the method, apparatus and system, terminal of Test Strategy
CN109240929A (en) * 2018-09-18 2019-01-18 百度在线网络技术(北京)有限公司 Software quality prediction method, apparatus, terminal and computer readable storage medium
CN110096438A (en) * 2019-04-12 2019-08-06 平安普惠企业管理有限公司 Method for testing software and relevant apparatus
CN110134595A (en) * 2019-04-19 2019-08-16 平安科技(深圳)有限公司 Analysis method, device, computer equipment before SVN resource library test
CN110134594A (en) * 2019-04-19 2019-08-16 平安科技(深圳)有限公司 Function test method, device and the computer equipment of application including account name

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111538647A (en) * 2020-04-15 2020-08-14 杭州迪普科技股份有限公司 Equipment health state detection method and device and client
CN111930634A (en) * 2020-09-09 2020-11-13 北京瑞莱智慧科技有限公司 Model processing method, device, medium and computing equipment
CN113190433A (en) * 2021-04-01 2021-07-30 联想凌拓科技有限公司 Program testing method and device

Also Published As

Publication number Publication date
CN110750447B (en) 2023-07-25

Similar Documents

Publication Publication Date Title
CN110750447A (en) Software testing method and related equipment
US8549478B2 (en) Graphical user interface input element identification
CN104954353B (en) The method of calibration and device of APK file bag
US8868924B1 (en) System and method for modifying a software distribution package
CN106716398B (en) Visually distinguishing character strings for testing
CN104246767A (en) Telemetry system for a cloud synchronization system
CN104135520B (en) A kind of method and device for identifying android terminal
CN111198815B (en) Compatibility testing method and device for user interface
CN106776105B (en) System startup file checking and compiling method
CN104820676B (en) A kind of method and device for judging version number's size
CN106557308A (en) A kind of software continuous integrated approach and device
CN105117499A (en) File display method and device based on cloud disk
CN110515755A (en) Interface function verification method, device, equipment and computer readable storage medium
CN109063481A (en) A kind of risk checking method and device
US20140164845A1 (en) Host computer and method for testing sas expanders
CN102880478B (en) Oftware updating method
CN110569058A (en) System upgrading method, device, terminal and computer readable storage medium
CN107590064A (en) A kind of application upgrade method of testing, device and system
CN113272785B (en) Method for mounting file system, terminal equipment and storage medium
CN109240928A (en) A kind of test method, device, equipment and storage medium
KR101252358B1 (en) Apparatus and method for testing plc command
CN111538994A (en) System security detection and repair method, device, storage medium and terminal
CN106445737A (en) Multi-backup starting method
CN110889116A (en) Advertisement blocking method and device and electronic equipment
CN115757165A (en) Automatic testing method, device, 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