CN115794646A - Software testing method and device, electronic equipment and storage medium - Google Patents

Software testing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115794646A
CN115794646A CN202211585549.2A CN202211585549A CN115794646A CN 115794646 A CN115794646 A CN 115794646A CN 202211585549 A CN202211585549 A CN 202211585549A CN 115794646 A CN115794646 A CN 115794646A
Authority
CN
China
Prior art keywords
software
test
testing
scene
case
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211585549.2A
Other languages
Chinese (zh)
Inventor
姜唯
马杰
吴大忠
罗欢
王涛
罗清
萧展辉
杨漾
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Southern Power Grid Digital Grid Research Institute Co Ltd
Original Assignee
Southern Power Grid Digital Grid Research Institute 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 Southern Power Grid Digital Grid Research Institute Co Ltd filed Critical Southern Power Grid Digital Grid Research Institute Co Ltd
Priority to CN202211585549.2A priority Critical patent/CN115794646A/en
Publication of CN115794646A publication Critical patent/CN115794646A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a software testing method, a software testing device, electronic equipment and a storage medium. The method comprises the following steps: acquiring software to be tested and a software identifier corresponding to the software to be tested; matching the software identification corresponding to the software to be tested in a database to obtain a test case set and a test scene set; acquiring a software testing demand identifier, and determining a target testing case and a target testing scene based on the software testing demand identifier, the testing case set and the testing scene set; and testing the software to be tested based on the target test case and the target test scene to obtain a test result. By the technical scheme, automatic software testing is realized, and compared with the prior art, personnel operation is reduced, so that software testing efficiency is improved.

Description

Software testing method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a software testing method and apparatus, an electronic device, and a storage medium.
Background
The Development operators (DevOps) is a platform integrating software Development personnel (devs) and IT operation and maintenance technicians (Ops), and enables software to be built, tested and released more quickly, frequently and reliably through an automatic software delivery process and an automatic architecture change process.
The application architecture of the DevOps platform is mainly divided into: the method comprises the steps of research and development cooperation, code management, application deployment, testing and the like, wherein the testing process is carried out after software research and development are completed, the existing testing process is mainly completed by depending on experience and manual operation of testers, a testing task is established according to testing requirements and experience of products, and the testing efficiency is low.
Disclosure of Invention
The invention provides a software testing method, a software testing device, electronic equipment and a storage medium, and aims to solve the problem of low software testing efficiency.
According to an aspect of the present invention, there is provided a software testing method, including:
acquiring software to be tested and a software identifier corresponding to the software to be tested;
matching the software identification corresponding to the software to be tested in a database to obtain a test case set and a test scene set;
acquiring a software testing demand identifier, and determining a target testing case and a target testing scene based on the software testing demand identifier, the testing case set and the testing scene set;
and testing the software to be tested based on the target test case and the target test scene to obtain a test result.
According to another aspect of the present invention, there is provided a software testing apparatus including:
the software acquisition module is used for acquiring software to be tested and a software identifier corresponding to the software to be tested;
the data matching module is used for matching the software identification corresponding to the software to be tested in a database to obtain a test case set and a test scene set;
the target data determining module is used for acquiring a software testing demand identifier, and determining a target testing case and a target testing scene based on the software testing demand identifier, the testing case set and the testing scene set;
and the software testing module is used for testing the software to be tested based on the target test case and the target test scene to obtain a test result.
According to another aspect of the present invention, there is provided an electronic apparatus including:
at least one processor;
and a memory communicatively coupled to the at least one processor;
wherein the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to enable the at least one processor to perform the software testing method according to any of the embodiments of the present invention.
According to another aspect of the present invention, there is provided a computer-readable storage medium storing computer instructions for causing a processor to implement a software testing method according to any one of the embodiments of the present invention when the computer instructions are executed.
According to the technical scheme of the embodiment of the invention, the software to be tested and the software identification corresponding to the software to be tested are obtained; matching software identifications corresponding to software to be tested in a database to obtain a test case set and a test scene set; acquiring a software test requirement identifier, and determining a target test case and a target test scene based on the software test requirement identifier, the test case set and the test scene set; and testing the software to be tested based on the target test case and the target test scene to obtain a test result. By the technical scheme, automatic software testing is realized, and compared with the prior art, personnel operation is reduced, so that software testing efficiency is improved.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present invention, nor do they necessarily limit the scope of the invention. Other features of the present invention will become apparent from the following description.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a flowchart of a software testing method according to an embodiment of the present invention;
FIG. 2 is a flowchart of a software testing method according to a second embodiment of the present invention;
FIG. 3 is a flowchart of a software testing method according to a third embodiment of the present invention;
FIG. 4 is a schematic structural diagram of a software testing apparatus according to a fourth embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device implementing the software testing method according to the embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Moreover, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example one
Fig. 1 is a flowchart of a software testing method according to an embodiment of the present invention, where the present embodiment is applicable to a case of automatically performing a software test, and the method may be executed by a software testing apparatus, where the software testing apparatus may be implemented in a form of hardware and/or software, and the software testing apparatus may be configured in a computer terminal. As shown in fig. 1, the method includes:
s110, acquiring software to be tested and a software identifier corresponding to the software to be tested.
In this embodiment, the software testing method is implemented based on a DevOps platform. The DevOps platform may include Jenkins (pipeline), gitLab (code warehouse), sonarQube (code quality analysis), nexusOSS (work warehouse), maven (compilation build), and Harbor (Docker mirror warehouse), among other modules.
It should be noted that in the DevOps platform, multiple tasks such as code inspection, compiling, packaging, deployment, etc. need to be performed, and the multiple tasks may be associated and managed as needed, or executed in parallel or in series, and executed as needed. In this embodiment, a software test function may be called through Jenkins of the DevOps platform to trigger an automated detection process.
In this embodiment, the software to be tested refers to software to be automatically detected, and may be composed of computer data and instructions organized according to a specific order. The software to be tested may be, for example, software related to a power grid system. The software identification refers to identification information of software to be tested and has uniqueness. The software identifier may be composed of one or more of numbers, english words and symbols. Illustratively, the software identifier may be a software identifier code.
Illustratively, software to be tested and a software identification of the software to be tested can be obtained from a DevOps platform. Wherein the software identification is determined by a developer after the software to be tested is developed.
And S120, matching the software identification corresponding to the software to be tested in a database to obtain a test case set and a test scene set.
In this embodiment, configuration files for different software and different requirements may be stored in the database in advance, and the configuration files may include test cases and test scenarios. Specifically, the test case and the test scenario can be obtained by matching in the database according to the software identifier. The test case set may be composed of a plurality of test cases. The set of test scenarios may be made up of a plurality of test scenarios.
S130, acquiring a software testing requirement identifier, and determining a target testing case and a target testing scene based on the software testing requirement identifier, the testing case set and the testing scene set.
In this embodiment, the software testing requirement identifier refers to a requirement identifier corresponding to a requirement functional point of the software to be tested, and has uniqueness. The software testing requirement identification can be composed of one or more of numbers, english and symbols. The demand function point can be obtained from the demand list. Illustratively, the software testing requirement identifier may be a requirement identifier code.
It can be understood that each requirement function point has one or more software testing requirement identifications corresponding to the requirement function point, and the software testing requirement identifications and the software identifications can be established by adopting the same rule. Meanwhile, it should be noted that each required function point needs to be tested separately, and the present embodiment only introduces the test completion process according to a test scheme of a certain required function point.
Specifically, the software test requirement identifier may be respectively matched in the test case set and the test scenario set to obtain the target test case and the target test scenario.
S140, testing the software to be tested based on the target test case and the target test scene to obtain a test result.
In this embodiment, the software to be tested may be tested according to the determined target test case and the target test scenario, so as to obtain a test result of the software to be tested. Optionally, during the testing process of the software to be tested according to the determined target test case and the target test scene, a test log may also be generated, so as to implement recording of the testing process.
In some optional embodiments, after determining the target test case and the target test scenario based on the software test requirement identification, the set of test cases, and the set of test scenarios, the method further includes: and comparing the target test case and the target test scene with a preset applicability configuration table, and judging whether the target test case and the target test scene test the software to be tested or not based on the comparison result.
The preset applicability configuration table can be used for detecting the applicability of the test case and the test scene.
Specifically, the target test case and the target test scene are compared with a preset applicability configuration table, and if a conflict exists, the target test case and the target test scene do not test the software to be tested; and if no conflict exists, testing the software to be tested by the target test case and the target test scene.
In some embodiments, the test tasks may also be ordered. Specifically, the positioning elements of the test tasks are obtained, the sequence of the test tasks is determined according to the corresponding positions of the positioning elements in the test task path, and the efficient performance of the test function can be integrally guaranteed. Wherein, the test task path is a known parameter item of the test task.
According to the technical scheme of the embodiment of the invention, the software to be tested and the software identification corresponding to the software to be tested are obtained; matching software identifications corresponding to software to be tested in a database to obtain a test case set and a test scene set; acquiring a software test requirement identifier, and determining a target test case and a target test scene based on the software test requirement identifier, the test case set and the test scene set; and testing the software to be tested based on the target test case and the target test scene to obtain a test result. By the technical scheme, automatic software testing is realized, and compared with the prior art, personnel operation is reduced, so that software testing efficiency is improved.
Example two
Fig. 2 is a flowchart of a software testing method provided in the second embodiment of the present invention, and the method in this embodiment may be combined with various alternatives in the software testing method provided in the foregoing embodiments. The software testing method provided by the embodiment is further optimized. Optionally, the database includes an example library and a scene library; the matching of the software identifier corresponding to the software to be tested in the database to obtain a test case set and a test scenario set includes: matching the software identification corresponding to the software to be tested in the case library to obtain a test case set; and matching the software identification corresponding to the software to be tested in the scene library to obtain a test scene set.
As shown in fig. 2, the method includes:
s210, acquiring software to be tested and a software identifier corresponding to the software to be tested.
S220, matching the software identification corresponding to the software to be tested in the case library to obtain a test case set.
In this embodiment, the case library is used to store preset test cases. Specifically, test cases for different software and different requirements are stored in the case base in advance, and the test cases in each case base have case identifications corresponding to the test cases.
Specifically, the software identifier corresponding to the software to be tested may be matched in the use case library to obtain a plurality of test cases matched with the software identifier, and a test case set may be generated according to the plurality of test cases.
In some optional embodiments, matching the software identifier corresponding to the software to be tested in a use case library to obtain a test case set, including: comparing the software identification corresponding to the software to be tested with each case identification in the case library; and if the comparison result shows that the software identifier corresponding to the software to be tested falls into the case identifier in the case library, determining the test case corresponding to the case identifier as an element of the test case set so as to generate the test case set.
The case library comprises a plurality of test cases with case identifications, and each case identification has a corresponding test case.
Exemplarily, comparing a software identifier corresponding to software to be tested with each use case identifier in a use case library; if the comparison result shows that the software identifiers corresponding to the software to be tested all fall into the case identifiers in the case library, determining the test cases corresponding to the case identifiers as elements of the test case set so as to generate the test case set; and if the comparison result shows that the software identifiers corresponding to the software to be tested do not all fall into the case identifiers in the case library, copying the test case corresponding to the case identifier with the highest coincidence degree with the software identifiers, modifying the test case by a tester to be used as the test case, and adding the test case to the test case set.
In some embodiments, the software identifier may be compared with the case identifiers of the test cases in the case library, and the test case set may be determined according to the coincidence degree of the software identifier and the case identifiers. The overlapping degree may be obtained by calculating the number of data overlaps, and the like, which is not limited herein. It should be noted that the case identifiers falling into a certain test case indicate that the software identifiers are all in the case identifiers of a certain test case.
And S230, matching the software identification corresponding to the software to be tested in the scene library to obtain a test scene set.
In this embodiment, the scene library is used to store a preset test scene configuration file. Specifically, test scenario configuration files for different software and different requirements are stored in the scenario library in advance, and a scenario identifier corresponding to the test scenario is arranged in each scenario library.
Specifically, the software identifier corresponding to the software to be tested may be matched in the scene library to obtain a plurality of test scenes matched with the software identifier, and a test scene set may be generated according to the plurality of test scenes.
In some optional embodiments, matching the software identifier corresponding to the software to be tested in the scenario library to obtain a test scenario set, including: comparing a software identifier corresponding to the software to be tested with each scene identifier in a scene library; and if the comparison result shows that the software identifier corresponding to the software to be tested falls into the scene identifier in the scene library, determining the test scene corresponding to the scene identifier as an element of the test scene set to generate the test scene set.
The scene library comprises a plurality of test scenes with scene identifications, and each scene identification has a corresponding test scene. The scene identification and the software identification can be established by adopting the same rule.
Exemplarily, comparing a software identifier corresponding to software to be tested with each scene identifier in a scene library; and if the comparison result is that the software identifiers corresponding to the software to be tested all fall into the case identifiers in the scene library, determining the test scenes corresponding to the scene identifiers as elements of the test scene set to generate the test scene set, and if the comparison result is that the software identifiers corresponding to the software to be tested do not all fall into the scene identifiers in the scene library, copying the test scenes corresponding to the scene identifiers with the highest coincidence degree with the software identifiers, taking the test scenes as the test scenes after being modified by testers, and adding the test scenes to the test scene set.
In some embodiments, the software identifier may be compared with scene identifiers of test scenes in the scene library, and a test scene set may be determined according to a degree of coincidence between the software identifier and the scene identifiers. It should be noted that the scene identifiers falling into a certain test scenario indicate that the software identifiers are all in the scene identifiers of a certain test scenario.
S240, acquiring a software testing requirement identifier, and determining a target testing case and a target testing scene based on the software testing requirement identifier, the testing case set and the testing scene set.
S250, testing the software to be tested based on the target test case and the target test scene to obtain a test result.
According to the technical scheme of the embodiment of the invention, a test case set is obtained by matching the software identification corresponding to the software to be tested in a case library; the software identification corresponding to the software to be tested is matched in the scene library to obtain a test scene set, the labor and time for manually building and selecting the test case and the test environment can be reduced in the process, and the software testing efficiency is improved.
EXAMPLE III
Fig. 3 is a flowchart of a software testing method provided in a third embodiment of the present invention, and the method of the present embodiment and each alternative in the software testing method provided in the foregoing embodiments may be combined. The software testing method provided by the embodiment is further optimized. Optionally, the determining a target test case and a target test scenario based on the software test requirement identifier, the test case set, and the test scenario set includes: matching the software testing requirement identification in the testing case set to obtain a target testing case; and matching the software testing requirement identification in the testing scene set to obtain a target testing scene.
As shown in fig. 3, the method includes:
s310, obtaining software to be tested and a software identification corresponding to the software to be tested.
S320, matching the software identification corresponding to the software to be tested in a database to obtain a test case set and a test scene set.
S330, acquiring a software test requirement identifier, and matching the software test requirement identifier in the test case set to obtain a target test case.
S340, matching the software testing requirement identification in the testing scene set to obtain a target testing scene.
Exemplarily, comparing the software test requirement identifier with each case identifier in the test case set; and if the comparison result is that all the software test requirement identifications fall into the case identifications in the test case set, determining the test case corresponding to the case identification as the target test case. And if the comparison result is that the software test requirement identification does not completely fall into the case identification in the test case set, copying the test case corresponding to the case identification with the highest coincidence degree with the software test requirement identification, and modifying the test case by a tester to be used as a target test case. It should be noted that the case identifiers falling into a certain test case indicate that the software test requirement identifiers are all in the case identifiers of a certain test case.
Similarly, comparing the software testing requirement identification with each scene identification in the testing scene set; and if the comparison result is that all the software test requirement identifications fall into the scene identification in the test scene set, determining the test scene corresponding to the scene identification as a target test scene. And if the comparison result is that the software test requirement identification does not fall into the scene identification in the test scene set, copying the test scene corresponding to the scene identification with the highest coincidence degree with the software test requirement identification, and modifying the test scene by a tester to be used as a target test scene. It should be noted that the scenario identifier falling into a certain test scenario indicates that the software test requirement identifiers are all in the scenario identifier of the certain test scenario.
And S350, testing the software to be tested based on the target test case and the target test scene to obtain a test result.
In some optional embodiments, the target test scenario comprises an exception scenario; correspondingly, testing the software to be tested based on the target test case and the target test scene to obtain a test result, wherein the test result comprises the following steps: and testing the software to be tested based on the target test case and the abnormal scene to obtain a test result.
The abnormal scene may be an abnormal scene that generates abnormal data and hardware faults. Specifically, the software to be tested can be tested in an abnormal scene according to the functional requirements, the problem of low efficiency caused by temporarily modifying scene data can be effectively avoided, and meanwhile the comprehensiveness of software testing can be improved.
For example, the exception scenario may be initiated by a trigger program, and the trigger program is preset in a configuration file of the software to be tested. According to the method and the device, the abnormal scene is started through the trigger program, the abnormal scenes of different software and different requirements can be simulated, and further the comprehensiveness and the accuracy of the test process are improved.
In some embodiments, when there is no test case in the case library that coincides with the software identifier or the software testing requirement identifier, a blank test case template is provided to the tester at this time. Similarly, when no test scene coincident with the software identifier or the software test requirement identifier exists in the scene library, the blank test scene template is provided for the tester.
In some embodiments, under the condition that no corresponding test scene or test case exists, the test scene or test case with the highest coincidence degree is copied and provided for the tester to modify, so that the effort and time spent by the tester to re-construct the test scene or test case can be avoided, and the efficiency of constructing the scene or case is improved.
According to the technical scheme of the embodiment of the invention, the target test case is obtained by matching the software test requirement identification in the test case set; and matching the software test requirement identification in the test scene set to obtain a target test scene. The process can reduce the effort and time for manually building and selecting the test cases and the test environment, and improve the efficiency of software testing.
Example four
Fig. 4 is a schematic structural diagram of a software testing apparatus according to a fourth embodiment of the present invention. As shown in fig. 4, the apparatus includes:
a software obtaining module 410, configured to obtain software to be tested and a software identifier corresponding to the software to be tested; the data matching module 420 is configured to match the software identifier corresponding to the software to be tested in a database, so as to obtain a test case set and a test scene set; a target data determining module 430, configured to obtain a software testing requirement identifier, and determine a target test case and a target test scenario based on the software testing requirement identifier, the test case set, and the test scenario set; the software testing module 440 is configured to test the software to be tested based on the target test case and the target test scenario to obtain a test result.
According to the technical scheme of the embodiment of the invention, the software to be tested and the software identification corresponding to the software to be tested are obtained; matching software identification corresponding to software to be tested in a database to obtain a test case set and a test scene set; acquiring a software test requirement identifier, and determining a target test case and a target test scene based on the software test requirement identifier, the test case set and the test scene set; and testing the software to be tested based on the target test case and the target test scene to obtain a test result. By the technical scheme, automatic software testing is realized, and compared with the prior art, personnel operation is reduced, so that software testing efficiency is improved.
In some alternative embodiments, the database comprises an example library and a scenario library; a data matching module 420 comprising:
the test case matching unit is used for matching the software identification corresponding to the software to be tested in the case library to obtain a test case set;
and the test scene matching unit is used for matching the software identifier corresponding to the software to be tested in the scene library to obtain a test scene set.
In some optional embodiments, the test case matching unit is specifically configured to:
comparing the software identification corresponding to the software to be tested with each use case identification in the use case library;
and if the comparison result shows that the software identifier corresponding to the software to be tested falls into the case identifier in the case library, determining the test case corresponding to the case identifier as an element of the test case set so as to generate the test case set.
In some optional embodiments, the test scenario matching unit is specifically configured to:
comparing the software identification corresponding to the software to be tested with each scene identification in the scene library;
and if the comparison result is that the software identification corresponding to the software to be tested falls into the scene identification in the scene library, determining the test scene corresponding to the scene identification as an element of a test scene set to generate the test scene set.
In some optional embodiments, the target data determining module 430 is specifically configured to:
matching the software testing requirement identification in the testing case set to obtain a target testing case;
and matching the software testing requirement identification in the testing scene set to obtain a target testing scene.
In some optional embodiments, the software testing apparatus further includes:
and the suitability detection module is used for comparing the target test case and the target test scene with a preset suitability configuration table and judging whether the target test case and the target test scene test the software to be tested or not based on the comparison result.
In some alternative embodiments, the target test scenario comprises an exception scenario; a software testing module 440 further configured to:
and testing the software to be tested based on the target test case and the abnormal scene to obtain a test result.
The software testing device provided by the embodiment of the invention can execute the software testing method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
EXAMPLE five
FIG. 5 illustrates a schematic diagram of an electronic device 10 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular telephones, smart phones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 5, the electronic device 10 includes at least one processor 11, and a memory communicatively connected to the at least one processor 11, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, and the like, wherein the memory stores a computer program executable by the at least one processor, and the processor 11 can perform various suitable actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from a storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data necessary for the operation of the electronic apparatus 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other via a bus 14. An I/O interface 15 is also connected to bus 14.
A number of components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, or the like; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, or the like. The processor 11 performs the various methods and processes described above, such as a software testing method, including:
acquiring software to be tested and a software identifier corresponding to the software to be tested;
matching the software identification corresponding to the software to be tested in a database to obtain a test case set and a test scene set;
acquiring a software testing demand identifier, and determining a target testing case and a target testing scene based on the software testing demand identifier, the testing case set and the testing scene set;
and testing the software to be tested based on the target test case and the target test scene to obtain a test result.
In some embodiments, the software testing method may be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the software testing method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the software testing method by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), system on a chip (SOCs), complex Programmable Logic Devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be performed. A computer program can execute entirely on a machine, partly on a machine, as a stand-alone software package partly on a machine and partly on a remote machine or entirely on a remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. A computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user may provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical host and VPS service are overcome.
It should be understood that various forms of the flows shown above, reordering, adding or deleting steps, may be used. For example, the steps described in the present invention may be executed in parallel, sequentially, or in different orders, and are not limited herein as long as the desired result of the technical solution of the present invention can be achieved.
The above-described embodiments should not be construed as limiting the scope of the invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A software testing method, comprising:
acquiring software to be tested and a software identifier corresponding to the software to be tested;
matching the software identification corresponding to the software to be tested in a database to obtain a test case set and a test scene set;
acquiring a software testing demand identifier, and determining a target testing case and a target testing scene based on the software testing demand identifier, the testing case set and the testing scene set;
and testing the software to be tested based on the target test case and the target test scene to obtain a test result.
2. The method of claim 1, wherein the database comprises a use case library and a scenario library;
the matching of the software identifier corresponding to the software to be tested in the database to obtain a test case set and a test scenario set includes:
matching the software identification corresponding to the software to be tested in the case library to obtain a test case set;
and matching the software identification corresponding to the software to be tested in the scene library to obtain a test scene set.
3. The method of claim 2, wherein the matching of the software identifier corresponding to the software to be tested in the case library to obtain a test case set comprises:
comparing the software identification corresponding to the software to be tested with each use case identification in the use case library;
and if the comparison result is that the software identification corresponding to the software to be tested falls into the case identification in the case library, determining the test case corresponding to the case identification as an element of the test case set so as to generate the test case set.
4. The method of claim 2, wherein the matching the software identifier corresponding to the software to be tested in the scenario library to obtain a test scenario set comprises:
comparing the software identification corresponding to the software to be tested with each scene identification in the scene library;
and if the comparison result is that the software identification corresponding to the software to be tested falls into the scene identification in the scene library, determining the test scene corresponding to the scene identification as an element of a test scene set to generate the test scene set.
5. The method of claim 1, wherein the determining a target test case and a target test scenario based on the software test requirement identifier, the set of test cases, and the set of test scenarios comprises:
matching the software testing requirement identification in the testing case set to obtain a target testing case;
and matching the software testing requirement identification in the testing scene set to obtain a target testing scene.
6. The method of claim 1, wherein after the determining target test cases and target test scenarios based on the software test requirements identification, the set of test cases, and the set of test scenarios, the method further comprises:
and comparing the target test case and the target test scene with a preset applicability configuration table, and judging whether the target test case and the target test scene test the software to be tested or not based on the comparison result.
7. The method of claim 1, wherein the target test scenario comprises an exception scenario;
correspondingly, the testing the software to be tested based on the target test case and the target test scenario to obtain a test result includes:
and testing the software to be tested based on the target test case and the abnormal scene to obtain a test result.
8. A software testing apparatus, comprising:
the software acquisition module is used for acquiring software to be tested and a software identifier corresponding to the software to be tested;
the data matching module is used for matching the software identification corresponding to the software to be tested in a database to obtain a test case set and a test scene set;
the target data determining module is used for acquiring a software testing demand identifier, and determining a target testing case and a target testing scene based on the software testing demand identifier, the testing case set and the testing scene set;
and the software testing module is used for testing the software to be tested based on the target test case and the target test scene to obtain a test result.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor;
and a memory communicatively coupled to the at least one processor;
wherein the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the software testing method of any one of claims 1-7.
10. A computer-readable storage medium storing computer instructions for causing a processor to perform the software testing method of any one of claims 1-7 when executed.
CN202211585549.2A 2022-12-09 2022-12-09 Software testing method and device, electronic equipment and storage medium Pending CN115794646A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211585549.2A CN115794646A (en) 2022-12-09 2022-12-09 Software testing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211585549.2A CN115794646A (en) 2022-12-09 2022-12-09 Software testing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115794646A true CN115794646A (en) 2023-03-14

Family

ID=85418502

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211585549.2A Pending CN115794646A (en) 2022-12-09 2022-12-09 Software testing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115794646A (en)

Similar Documents

Publication Publication Date Title
CN114064208A (en) Method and device for detecting application service state, electronic equipment and storage medium
CN115598505A (en) Chip detection method, device, equipment and storage medium
CN114924990A (en) Abnormal scene testing method and electronic equipment
CN114461534A (en) Software performance testing method and system, electronic equipment and readable storage medium
CN115757150A (en) Production environment testing method, device, equipment and storage medium
CN113641544A (en) Method, apparatus, device, medium and product for detecting application status
CN107423140B (en) Return code identification method and device
CN115826955A (en) Application publishing method, system, electronic device and storage medium
CN115576831A (en) Test case recommendation method, device, equipment and storage medium
CN115794646A (en) Software testing method and device, electronic equipment and storage medium
CN115687406A (en) Sampling method, device and equipment of call chain data and storage medium
CN115437961A (en) Data processing method and device, electronic equipment and storage medium
CN114003497A (en) Method, device and equipment for testing service system and storage medium
CN115098362A (en) Page testing method and device, electronic equipment and storage medium
CN115328736A (en) Probe deployment method, device, equipment and storage medium
CN114116288A (en) Fault processing method, device and computer program product
CN114741291A (en) Method, device, equipment and medium for automatically submitting vulnerability information
CN114443493A (en) Test case generation method and device, electronic equipment and storage medium
CN113656210A (en) Processing method and device for error reporting information, server and readable storage medium
CN116225390A (en) Warehouse-in method, device, equipment and medium for software development files
CN109871310B (en) Version quality testing method and device
CN116303019A (en) Test tracing method, device, equipment and medium
CN116450400A (en) Application program abnormality analysis method and device, electronic equipment and storage medium
CN116594827A (en) Automatic test method and device for hardware equipment, workbench, equipment and medium
CN115757097A (en) Test case generation method and device, electronic 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