CN109522202B - Software testing method and device - Google Patents

Software testing method and device Download PDF

Info

Publication number
CN109522202B
CN109522202B CN201710842280.4A CN201710842280A CN109522202B CN 109522202 B CN109522202 B CN 109522202B CN 201710842280 A CN201710842280 A CN 201710842280A CN 109522202 B CN109522202 B CN 109522202B
Authority
CN
China
Prior art keywords
information
test
test case
packet
calling
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710842280.4A
Other languages
Chinese (zh)
Other versions
CN109522202A (en
Inventor
林伟腾
戴蔚
王超
陈中兵
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information 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 Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201710842280.4A priority Critical patent/CN109522202B/en
Publication of CN109522202A publication Critical patent/CN109522202A/en
Application granted granted Critical
Publication of CN109522202B publication Critical patent/CN109522202B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • 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

Abstract

The invention discloses a software testing method and device, and relates to the technical field of computers. One embodiment of the method comprises: calling an associated system corresponding to the packet information according to the packet information issued by the software packet manager RPM, wherein the packet information comprises a target server IP address; executing a test case corresponding to the packet information to the target server in the association system based on the IP address of the target server; the results of the test were obtained. The method can solve the problems of small coverage, easy occurrence of errors or omissions, long time consumption and low efficiency in the verification process in the prior art, and improves the efficiency and accuracy of test verification.

Description

Software testing method and device
Technical Field
The invention relates to the technical field of computers, in particular to a method and a device for testing software.
Background
After the software service is released, relevant developers/testers need to test and verify the released software system to ensure that the software service of a new version can work normally and achieve an expected effect, so as to evaluate whether the software release is successful.
At present, the existing scan/test verification scheme released by background software service mainly includes the following modes:
1. manually verifying the software service by a tester/developer on a page of a mobile phone/tablet/computer;
2. the tester/developer selects the automatic test case corresponding to the software service released at this time on the corresponding automatic test platform for verification;
3. the tester/developer manually submits a Common Gateway Interface (CGI) scan task to perform security scan in the security scan system or manually scans the security scan task using a security scan tool in a local computer.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art:
in the process of scanning/test verification, verification needs to be performed manually or submitted to a corresponding test platform for verification, so that the problems of small coverage of verification, easy occurrence of errors or omissions, long time consumption and low efficiency are caused.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for testing software, which can solve the problems in the prior art that the coverage is small, errors or omissions are easy to occur, the time consumption is long, and the efficiency is low in the verification process.
To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided a method of software testing.
The software testing method in the embodiment of the invention comprises the following steps: calling an associated system corresponding to the packet information according to the packet information issued by the software packet manager RPM, wherein the packet information comprises a target server IP address; executing a test case corresponding to the packet information to the target server in the association system based on the IP address of the target server; the results of the test were obtained.
Optionally, the association system of the embodiment of the present invention includes a security scanning system, a common gateway interface CGI test system, and a background interface test system.
Optionally, the packet information of the embodiment of the present invention further includes a packet path; before the step of calling the associated system corresponding to the package information, the method further comprises the following steps: analyzing the content of the packaging path according to the received package information to determine the type of the package information; the step of calling the association system corresponding to the package information includes: and calling the associated system corresponding to the type according to the type corresponding to the packet information.
Optionally, the step of executing the test case corresponding to the package information on the target server in the association system in the embodiment of the present invention includes: acquiring interface names and VHOST information of CGI of package information; calling a security scanning system in the correlation system, acquiring a record to be scanned from the scanning record, setting HOST information for the record to be scanned, and scanning the record to be scanned with the HOST information; and calling a CGI test system in the association system, matching a test case corresponding to the CGI test system, setting VHOST information for the test case, and testing the test case with the VHOST information.
Optionally, the step of executing the test case corresponding to the package information on the target server in the association system in the embodiment of the present invention includes: and calling a background interface test system in the correlation system, matching a test case according to the packet information, setting HOST information for the test case, and testing the test case with the HOST information.
Optionally, the package information of the embodiment of the present invention further includes a package name, publisher ID information, and publication time; matching a test case corresponding to the package information according to the package name; after the step of obtaining the test result, the method further comprises the following steps: and sending the result with the time stamp to the publisher according to the publisher ID information and the publication time.
To achieve the above object, according to another aspect of the embodiments of the present invention, there is provided an apparatus for testing software.
The software testing device of the embodiment of the invention comprises: the calling module is used for calling the associated system corresponding to the packet information according to the packet information issued by the software packet manager RPM, and the packet information comprises a target server IP address; the processing module is used for executing a test case corresponding to the packet information to the target server in the correlation system based on the IP address of the target server; and the confirmation module is used for obtaining the test result.
Optionally, the association system in the embodiment of the present invention includes a security scanning system, a common gateway interface CGI test system, and a background interface test system.
Optionally, the packet information of the embodiment of the present invention further includes a packet path; the apparatus further comprises a determination module to: analyzing the content of the packaging path according to the received package information to determine the type of the package information; the processing module is specifically configured to: and calling the associated system corresponding to the type according to the type corresponding to the packet information.
Optionally, the processing module in the embodiment of the present invention is configured to obtain an interface name of a CGI of the packet information and VHOST information; calling a security scanning system in the correlation system, acquiring a record to be scanned from the scanning record, setting HOST information for the record to be scanned, and scanning the record to be scanned with the HOST information; and calling a CGI test system in the association system, matching a test case corresponding to the CGI test system, setting VHOST information for the test case, and testing the test case with the VHOST information.
Optionally, the processing module in the embodiment of the present invention is configured to: and calling a background interface test system in the correlation system, matching a test case according to the packet information, setting HOST information for the test case, and testing the test case with the HOST information.
Optionally, the package information of the embodiment of the present invention further includes a package name, publisher ID information, and publication time; matching a test case corresponding to the package information according to the package name; after the step of obtaining the test result, the method further comprises the following steps: and sending the result with the time stamp to the publisher according to the publisher ID information and the publication time.
To achieve the above object, according to still another aspect of embodiments of the present invention, there is provided an electronic device for software testing.
An electronic device of an embodiment of the present invention includes: one or more processors; a storage device for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the method for software testing of an embodiment of the present invention.
To achieve the above object, according to still another aspect of an embodiment of the present invention, there is provided a computer-readable medium.
A computer-readable medium of an embodiment of the present invention has stored thereon a computer program that, when executed by a processor, implements the method of software testing of an embodiment of the present invention.
One embodiment of the above invention has the following advantages or benefits: because the technical means of directly calling the corresponding correlation system according to the issued package information and executing the test case at the target server is adopted, the technical problems of small coverage, easy occurrence of errors or omissions, long time consumption and low efficiency in the verification process in the prior art are solved, and the technical effects of increasing the coverage and improving the processing efficiency are further achieved. By automatically matching and executing the test case corresponding to the package information, the verification efficiency, the verification accuracy and the coverage of the test case are greatly improved, and meanwhile, the workload of executing the test by a user is greatly reduced, so that the probability of finding a problem is improved.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic diagram of a main flow of a method of software testing according to an embodiment of the invention;
FIG. 2 is a flow diagram of a one-stop automated verification according to an embodiment of the invention;
FIG. 3 is a flow chart of a one-stop authentication method according to an embodiment of the invention;
FIG. 4 is a schematic diagram of the major modules of an apparatus for software testing according to an embodiment of the present invention;
FIG. 5 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
fig. 6 is a schematic block diagram of a computer system suitable for use in implementing a terminal device or server of an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 1 is a schematic diagram of a main flow of a software testing method according to an embodiment of the present invention, and as shown in fig. 1, the software testing method according to the embodiment of the present invention mainly includes the following steps:
step S101: and calling an associated system corresponding to the packet information according to the packet information issued by the software packet manager RPM. The invention analyzes the content of the RPM packet information issued by the software packet manager RPM issuing system, and then calls the related correlation system and carries out test processing. Wherein, the packet information comprises a target server IP address; the association system comprises a security scanning system, a common gateway interface CGI test system and a background interface test system.
Specifically, in some embodiments of the present invention, the packet information of the present invention further includes a packing path; before the step of calling the associated system corresponding to the package information, the method further comprises the following steps: analyzing the content of the packaging path according to the received package information to determine the type of the package information; the step of calling the association system corresponding to the package information includes: and calling the associated system corresponding to the type according to the type corresponding to the packet information. By determining the type corresponding to the packet information and then quickly determining the corresponding associated system according to the type, the efficiency of test verification is improved.
It should be noted that, in some usage scenarios, the corresponding association system may not be determined according to the type corresponding to the packet information, but determined by a method of removing the packet information one by one, that is, it is first determined whether the packet information is a specific service (for example, a TWS service corresponding to a test case of the security scanning system and a test case of the common gateway interface CGI test system), and if so, the specific service and the test case are executed; if not, continuing to judge whether the packet information is the next specified service (such as the Appser service which corresponds to a test case of the background interface test system), if so, executing the specified service and the test case; if not, continuing to judge whether the packet information is the next specified service (such as the Appltform service, and the Appltform service corresponds to a test case of the background interface test system), if so, executing the specified service and the test case; if not, determining as other associated systems.
The above-mentioned method of excluding one by one does not refer to the order of judgment. It should be further noted that the TWS is a web server running on unix/linux platform; the Appserver is a service framework of a C + + APP layer and is suitable for service use with a relatively simple architecture; the Applatfrom is a service framework of a C + + APP layer, and is suitable for service use with a relatively complex architecture.
Step S102: and executing a test case corresponding to the packet information to the target server in the association system based on the IP address of the target server. According to the embodiment of the invention, the test case in the correlation system (the security scanning system, the Common Gateway Interface (CGI) test system and the background interface test system) is executed on the target server (equipment), so that the test verification efficiency is improved, and the coverage of the test case is ensured to the greatest extent. The safety scanning task or the common gateway interface CGI test task or the background interface test task corresponding to the package information is created and executed on the target server, so that one-stop verification after release is achieved, and the workload of a user for executing the test verification is reduced.
In some embodiments of the present invention, the step of executing the test case corresponding to the package information on the target server in the association system includes: acquiring interface names and VHOST information of CGI of package information; calling a security scanning system in the correlation system, acquiring a record to be scanned from the scanning record, setting HOST information for the record to be scanned, and scanning the record to be scanned with the HOST information; and calling a CGI test system in the association system, matching a test case corresponding to the CGI test system, setting VHOST information for the test case, and testing the test case with the VHOST information. And through the content in the packet information, the test case is quickly determined and tested to determine the scanning result and the test result.
In some embodiments of the present invention, the step of executing the test case corresponding to the package information on the target server in the association system includes: and calling a background interface test system in the correlation system, matching a test case according to the packet information, setting HOST information for the test case, and testing the test case with the HOST information. And through the content in the package information, the test case is quickly determined and tested to determine the test result.
Step S103: the results of the test were obtained. And executing a corresponding test case through the step S102, and then sending the security scanning result and the common gateway interface CGI test result to a user, or sending the background interface test result to the user. In other usage scenarios, the package information of the present invention further includes package name, publisher ID information, and publication time; matching a test case corresponding to the package information according to the package name; after the step of obtaining the test result, the method further comprises the following steps: and sending the result with the time stamp to the publisher according to the publisher ID information and the publication time.
Fig. 2 is a flow chart illustrating a one-stop automatic verification according to an embodiment of the present invention, and as can be seen from fig. 2, a developer selects a certain RPM packet (the RPM packet is the above packet information) in the software packet manager RPM publishing system and performs an operation of publishing to a target server. In the case of successful release, the software package manager RPM release system will invoke the release verification interface, passing the RPM package to the release verification service. After receiving the request, the issuing verification service extracts information in the RPM packet, analyzes the information in a packaging path corresponding to the RPM packet according to rules, further judges the type of the RPM packet, calls a related system interface, and then creates a corresponding automation task. After the correlation system generates an automation task, an automation test case corresponding to the RPM packet (service) is automatically matched and executed, and then a test report mail is sent to a related operator, so that one-stop type automation verification is realized.
Before the implementation of the embodiments of the present invention is elaborated, the following explanations are also required to make the terms used in the present invention:
RPM: RPM is an abbreviation for RPM Package Manager, a tool used for packaging and installation of internet download packages;
NGINX ("engine x") is a high performance HTTP and reverse proxy server, and is also an IMAP/POP3/SMTP server;
CGI: common Gateway Interface, CGI for short. The method comprises the following steps that a program is physically, runs on a server and provides an interface with an HTML page of a client;
HOST: the HOST name and the port number of the current URL can be set or returned through HOST;
VHOST: through VHOST, requests can be made to the corresponding WEBAPP service.
In other usage scenarios, the following parameter configurations may also be implemented:
[ correlation system 1: safety scanning system for WeChat hand Q
The WeChat hand Q security scanning system comprises 2 types of CGI scanning records:
a) CGI scan records manually submitted by developers/testers;
b) and the CGI scanning record which is captured and processed by the system from the NGINX server of the production environment every week.
[ correlation system 2: CGI (common gateway interface) automatic test system of WeChat QoC
On a CGI automatic test platform of the WeChat QoW, developers/testers input corresponding CGI resources aiming at TWS service and make automatic cases on the basis.
[ correlation system 3: WeChat hand Q background interface automatic test system
On a background interface automation platform of the WeChat hand Q, developers/testers manufacture corresponding automation test cases aiming at a background service interface (paying attention to distinguishing an Appserver frame and an Applatform frame).
The association system 4: software package manager RPM publishing System
In the software package manager RPM publishing system of the WeChat Q, a developer can select a certain RPM package to publish.
The implementation of the embodiment of the present invention is described in detail with reference to fig. 3, where fig. 3 is a schematic flow chart of a one-stop verification method according to the embodiment of the present invention, and as can be seen from fig. 3, the technical solution for implementing the embodiment of the present invention includes the following steps:
1. the developer executes the issuing operation in the software package manager RPM issuing system, and if the issuing is successful, calls a one-stop issuing verification service through an HTTP request, and passes the RPM package after the issuing is successful (information in the RPM package includes a package name, a package path, a target machine IP, an issuer ID, and an issuing time, which is hereinafter referred to as package information).
2. After receiving the request, the one-stop issuing verification service judges the type of the packet information (different types can correspond to different services, including TWS service, Appserver service, Applatform service and other services) by analyzing the file content of the packet path. Next, the corresponding service is determined according to the type of the packet information, and as can be seen from fig. 3, the TWS service is implemented by a security scanning system and a common gateway interface CGI test system, the Appserver service and the Appplatform service are implemented by a background interface test system, and other services not shown in the figure are implemented according to the prior art.
3A) If the service is the TWS service, the interface name and VHOST information of the corresponding common gateway interface CGI are analyzed, then a security scanning system is called by an HTTP request to create a corresponding CGI security scanning task, then the last 3 (specific numerical values can be determined according to actual usage scenarios) scanning records are queried from the CGI manual scanning records, at the same time, 2 scanning records with the largest CGI parameters in the last batch of automatic scanning are queried from the CGI automatic scanning records, 5 (specific numerical values can be determined according to actual usage scenarios) to-be-scanned records are generated, then duplication of the to-be-scanned records is removed and a corresponding HOST is set, finally, security scanning is performed on the processed to-be-scanned records (namely, CGI security scanning is automatically performed in the figure), and after the scanning is finished, a CGI security scanning report mail is sent to a relevant user.
Meanwhile, a station issuing verification service calls a common gateway interface CGI test system to automatically create a test task service through an HTTP request. After the Common Gateway Interface (CGI) test system receives the request, an online automatic test case corresponding to the CGI is automatically matched, a corresponding VHOST is set (all HOSTs needing to be executed are traversed at the moment), then an automatic test (namely the CGI automatic test is automatically executed in the figure) is executed on the processed online automatic test case, and after the execution is finished, a CGI automatic test report mail is sent to a relevant user.
3B) And if the application server service is adopted, directly calling a background interface test system through an HTTP request to automatically create a test task receiving service. After receiving the request, the background interface test system automatically matches the online automatic test case corresponding to the packet information, sets the corresponding HOST (at this time, it is necessary to traverse all HOST to be executed), then executes the automatic test (i.e. the automatic execution background interface automatic test in the figure) on the processed online automatic test case, and after the execution is finished, sends a background interface automatic test report mail to the relevant user.
It should be noted that in other usage scenarios, the online automated test case corresponding to the package information may also be directly determined according to the manual service list included in the package information.
3C) And if the application platform service is the AppPlayform service, directly calling a background interface test system through an HTTP request to automatically create a test task service. After receiving the request, the background interface test system automatically matches the online automatic test case corresponding to the packet information, sets the corresponding HOST (at this time, it is necessary to traverse all HOST to be executed), then executes the automatic test (i.e. the automatic execution background interface automatic test in the figure) on the processed online automatic test case, and after the execution is finished, sends a background interface automatic test report mail to the relevant user.
It should be noted that in other usage scenarios, the online automatic test case corresponding to the packet information may also be directly determined according to a manual command word list included in the packet information.
Accordingly, some advantages or benefits of the present invention include: because the technical means of directly calling the corresponding correlation system according to the issued packet information and executing the test case at the target server is adopted, the technical problems of small coverage, long time consumption and low efficiency in the verification process in the prior art are solved, and the technical effects of increasing the coverage and improving the processing efficiency are further achieved. By automatically matching and executing the test case corresponding to the package information, the verification efficiency and the coverage of the test case are greatly improved, and meanwhile, the workload of executing the test by a user is greatly reduced, so that the probability of finding a problem is improved.
Fig. 4 is a schematic diagram of main modules of a software testing device according to an embodiment of the invention. As shown in fig. 4, the main modules of the apparatus 400 for testing software according to the embodiment of the present invention include: a calling module 401, a processing module 402 and a confirmation module 403. Wherein:
a calling module 401, configured to call, according to packet information issued by the software packet manager RPM, an association system corresponding to the packet information, where the packet information includes an IP address of a target server; a processing module 402, configured to execute a test case corresponding to the packet information on the target server in the association system based on the IP address of the target server; and a confirmation module 403 for obtaining the test result.
Optionally, the association system in the embodiment of the present invention includes a security scanning system, a common gateway interface CGI test system, and a background interface test system.
Optionally, the packet information of the embodiment of the present invention further includes a packet path; the apparatus 400 further comprises a determining module (not shown in the figures) for: analyzing the content of the packaging path according to the received package information to determine the type of the package information; the processing module is specifically configured to: and calling the associated system corresponding to the type according to the type corresponding to the packet information.
Optionally, the processing module 402 according to the embodiment of the present invention is configured to obtain an interface name of a CGI of packet information and VHOST information; calling a security scanning system in the correlation system, acquiring a record to be scanned from the scanning record, setting HOST information for the record to be scanned, and scanning the record to be scanned with the HOST information; and calling a CGI test system in the association system, matching a test case corresponding to the CGI test system, setting VHOST information for the test case, and testing the test case with the VHOST information.
Optionally, the processing module 402 according to the embodiment of the present invention is configured to: and calling a background interface test system in the correlation system, matching a test case according to the packet information, setting HOST information for the test case, and testing the test case with the HOST information.
Optionally, the package information of the embodiment of the present invention further includes a package name, publisher ID information, and publication time; matching a test case corresponding to the package information according to the package name; after the step of obtaining the test result, the method further comprises the following steps: and sending the result with the time stamp to the publisher according to the publisher ID information and the publication time.
The advantages of the invention include: because the technical means of directly calling the corresponding correlation system according to the issued package information and executing the test case at the target server is adopted, the technical problems of small coverage, easy occurrence of errors or omissions, long time consumption and low efficiency in the verification process in the prior art are solved, and the technical effects of increasing the coverage and improving the processing efficiency are further achieved. By automatically matching and executing the test case corresponding to the package information, the verification efficiency, the verification accuracy and the coverage of the test case are greatly improved, and meanwhile, the workload of executing the test by a user is greatly reduced, so that the probability of finding a problem is improved.
Fig. 5 illustrates an exemplary system architecture 500 to which the software testing method or the software testing apparatus of the embodiments of the present invention may be applied.
As shown in fig. 5, the system architecture 500 may include terminal devices 501, 502, 503, a network 504, and a server 505. The network 504 serves to provide a medium for communication links between the terminal devices 501, 502, 503 and the server 505. Network 504 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 501, 502, 503 to interact with a server 505 over a network 504 to receive or send messages or the like. The terminal devices 501, 502, 503 may have installed thereon various communication client applications, such as shopping-like applications, web browser applications, search-like applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only).
The terminal devices 501, 502, 503 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 505 may be a server providing various services, such as a background management server (for example only) providing support for shopping websites browsed by users using the terminal devices 501, 502, 503. The backend management server may analyze and perform other processing on the received data such as the product information query request, and feed back a processing result (for example, target push information, product information — just an example) to the terminal device.
It should be noted that the software testing method provided by the embodiment of the present invention is generally executed by the server 505, and accordingly, the software testing apparatus is generally disposed in the server 505.
It should be understood that the number of terminal devices, networks, and servers in fig. 5 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 6, a block diagram of a computer system 600 suitable for use with a terminal device implementing an embodiment of the invention is shown. The terminal device shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 6, the computer system 600 includes a Central Processing Unit (CPU)601 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage section 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the system 600 are also stored. The CPU 601, ROM 602, and RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
The following components are connected to the I/O interface 605: an input portion 606 including a keyboard, a mouse, and the like; an output portion 607 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The driver 610 is also connected to the I/O interface 605 as needed. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 610 as necessary, so that a computer program read out therefrom is mounted in the storage section 608 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 609, and/or installed from the removable medium 611. The computer program performs the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 601.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having 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 portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor includes a calling module, a processing module, and a confirmation module. Wherein the names of the modules do not in some cases constitute a limitation of the module itself.
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise: calling an associated system corresponding to the packet information according to the packet information issued by the software packet manager RPM, wherein the packet information comprises a target server IP address; executing a test case corresponding to the packet information to the target server in the association system based on the IP address of the target server; the results of the test were obtained.
According to the technical scheme of the embodiment of the invention, because the technical means of directly calling the corresponding correlation system according to the issued package information and executing the test case at the target server is adopted, the technical problems of small coverage, easy occurrence of errors or omissions, long time consumption and low efficiency in the verification process in the prior art are solved, and the technical effects of increasing the coverage and improving the processing efficiency are further achieved. By automatically matching and executing the test case corresponding to the package information, the verification efficiency, the verification accuracy and the coverage of the test case are greatly improved, and meanwhile, the workload of executing the test by a user is greatly reduced, so that the probability of finding a problem is improved.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on 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 (12)

1. A method of software testing, comprising:
calling an association system corresponding to the packet information according to the packet information issued by the software packet manager (RPM), wherein the packet information comprises a target server IP address, and the association system comprises a security scanning system, a Common Gateway Interface (CGI) test system and a background interface test system;
executing a test case corresponding to the packet information to the target server in the association system based on the IP address of the target server;
the results of the test were obtained.
2. The method of claim 1,
the packet information further includes a packet path;
before the step of calling the associated system corresponding to the packet information, the method further comprises the following steps: analyzing the content of the packaging path according to the received package information to determine the type of the package information;
the step of calling the associated system corresponding to the package information includes: and calling an associated system corresponding to the type according to the type corresponding to the packet information.
3. The method of claim 1, wherein the step of executing the test case corresponding to the package information to the target server in the associated system comprises:
acquiring an interface name and VHOST information of the CGI of the packet information;
calling a security scanning system in the correlation system, acquiring a record to be scanned from a scanning record, setting HOST information for the record to be scanned, and scanning the record to be scanned with the HOST information;
and calling a CGI test system in the association system, matching a test case corresponding to the CGI test system, setting VHOST information for the test case, and testing the test case with the VHOST information.
4. The method of claim 1, wherein the step of executing the test case corresponding to the package information to the target server in the associated system comprises:
and calling a background interface test system in the correlation system, matching a test case according to packet information, setting HOST information for the test case, and testing the test case with the HOST information.
5. The method of claim 1,
the package information also comprises a package name, publisher ID information and publishing time;
matching a test case corresponding to the package information according to the package name;
after the step of obtaining the test result, the method further comprises the following steps: and sending the result with the time stamp to the publisher according to the publisher ID information and the publishing time.
6. An apparatus for testing software, comprising:
the system comprises a calling module, a background interface testing system and a security scanning module, wherein the calling module is used for calling an associated system corresponding to packet information according to the packet information issued by a software packet manager (RPM), the packet information comprises a target server IP address, and the associated system comprises a security scanning system, a Common Gateway Interface (CGI) testing system and the background interface testing system;
a processing module, configured to execute a test case corresponding to the packet information on a target server in the association system based on the IP address of the target server;
and the confirmation module is used for obtaining the test result.
7. The apparatus of claim 6,
the packet information further includes a packet path;
the apparatus further comprises a determination module to: analyzing the content of the packaging path according to the received package information to determine the type of the package information;
the processing module is specifically configured to: and calling an associated system corresponding to the type according to the type corresponding to the packet information.
8. The apparatus of claim 6, wherein the processing module is configured to:
acquiring an interface name and VHOST information of the CGI of the packet information;
calling a security scanning system in the correlation system, acquiring a record to be scanned from a scanning record, setting HOST information for the record to be scanned, and scanning the record to be scanned with the HOST information;
and calling a CGI test system in the association system, matching a test case corresponding to the CGI test system, setting VHOST information for the test case, and testing the test case with the VHOST information.
9. The apparatus of claim 6, wherein the processing module is configured to:
and calling a background interface test system in the correlation system, matching a test case according to packet information, setting HOST information for the test case, and testing the test case with the HOST information.
10. The apparatus of claim 6,
the package information also comprises a package name, publisher ID information and publishing time;
matching a test case corresponding to the package information according to the package name;
after the step of obtaining the test result, the method further comprises the following steps: and sending the result with the time stamp to the publisher according to the publisher ID information and the publishing time.
11. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-5.
12. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-5.
CN201710842280.4A 2017-09-18 2017-09-18 Software testing method and device Active CN109522202B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710842280.4A CN109522202B (en) 2017-09-18 2017-09-18 Software testing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710842280.4A CN109522202B (en) 2017-09-18 2017-09-18 Software testing method and device

Publications (2)

Publication Number Publication Date
CN109522202A CN109522202A (en) 2019-03-26
CN109522202B true CN109522202B (en) 2022-03-04

Family

ID=65767510

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710842280.4A Active CN109522202B (en) 2017-09-18 2017-09-18 Software testing method and device

Country Status (1)

Country Link
CN (1) CN109522202B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109992521A (en) * 2019-04-19 2019-07-09 北京金山云网络技术有限公司 A kind of test result notification method, device, electronic equipment and storage medium
CN110798445B (en) * 2019-09-12 2022-06-10 中国平安财产保险股份有限公司 Public gateway interface testing method and device, computer equipment and storage medium
CN112019544B (en) * 2020-08-28 2022-10-11 支付宝(杭州)信息技术有限公司 Network interface security scanning method, device and system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103970614A (en) * 2013-01-24 2014-08-06 腾讯科技(深圳)有限公司 Service testing method and device
CN104021070A (en) * 2013-03-01 2014-09-03 腾讯科技(深圳)有限公司 Method, device and system for testing intelligent terminal software packages
US9274935B1 (en) * 2013-01-15 2016-03-01 Google Inc. Application testing system with application programming interface
CN105446718A (en) * 2014-08-19 2016-03-30 龙芯中科技术有限公司 Software management method and system based on Red Hat Package Manager
CN106775730A (en) * 2016-12-21 2017-05-31 深圳Tcl数字技术有限公司 Program dissemination method and system

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100451989C (en) * 2007-04-20 2009-01-14 北京航空航天大学 Software testing system and testing method
CN103685138B (en) * 2012-08-30 2016-12-21 卓望数码技术(深圳)有限公司 The authentication method of the Android platform application software that mobile interchange is online and system
US9256519B2 (en) * 2013-02-26 2016-02-09 International Business Machines Corporation Using linked data to determine package quality

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9274935B1 (en) * 2013-01-15 2016-03-01 Google Inc. Application testing system with application programming interface
CN103970614A (en) * 2013-01-24 2014-08-06 腾讯科技(深圳)有限公司 Service testing method and device
CN104021070A (en) * 2013-03-01 2014-09-03 腾讯科技(深圳)有限公司 Method, device and system for testing intelligent terminal software packages
CN105446718A (en) * 2014-08-19 2016-03-30 龙芯中科技术有限公司 Software management method and system based on Red Hat Package Manager
CN106775730A (en) * 2016-12-21 2017-05-31 深圳Tcl数字技术有限公司 Program dissemination method and system

Also Published As

Publication number Publication date
CN109522202A (en) 2019-03-26

Similar Documents

Publication Publication Date Title
CN110149298B (en) Hijacking detection method and device
EP2901660B1 (en) Termininal interaction methods and related devices and systems
CN111104675A (en) Method and device for detecting system security vulnerability
US20140019957A1 (en) Method, apparatus, and system for sharing software among terminals
CN109522202B (en) Software testing method and device
WO2014008864A1 (en) Method, apparatus, and system for sharing software among terminals
CN111914262A (en) Test method, device, system, electronic equipment and storage medium
CN112733001A (en) Method and device for acquiring subscription information and electronic equipment
CN109218041B (en) Request processing method and device for server system
CN111221727A (en) Test method, test device, electronic equipment and computer readable medium
CN108650123B (en) Fault information recording method, device, equipment and storage medium
CN112084102A (en) Interface pressure testing method and device
CN109656791B (en) gPC performance test method and device based on Jmeter
CN113127335A (en) System testing method and device
CN107634942B (en) Method and device for identifying malicious request
CN114979295A (en) Gateway management method and device
CN112532734A (en) Message sensitive information detection method and device
CN113132447A (en) Reverse proxy method and system
CN113132400A (en) Business processing method, device, computer system and storage medium
CN112131095A (en) Pressure testing method and device
CN112579428A (en) Interface testing method and device, electronic equipment and storage medium
CN108288135B (en) System compatibility method and device, computer readable storage medium and electronic equipment
CN112860770A (en) Report generation method and device, electronic equipment and storage medium
CN112783903A (en) Method and device for generating update log
CN111950232A (en) Method and device for automatically switching number segments

Legal Events

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