CN111078550A - Software testing method and device, computer device and storage medium - Google Patents

Software testing method and device, computer device and storage medium Download PDF

Info

Publication number
CN111078550A
CN111078550A CN201911251768.5A CN201911251768A CN111078550A CN 111078550 A CN111078550 A CN 111078550A CN 201911251768 A CN201911251768 A CN 201911251768A CN 111078550 A CN111078550 A CN 111078550A
Authority
CN
China
Prior art keywords
test
software
target module
integrated
tested
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
CN201911251768.5A
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.)
Shenzhen Onething Technology Co Ltd
Original Assignee
Shenzhen Onething Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Onething Technology Co Ltd filed Critical Shenzhen Onething Technology Co Ltd
Priority to CN201911251768.5A priority Critical patent/CN111078550A/en
Publication of CN111078550A publication Critical patent/CN111078550A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3604Software analysis for verifying properties of programs
    • G06F11/3608Software analysis for verifying properties of programs using formal methods, e.g. model checking, abstract interpretation
    • 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

Landscapes

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

Abstract

The invention provides a software testing method, which comprises the following steps: acquiring software to be tested, wherein the software to be tested comprises a plurality of modules; determining a target module and a test metric for the target module from the plurality of modules; acquiring test software corresponding to the target module; integrating the target module and the test software into integrated test software; and executing the integrated test software to test the target module, and outputting a test result of the target module corresponding to the test index. The invention also provides a software testing device, a computer device and a computer readable storage medium. The invention can perform modularized test on software, and improves the software testing efficiency.

Description

Software testing method and device, computer device and storage medium
Technical Field
The invention relates to the technical field of testing, in particular to a software testing method and device, a computer device and a computer readable storage medium.
Background
Generally, after a developer completes development of a software system, the developer needs to write test code to test the developed software system. The software system is composed of a plurality of modules, and if one module needs to be tested, the whole software system needs to be reconstructed and tested. For large software systems, it takes a significant amount of time for a developer to rebuild the entire software system at a time. If only one module in the software system is modified, the whole system needs to be tested, a great deal of time is also occupied by developers, and the working efficiency of the developers is reduced.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a software testing method, a software testing apparatus, a computer readable storage medium and a computer program product, which can perform a modular test on software and improve testing efficiency.
A first aspect of the present application provides a software testing method, the method comprising:
acquiring software to be tested, wherein the software to be tested comprises a plurality of modules;
determining a target module and a test metric for the target module from the plurality of modules;
acquiring test software corresponding to the target module;
integrating the target module and the test software into integrated test software;
and executing the integrated test software to test the target module, and outputting a test result of the target module corresponding to the test index.
In another possible implementation manner, the determining a target module and a test indicator of the target module from the plurality of modules includes:
receiving a module selection instruction;
and acquiring the target module and the test index of the target module according to the module selection instruction.
In another possible implementation manner, the test index of the test software includes a test index of the target module.
In another possible implementation manner, the integrating the target module and the test software into integrated test software includes:
compiling the target module to obtain a link library of the target module;
connecting the test software with the link library;
and compiling the test software connected with the link library to obtain the integrated test software, wherein the integrated test software is an executable file.
In another possible implementation manner, the link libraries of the target module include a static link library and a dynamic link library.
In another possible implementation manner, the method further includes:
configuring the integrated test software to an automatic test platform;
and if the integrated test software is changed, testing the integrated test software by using the automatic test platform, so that the automatic test platform outputs a test result of the target module corresponding to the test index.
In another possible implementation manner, the automatic test platform includes a distributed version control system, and the method further includes:
and selecting a code branch with the integrated test software in the distributed version control system for testing.
A second aspect of the application provides a computer apparatus comprising a memory and a processor, the memory having stored thereon a computer program executable on the processor, the computer program, when executed by the processor, implementing the software testing method.
A third aspect of the present application provides a software testing apparatus, the apparatus comprising:
the device comprises a first acquisition unit, a second acquisition unit and a control unit, wherein the first acquisition unit is used for acquiring software to be tested, and the software to be tested comprises a plurality of modules;
a determination unit configured to determine a target module and a test index of the target module from the plurality of modules;
the second acquisition unit is used for acquiring the test software corresponding to the target module;
an integration unit for integrating the target module and the test software into integrated test software;
and the execution unit is used for executing the integrated test software to test the target module and outputting a test result of the target module corresponding to the test index.
In another possible implementation manner, the determining a target module and a test indicator of the target module from the plurality of modules includes:
receiving a module selection instruction;
and acquiring the target module and the test index of the target module according to the module selection instruction.
In another possible implementation manner, the test index of the test software includes a test index of the target module.
In another possible implementation manner, the integrating the target module and the test software into integrated test software includes:
compiling the target module to obtain a link library of the target module;
connecting the test software with the link library;
and compiling the test software connected with the link library to obtain the integrated test software, wherein the integrated test software is an executable file.
In another possible implementation manner, the link libraries of the target module include a static link library and a dynamic link library.
In another possible implementation manner, the software testing apparatus further includes a testing unit, configured to configure the integrated testing software to an automatic testing platform;
and if the integrated test software is changed, testing the integrated test software by using the automatic test platform, so that the automatic test platform outputs a test result of the target module corresponding to the test index.
In another possible implementation manner, the automatic test platform includes a distributed version control system, and the method further includes:
and selecting a code branch with the integrated test software in the distributed version control system for testing.
A fourth aspect of the present application provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the software testing method.
A fifth aspect of the present application provides a computer program product comprising computer instructions which, when run on a computer device, cause the computer device to perform the software testing method.
The method comprises the steps of obtaining software to be tested, wherein the software to be tested comprises a plurality of modules; determining a target module and a test metric for the target module from the plurality of modules; acquiring test software corresponding to the target module; integrating the target module and the test software into integrated test software; and executing the integrated test software to test the target module, and outputting a test result of the target module corresponding to the test index. The invention carries out modularized test on the software, thereby improving the software testing efficiency.
Drawings
FIG. 1 is a flowchart of a software testing method according to a preferred embodiment of the present invention.
FIG. 2 is a flowchart of a software testing apparatus according to a preferred embodiment of the present invention.
FIG. 3 is a diagram of a computer device according to a preferred embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. 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 invention.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims of the present application and in the drawings described above, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be practiced otherwise than as specifically illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, apparatus, article, or device 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 device.
It should be noted that the description relating to "first", "second", etc. in the present invention is for descriptive purposes only and is not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In addition, technical solutions between various embodiments may be combined with each other, but must be realized by a person skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination should not be considered to exist, and is not within the protection scope of the present invention.
Preferably, the software testing method of the present invention is applied in one or more computer devices. The computer device is a device capable of automatically performing numerical calculation and/or information processing according to a preset or stored instruction, and the hardware includes, but is not limited to, a microprocessor, an Application Specific Integrated Circuit (ASIC), a Programmable Gate Array (FPGA), a Digital Signal Processor (DSP), an embedded device, and the like.
The computer device can be a desktop computer, a notebook, a palm computer, a cloud server and other computing equipment. The computer device can be in man-machine interaction with a user through a keyboard, a mouse, a remote controller, a touch panel or voice control equipment and the like.
The computer device may be a node constituting a CDN (Content Delivery Network) Network or a blockchain Network.
Example one
Fig. 1 is a flowchart of a software testing method according to an embodiment of the present invention. The software testing method is applied to a computer device and used for performing modular testing on software.
Referring to fig. 1, the software testing method specifically includes the following steps:
101, acquiring software to be tested, wherein the software to be tested comprises a plurality of modules.
The method can receive a test instruction, and acquire the software to be tested from the code warehouse according to the software to be tested identifier in the test instruction. The software identification to be tested can uniquely identify one piece of software to be tested, and the software identification to be tested can be the name, serial number and the like of the software to be tested.
In particular, the code repository may be an area for storing code.
In a specific embodiment, the test instruction may be issued according to a trigger operation of a user, for example, if the user selects or inputs the identifier of the software to be tested in the user interface, the test instruction issued by the user interface may be received. The test instructions may also be generated automatically. For example, a test instruction including a software identifier to be tested is automatically generated at a preset time; or when the performance index of the server executing the software to be tested is detected to be beyond the preset index range, automatically generating a test instruction comprising the identifier of the software to be tested.
The software to be tested can comprise a plurality of modules, for example, an online shopping mall software can comprise a commodity management module, an order management module, a payment module, a logistics module and the like.
102, determining a target module and a test index of the target module from the plurality of modules.
In a specific embodiment, the determining the target module from the plurality of modules comprises:
receiving a module selection instruction;
and acquiring the target module and the test index of the target module according to the module selection instruction.
For example, a module selection instruction input by a user may be received, a module corresponding to a module identifier in the module selection instruction may be acquired, and an index corresponding to an index identifier in the module selection instruction may be acquired from a preset index.
In another embodiment, the plurality of modules have corresponding test identifiers for identifying whether the modules are tested or not; a module that has not been tested may be obtained from the plurality of modules according to the test identification.
The test indexes of the target module can comprise performance indexes, safety indexes, stability indexes and the like. The performance indicators may include QPS (query rate per second, which is a measure of how much traffic a particular query server processes within a specified time), CPU (central processing unit) occupancy, memory usage, and the like.
103, obtaining the test software corresponding to the target module.
In an embodiment, the test indicator of the test software includes a test indicator of the target module, and the testable range of the test software may include a pretest range of the target module. The test index of the target module is an index which needs to be tested by the target module, the test index of the test software is an index which can be tested by the test software, the test software can be integrated with the target module and then test the target module, and the test range is the test index of the test software.
And 104, integrating the target module and the testing software into integrated testing software.
In a specific embodiment, the integrating the target module and the testing software into the integrated testing software includes:
compiling the target module to obtain a link library of the target module;
connecting the test software with the link library;
and compiling the test software connected with the link library to obtain the integrated test software, wherein the integrated test software is an executable file.
For example, the executable file may be a class file in a JAVA Virtual Machine (JVM).
In another embodiment, the linked library of target modules may include: a statically linked library or a dynamically linked library. The dynamic link library is a library which contains codes and data which can be used by a plurality of programs simultaneously; dynamically linked libraries provide a way for a process to call functions that are not part of its executable code. In the statically linked library, functions and data are compiled into a binary file, and during the linking process, the compiler will recover the functions and data from the statically linked library and combine the recovered functions, data and other modules of the test software to generate an executable file. Statically linked libraries may not be published with executable files.
And 105, executing the integrated test software to test the target module, and outputting a test result of the target module corresponding to the test index.
In a specific embodiment, when the execution result of the integrated test software is abnormal, it is determined that the test on the target module fails. For example, when exception (exception) is output during the execution of the integrated test software, the test corresponding to the test index on the target module fails.
In another embodiment, when the QPS, CPU occupancy, or memory usage of the target module under test exceeds a preset range, the test on the target module fails.
In another embodiment, when the test on the target module fails, the test result is sent to a preset mail address by mail.
The embodiment can test the module in the software to be tested independently, avoids reconstructing the software to be tested, thereby reducing the time for testing the software to be tested and improving the testing efficiency.
The software testing method of the first embodiment obtains software to be tested, wherein the software to be tested comprises a plurality of modules; determining a target module and a test metric for the target module from the plurality of modules; acquiring test software corresponding to the target module; integrating the target module and the test software into integrated test software; and executing the integrated test software to test the target module, and outputting a test result of the target module corresponding to the test index. The embodiment tests the software in a modularization mode, and software testing efficiency is improved.
In another embodiment, the software testing method may further include:
configuring the integrated test software to an automatic test platform;
and if the integrated test software is changed, testing the integrated test software by using the automatic test platform, so that the automatic test platform outputs a test result of the target module corresponding to the test index.
For example, the integrated test software is configured to the automatic test platform, when a line of codes of a target module in the integrated test software is changed, the automatic test platform is used for retesting the integrated test software, so that the automatic test platform outputs a test result corresponding to a test index for the target module, thereby improving the test efficiency and avoiding a user from testing the software to be tested for many times.
In another embodiment, the automatic test platform includes a distributed version control system, and the software test method may further include:
and selecting a code branch with the integrated test software in the distributed version control system for testing.
The distributed version control system may be Git (an open source version control software that supports cloning the complete Git repository from a server onto a stand-alone machine and supports creating code branches and merging code branches).
Example two
FIG. 2 is a block diagram of a software testing apparatus according to a preferred embodiment of the present invention. The software testing device 10 is applied to a computer device and used for performing modular testing on software.
As shown in fig. 2, the software testing apparatus 10 may include: a first acquisition unit 201, a determination unit 202, a second acquisition unit 203, an integration unit 204, an execution unit 205.
The first obtaining unit 201 is configured to obtain software to be tested, where the software to be tested includes a plurality of modules.
The method can receive a test instruction, and acquire the software to be tested from the code warehouse according to the software to be tested identifier in the test instruction. The software identification to be tested can uniquely identify one piece of software to be tested, and the software identification to be tested can be the name, serial number and the like of the software to be tested.
In particular, the code repository may be an area for storing code.
In a specific embodiment, the test instruction may be issued according to a trigger operation of a user, for example, if the user selects or inputs the identifier of the software to be tested in the user interface, the test instruction issued by the user interface may be received. The test instructions may also be generated automatically. For example, a test instruction including a software identifier to be tested is automatically generated at a preset time; or when the performance index of the server executing the software to be tested is detected to be beyond the preset index range, automatically generating a test instruction comprising the identifier of the software to be tested.
The software to be tested can comprise a plurality of modules, for example, an online shopping mall software can comprise a commodity management module, an order management module, a payment module, a logistics module and the like.
A determining unit 202, configured to determine a target module and a test indicator of the target module from the plurality of modules.
In a specific embodiment, the determining the target module from the plurality of modules comprises:
receiving a module selection instruction;
and acquiring the target module and the test index of the target module according to the module selection instruction.
For example, a module selection instruction input by a user may be received, a module corresponding to a module identifier in the module selection instruction may be acquired, and an index corresponding to an index identifier in the module selection instruction may be acquired from a preset index.
In another embodiment, the plurality of modules have corresponding test identifiers for identifying whether the modules are tested or not; a module that has not been tested may be obtained from the plurality of modules according to the test identification.
The test indexes of the target module can comprise performance indexes, safety indexes, stability indexes and the like. The performance indicators may include QPS (query rate per second, which is a measure of how much traffic a particular query server processes within a specified time), CPU (central processing unit) occupancy, memory usage, and the like.
And a second obtaining unit 203, configured to obtain the test software corresponding to the target module.
In an embodiment, the test indicator of the test software includes a test indicator of the target module, and the testable range of the test software may include a pretest range of the target module. The test index of the target module is an index which needs to be tested by the target module, the test index of the test software is an index which can be tested by the test software, the test software can be integrated with the target module and then test the target module, and the test range is the test index of the test software.
An integration unit 204, configured to integrate the target module and the test software into an integrated test software.
In a specific embodiment, the integrating the target module and the testing software into the integrated testing software includes:
compiling the target module to obtain a link library of the target module;
connecting the test software with the link library;
and compiling the test software connected with the link library to obtain the integrated test software, wherein the integrated test software is an executable file.
For example, the executable file may be a class file in a JAVA Virtual Machine (JVM).
In another embodiment, the linked library of target modules may include: a statically linked library or a dynamically linked library. The dynamic link library is a library which contains codes and data which can be used by a plurality of programs simultaneously; dynamically linked libraries provide a way for a process to call functions that are not part of its executable code. In the statically linked library, functions and data are compiled into a binary file, and during the linking process, the compiler will recover the functions and data from the statically linked library and combine the recovered functions, data and other modules of the test software to generate an executable file. Statically linked libraries may not be published with executable files.
The execution unit 205 is configured to execute the integrated testing software to test the target module, and output a test result of the target module corresponding to the test index.
In a specific embodiment, when the execution result of the integrated test software is abnormal, it is determined that the test on the target module fails. For example, when exception (exception) is output during the execution of the integrated test software, the test corresponding to the test index on the target module fails.
In another embodiment, when the QPS, CPU occupancy, or memory usage of the target module under test exceeds a preset range, the test on the target module fails.
In another embodiment, when the test on the target module fails, the test result is sent to a preset mail address by mail.
The embodiment can test the module in the software to be tested independently, avoids reconstructing the software to be tested, thereby reducing the time for testing the software to be tested and improving the testing efficiency.
The software testing device 10 of the second embodiment obtains software to be tested, where the software to be tested includes a plurality of modules; determining a target module and a test metric for the target module from the plurality of modules; acquiring test software corresponding to the target module; integrating the target module and the test software into integrated test software; and executing the integrated test software to test the target module, and outputting a test result of the target module corresponding to the test index. The embodiment performs modular test on two pairs of software, thereby improving the test efficiency.
In another embodiment, the software testing apparatus further comprises a testing unit for configuring the integrated testing software to an automatic testing platform; and if the integrated test software is changed, testing the integrated test software by using the automatic test platform, so that the automatic test platform outputs a test result of the target module corresponding to the test index.
For example, the integrated test software is configured to the automatic test platform, when a line of codes of a target module in the integrated test software is changed, the automatic test platform is used for retesting the integrated test software, so that the automatic test platform outputs a test result corresponding to a test index for the target module, thereby improving the test efficiency and avoiding a user from testing the software to be tested for many times.
In another embodiment, the automatic test platform comprises a distributed version control system, and the test unit is further configured to select a code branch in the distributed version control system where the integrated test software exists for testing.
The distributed version control system may be Git (an open source version control software that supports cloning the complete Git repository from a server onto a stand-alone machine and supports creating code branches and merging code branches).
EXAMPLE III
The present embodiment provides a computer-readable storage medium, which stores thereon a computer program, and when the computer program is executed by a processor, the computer program implements the steps in the software testing method embodiment, for example, 101-105 shown in fig. 1:
101, acquiring software to be tested, wherein the software to be tested comprises a plurality of modules;
102, determining a target module and a test index of the target module from the plurality of modules;
103, acquiring test software corresponding to the target module;
104, integrating the target module and the test software into integrated test software;
and 105, executing the integrated test software to test the target module, and outputting a test result of the target module corresponding to the test index.
Alternatively, the computer program, when executed by the processor, implements the functions of the modules/units in the above-described device embodiments, for example, the unit 201 and 205 in fig. 2:
a first obtaining unit 201, configured to obtain software to be tested, where the software to be tested includes multiple modules;
a determining unit 202, configured to determine a target module and a test indicator of the target module from the plurality of modules;
a second obtaining unit 203, configured to obtain test software corresponding to the target module;
an integration unit 204 for integrating the target module and the test software into an integrated test software;
the execution unit 205 is configured to execute the integrated testing software to test the target module, and output a test result of the target module corresponding to the test index.
Example four
Fig. 3 is a schematic diagram of a computer device according to an embodiment of the present invention. The computer device 1 includes a memory 20, a processor 30, a bus 50, and a computer program 40, such as a shell execution permission acquisition program, stored in the memory 20 and executable on the processor 30. The processor 30, when executing the computer program 40, implements the steps in the software testing method embodiments described above, such as 101-105 shown in fig. 1:
101, acquiring software to be tested, wherein the software to be tested comprises a plurality of modules;
102, determining a target module and a test index of the target module from the plurality of modules;
103, acquiring test software corresponding to the target module;
104, integrating the target module and the test software into integrated test software;
and 105, executing the integrated test software to test the target module, and outputting a test result of the target module corresponding to the test index.
Alternatively, the processor 30, when executing the computer program 40, implements the functions of the modules/units in the above device embodiments, for example, the unit 201 and 205 in fig. 2:
a first obtaining unit 201, configured to obtain software to be tested, where the software to be tested includes multiple modules;
a determining unit 202, configured to determine a target module and a test indicator of the target module from the plurality of modules;
a second obtaining unit 203, configured to obtain test software corresponding to the target module;
an integration unit 204 for integrating the target module and the test software into an integrated test software;
the execution unit 205 is configured to execute the integrated testing software to test the target module, and output a test result of the target module corresponding to the test index.
Illustratively, the computer program 40 may be partitioned into one or more modules/units that are stored in the memory 20 and executed by the processor 30 to implement the present invention. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution process of the computer program 40 in the computer apparatus 1. For example, the computer program 40 may be divided into a first obtaining unit 201, a determining unit 202, a second obtaining unit 203, an integrating unit 204, and an executing unit 205 in fig. 2, and specific functions of each unit are shown in embodiment two.
The Computer device 1 may be a PC (Personal Computer), or may be a terminal device such as a smart phone, a tablet Computer, a palmtop Computer, a portable Computer, an intelligent router, an ore machine, and a network storage device. In this embodiment, the computer apparatus 1 may be an edge server.
The Processor 30 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, or the like. The general purpose processor may be a microprocessor or the processor 30 may be any conventional processor or the like, the processor 30 being the control center of the computer device 1 and connecting the various parts of the whole computer device 1 with various interfaces and lines.
The memory 20 may be used for storing the computer program 40 and/or the module/unit, and the processor 30 implements various functions of the computer device 1 by running or executing the computer program and/or the module/unit stored in the memory 20 and calling data stored in the memory 20. The memory 20 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data) created according to the use of the computer apparatus 1, and the like. In addition, the memory 20 may include high speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other non-volatile solid state storage device.
The bus 50 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus 50 may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 3, but this does not mean only one bus or one type of bus.
Further, the computer apparatus 1 may further include a network interface, which may optionally include a wired interface and/or a wireless interface (such as a WI-FI interface, a bluetooth interface, etc.), and is generally used for establishing a communication connection between the computer apparatus 1 and other electronic devices.
Optionally, the computer device 1 may further comprise a user interface, the user interface may comprise a Display (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface may further comprise a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable for displaying information processed in the computer device 1 and for displaying a visualized user interface.
It will be appreciated by a person skilled in the art that the schematic diagram 3 is merely an example of the computer device 1 and does not constitute a limitation of the computer device 1, and may comprise more or less components than those shown, or some components may be combined, or different components.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product.
The computer program product includes one or more computer instructions. The procedures or functions described in accordance with the embodiments of the invention are, in whole or in part, generated upon loading and execution of the computer program instructions on a computer apparatus. The computer device may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can store or a data storage device, such as a server, a data center, etc., that is integrated with one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described device embodiments are merely illustrative, and for example, the division of the units is only one type of logical function division, and other division manners may be available in actual implementation, for example, a plurality of units or components may be combined or integrated into another device, 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 through some interfaces, devices or units, and may be in an electrical, mechanical 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, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes 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 method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It should be noted that the above-mentioned numbers of the embodiments of the present invention are merely for description, and do not represent the merits of the embodiments. And the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, apparatus, article, or method. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, apparatus, article, or method that includes the element.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A method for testing software, the method comprising:
acquiring software to be tested, wherein the software to be tested comprises a plurality of modules;
determining a target module and a test metric for the target module from the plurality of modules;
acquiring test software corresponding to the target module;
integrating the target module and the test software into integrated test software;
and executing the integrated test software to test the target module, and outputting a test result of the target module corresponding to the test index.
2. The method of claim 1, wherein the determining a target module and a test metric for the target module from the plurality of modules comprises:
receiving a module selection instruction;
and acquiring the target module and the test index of the target module according to the module selection instruction.
3. The method of claim 1, wherein the test metrics of the test software comprise test metrics of the target module.
4. The method of claim 1, wherein the integrating the target module and the test software into integrated test software comprises:
compiling the target module to obtain a link library of the target module;
connecting the test software with the link library;
and compiling the test software connected with the link library to obtain the integrated test software, wherein the integrated test software is an executable file.
5. The method of claim 4, wherein the linked libraries of the target module include a statically linked library and a dynamically linked library.
6. The method of any one of claims 1-5, further comprising:
configuring the integrated test software to an automatic test platform;
and if the integrated test software is changed, testing the integrated test software by using the automatic test platform, so that the automatic test platform outputs a test result of the target module corresponding to the test index.
7. The method of claim 6, wherein the automated test platform comprises a distributed version control system, the method further comprising:
and selecting a code branch with the integrated test software in the distributed version control system for testing.
8. A computer arrangement, characterized in that the computer arrangement comprises a memory and a processor, the memory having stored thereon a computer program executable on the processor, the computer program, when executed by the processor, implementing a software testing method according to any one of claims 1-7.
9. A software testing apparatus, characterized in that the apparatus comprises:
the device comprises a first acquisition unit, a second acquisition unit and a control unit, wherein the first acquisition unit is used for acquiring software to be tested, and the software to be tested comprises a plurality of modules;
a determination unit configured to determine a target module and a test index of the target module from the plurality of modules;
the second acquisition unit is used for acquiring the test software corresponding to the target module;
an integration unit for integrating the target module and the test software into integrated test software;
and the execution unit is used for executing the integrated test software to test the target module and outputting a test result of the target module corresponding to the test index.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the software testing method according to any one of claims 1 to 7.
CN201911251768.5A 2019-12-09 2019-12-09 Software testing method and device, computer device and storage medium Pending CN111078550A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911251768.5A CN111078550A (en) 2019-12-09 2019-12-09 Software testing method and device, computer device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911251768.5A CN111078550A (en) 2019-12-09 2019-12-09 Software testing method and device, computer device and storage medium

Publications (1)

Publication Number Publication Date
CN111078550A true CN111078550A (en) 2020-04-28

Family

ID=70313414

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911251768.5A Pending CN111078550A (en) 2019-12-09 2019-12-09 Software testing method and device, computer device and storage medium

Country Status (1)

Country Link
CN (1) CN111078550A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022257871A1 (en) * 2021-06-11 2022-12-15 华为技术有限公司 Error detection method and device related thereto

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1851666A (en) * 2005-11-01 2006-10-25 华为技术有限公司 Method and system for realizing software automatic test
CN101334753A (en) * 2007-06-26 2008-12-31 中兴通讯股份有限公司 Unit test method and its device
US20110219359A1 (en) * 2010-03-04 2011-09-08 Oracle International Corporation Identifying test cases to be run after changes to modules of a software application
CN103106137A (en) * 2011-11-15 2013-05-15 上海宝康电子控制工程有限公司 Method for achieving automatic unit testing in computer modularization software system
CN108255699A (en) * 2017-03-27 2018-07-06 平安科技(深圳)有限公司 regression testing method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1851666A (en) * 2005-11-01 2006-10-25 华为技术有限公司 Method and system for realizing software automatic test
CN101334753A (en) * 2007-06-26 2008-12-31 中兴通讯股份有限公司 Unit test method and its device
US20110219359A1 (en) * 2010-03-04 2011-09-08 Oracle International Corporation Identifying test cases to be run after changes to modules of a software application
CN103106137A (en) * 2011-11-15 2013-05-15 上海宝康电子控制工程有限公司 Method for achieving automatic unit testing in computer modularization software system
CN108255699A (en) * 2017-03-27 2018-07-06 平安科技(深圳)有限公司 regression testing method and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022257871A1 (en) * 2021-06-11 2022-12-15 华为技术有限公司 Error detection method and device related thereto

Similar Documents

Publication Publication Date Title
KR102317535B1 (en) Methods and systems for implementing data tracking with software development kits
US20080301502A1 (en) System crash analysis using path tracing technologies
CN108920370B (en) Compatibility problem detection method, device and equipment
CN110908865A (en) Memory leakage monitoring method and device and electronic equipment
CN110474900B (en) Game protocol testing method and device
CN110084486B (en) Resource management method and device
US20150186195A1 (en) Method of analysis application object which computer-executable, server performing the same and storage media storing the same
CN109271789A (en) Malicious process detection method, device, electronic equipment and storage medium
CN112671609A (en) Asset census and safety detection method and device and terminal equipment
CN109522086B (en) Operation method and device for window, computer device and readable storage medium
CN110704303A (en) Method and device for acquiring test coverage information
CN110633220A (en) Debugging information display method and device, storage medium and electronic equipment
CN111078550A (en) Software testing method and device, computer device and storage medium
CN110874365A (en) Information query method and related equipment thereof
CN111352668A (en) Device testing method and device based on plug-in and testing system based on plug-in
CN109582347B (en) Method and device for acquiring front-end codes
CN110889116A (en) Advertisement blocking method and device and electronic equipment
CN112463574A (en) Software testing method, device, system, equipment and storage medium
CN109299960B (en) Method and device for monitoring advertisement, computer readable storage medium and terminal equipment
CN112631949B (en) Debugging method and device, computer equipment and storage medium
CN114527993A (en) Application deployment method, device, equipment and medium
CN110597536B (en) Software upgrading method, system and terminal equipment
CN110018828B (en) Source code checking method and device and terminal equipment
CN114691496A (en) Unit testing method, unit testing device, computing equipment and medium
CN110674491B (en) Method and device for real-time evidence obtaining of android application and electronic equipment

Legal Events

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