CN110795331A - Software testing method and device - Google Patents

Software testing method and device Download PDF

Info

Publication number
CN110795331A
CN110795331A CN201810876897.2A CN201810876897A CN110795331A CN 110795331 A CN110795331 A CN 110795331A CN 201810876897 A CN201810876897 A CN 201810876897A CN 110795331 A CN110795331 A CN 110795331A
Authority
CN
China
Prior art keywords
tested
test
service node
data set
technical
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
CN201810876897.2A
Other languages
Chinese (zh)
Inventor
周雪梅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 CN201810876897.2A priority Critical patent/CN110795331A/en
Publication of CN110795331A publication Critical patent/CN110795331A/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/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)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a software testing method and device, and relates to the technical field of computers. One embodiment of the method comprises: extracting a technical framework of a service node to be tested, and packaging the technical framework into a test interface; acquiring technical association among service nodes to be tested; and calling a test interface based on the technical association to perform software test. This embodiment reduces the code capability requirements for the tester; the software testing efficiency is improved; the method can flexibly adapt to the change of the service node to be tested.

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
With the rapid development of the internet, services, products and the like are changing day by day, each service and product can urge to produce a series of new software, and before the new software provides services for users, a series of tests, such as a functional test, an interface test or a cross-system test and other software tests, need to be performed on the new software, wherein the functional test is to verify each function of the product, and test and check whether the product meets corresponding functional requirements item by item according to a functional test case.
In the prior art, an automatic test framework is used and a software test is performed in a modularized form, each part or each test of the software is used as a module, and a tester writes a sequence code required by the automatic test according to business logic requirements, wherein the sequence code is used for determining the execution sequence of each module.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art:
1. sequential codes need to be written, and the requirement on the code capability of testers is high;
2. the service is iterated rapidly, so that the automatic test framework cannot keep up with the change of the service flow, the automatic test cost is increased, and the automatic test efficiency is low;
3. when a new technology is added, the automatic testing frame cannot cover the new technology and tests the new technology, so that the testing range is influenced;
4. most of the automation modules are developed based on one set of applications, and automatic testing cannot be performed across service lines or systems.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for testing software, which can reduce the requirement on the code capability of a tester; the software testing efficiency is improved; the method can flexibly adapt to the change of the service node to be tested.
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 of the embodiment of the invention comprises the following steps: extracting a technical framework of a service node to be tested, and packaging the technical framework into a test interface; acquiring technical association among the service nodes to be tested; and calling the test interface based on the technical association to perform software test.
Optionally, the technical framework comprises a test data set and a communication platform, the test data set comprising an operation data set and a verification data set; wherein the validation dataset includes expected result information when the run dataset is executed.
Optionally, invoking the test interface based on the technical association to perform software testing includes: based on the technical association, calling the test interface in order to obtain the running data set and the verification data set; executing the running data set and monitoring the state of the service node to be tested; the state of the service node to be tested comprises a state of executing the running data set and corresponding execution result information; comparing the execution result information with the expected result information to obtain a comparison result, and if the comparison result is consistent, passing the test; if the comparison result is inconsistent, the test fails.
Optionally, the obtaining the technical association between the service nodes to be tested includes: creating a business flow graph; and acquiring the technical association between the service nodes to be tested based on the service flow graph.
Optionally, the technical association is a test logic of the service node to be tested; based on the technical association, sequentially invoking the test interface to obtain the run dataset and the validation dataset comprises: monitoring the comparison result of the service node to be tested in the previous layer; and when the comparison result of the service node to be tested in the previous layer is consistent, calling the test interface to acquire the running data set and the verification data set.
To achieve the above object, according to still another aspect of an embodiment of the present invention, there is provided an apparatus for testing software.
The software testing device of the embodiment of the invention comprises: the system comprises a packaging module, a test module and a processing module, wherein the packaging module is used for extracting a technical framework of a service node to be tested and packaging the technical framework into a test interface; the acquisition module is used for acquiring the technical association between the service nodes to be tested; and the calling module is used for calling the test interface based on the technical association so as to test the software.
Optionally, the technical framework comprises a test data set and a communication platform, the test data set comprising an operation data set and a verification data set; wherein the validation dataset includes expected result information when the run dataset is executed.
Optionally, the invoking module is further configured to: based on the technical association, calling the test interface in order to obtain the running data set and the verification data set; executing the running data set and monitoring the state of the service node to be tested; the state of the service node to be tested comprises a state of executing the running data set and corresponding execution result information; comparing the execution result information with the expected result information to obtain a comparison result, and if the comparison result is consistent, passing the test; if the comparison result is inconsistent, the test fails.
Optionally, the obtaining module is further configured to: creating a business flow graph; and acquiring the technical association between the service nodes to be tested based on the service flow graph.
Optionally, the technical association is a test logic of the service node to be tested; the calling module is further to: monitoring the comparison result of the service node to be tested in the previous layer; and when the comparison result of the service node to be tested in the previous layer is consistent, calling the test interface to acquire the running data set and the verification data set.
To achieve the above object, according to still another aspect of an embodiment of the present invention, there is provided an electronic device for software testing.
An electronic device for software testing according to 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 a method for software testing of an embodiment of the invention.
To achieve the above object, according to still another aspect of embodiments of the present invention, there is provided a computer-readable storage medium.
A computer-readable storage medium of an embodiment of the present invention has stored thereon a computer program that, when executed by a processor, implements a 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 framework for extracting the service node to be tested is adopted and packaged as the test interface; acquiring technical association among service nodes to be tested; the technical means of calling the test interface to perform software test based on technical association overcomes the high requirement on the code capability of testers; the automatic testing framework cannot keep up with the change of the business process, and the efficiency of automatic testing is low; when the technology is newly added, the automatic testing frame cannot carry out automatic testing; the technical problem that automatic testing can not be carried out across service lines or systems is solved, and the requirement on the code capability of testers is further reduced; the software testing efficiency is improved; the method can flexibly adapt to the technical effect of the change of the service node to be tested.
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 the main steps of a method of software testing according to an embodiment of the invention;
FIG. 2 is a first diagram illustrating an application of a method for testing software according to an embodiment of the present invention;
FIG. 3 is a second schematic diagram of an application of the method for testing software according to the embodiment of the present invention;
FIG. 4 is a schematic diagram of the main 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.
It should be noted that the embodiments of the present invention and the technical features of the embodiments may be combined with each other without conflict.
Fig. 1 is a schematic diagram of the main steps of a method of software testing according to an embodiment of the present invention.
As shown in fig. 1, the software testing method of the embodiment of the present invention mainly includes the following steps:
step S101: and extracting the technical framework of the service node to be tested, and packaging the technical framework into a test interface.
Software refers to computer programs, procedures, rules, files, documents, data, or the like, related to the operation of a computer system. Before providing service for users, software testing such as function testing, interface testing or cross-system testing needs to be performed on the software, so that the users can be better served. The software testing method provided by the embodiment of the invention enables the software testing process to be servitized, the technical framework (which can be the main part of the technical framework) of each service node to be tested of the software is packaged as the testing interface, when a certain service node to be tested is tested and the testing interface corresponding to the service node to be tested is called, the testing data set can be automatically obtained through the communication platform for testing, namely, a tester does not need to write complex codes and only needs to test each service node to be tested of the software from the angle of use of a user. When a new technology (a new service node to be tested) is added, the test can be performed only by extracting a corresponding technical framework and packaging the technical framework as a test interface, and the change of the service node to be tested can be flexibly adapted.
It should be noted that the test interface can provide services such as a creation method (post method), a reading method (get method), an update method (put method), and a deletion method (delete method).
In an embodiment of the invention, a technical framework includes a test data set and a communication platform, the test data set including a run data set and a validation data set. The technical framework is a reusable design of the whole or part of a technical system and is represented by a set of abstract components and a method for interaction among component instances, wherein the abstract components comprise a test data set required in a test process and a communication platform (such as a message queue) used by a service node to be tested. Wherein the validation dataset includes expected result information when executing the run dataset. The communication platform is a communication mode for calling the running data set and the verification data set, and the communication platform is packaged in the test interface, so that the communication platform can automatically acquire the running data set and the verification data set when the test interface is called, a tester does not need to actively acquire the running data set and the verification data set in the test process, namely one-key operation can be realized through the test interface, and the test efficiency is improved.
Step S102: and acquiring the technical association among the service nodes to be tested.
Since the software may include a plurality of service nodes to be tested, or the joint test among a plurality of software may include a plurality of service nodes to be tested, it is necessary to obtain technical associations among the service nodes to be tested to perform the software test. When the service process changes (the technical association among the service nodes to be tested changes), the new technical association is obtained without rewriting the sequence code, so that the method can flexibly adapt to the change of the service nodes to be tested, and the testing efficiency is high.
In the embodiment of the present invention, acquiring the technical association between the service nodes to be tested includes: creating a business flow graph; and acquiring the technical association between the service nodes to be tested based on the service flow graph. The service flow graph is formed based on service nodes, and can reflect the test sequence of the service nodes to be tested. Before software testing, a business flow graph can be created, an inlet for rapidly creating the business flow graph can be provided for testing personnel, and the business flow graph can be created according to testing requirements.
Step S103: and calling a test interface based on the technical association to perform software test.
When the software test is carried out, the test interface corresponding to the service node to be tested can be called based on the technical association among the service nodes to be tested, and the software test is completed through the test of all the service nodes to be tested. Therefore, the service logic is verified quickly, and the software testing efficiency is improved.
In the embodiment of the present invention, step S103 may be implemented by the following steps: calling a test interface in sequence based on technical association to obtain an operation data set and a verification data set; executing the running data set and monitoring the state of the service node to be tested; the state of the service node to be tested comprises the state of executing the running data set and corresponding execution result information; comparing the execution result information with the expected result information to obtain a comparison result, and if the comparison result is consistent, passing the test; if the comparison result is inconsistent, the test fails.
When software testing is carried out, a tester can call the testing interface corresponding to each service node to be tested in sequence after determining the testing sequence of each service node to be tested, and an operation data set and a verification data set can be obtained through the testing interface. Monitoring when the operation data set is executed, namely obtaining the state of the service node to be tested, including the state of executing the operation data set and corresponding execution result information, comparing with expected result information, if the state is consistent with the expected result information, the service node to be tested passes the test, and other service nodes to be tested can be continuously tested; if not, the test fails, and the service node to be tested can be retested or the test is finished. Thus, the test of a service node to be tested is completed.
In the embodiment of the invention, the technical association is the test logic of the service node to be tested. When testing software, each service node to be tested can be tested one by one according to the test logic, and the service node to be tested of the next layer can be tested after the service node to be tested of the previous layer passes the test, that is, when testing one service node to be tested, the condition that the execution result information of the service node to be tested of the previous layer is consistent with the expected result information needs to be met. Therefore, based on the technical association, the test interface is called in order to obtain the running data set and the verification data set, and this step can be performed in the following form: monitoring the comparison result of the service node to be tested in the previous layer; and when the comparison result of the service node to be tested in the previous layer is consistent, calling the test interface to acquire the running data set and the verification data set.
According to the software testing method provided by the embodiment of the invention, the technical framework for extracting the service node to be tested is adopted and packaged as the testing interface; acquiring technical association among service nodes to be tested; the technical means of calling the test interface to perform software test based on technical association overcomes the high requirement on the code capability of testers; the automatic testing framework cannot keep up with the change of the business process, and the efficiency of automatic testing is low; when the technology is newly added, the automatic testing frame cannot carry out automatic testing; the technical problem that automatic testing can not be carried out across service lines or systems is solved, and the requirement on the code capability of testers is further reduced; the software testing efficiency is improved; the method can flexibly adapt to the technical effect of the change of the service node to be tested.
The software testing method of the embodiment of the invention mainly comprises the following steps:
and extracting the technical frameworks involved in the business process, and packaging the technical frameworks into a test interface. The technical framework comprises a test data set and a communication platform, different test data sets of one technical framework can be respectively stored in different databases, such as a relational database management system (mysql), a database (mongo) based on distributed file storage or a distributed column-oriented open source database (hbase), and the communication platform is mainly used for acquiring the test data sets during testing, such as a message queue (mq), namely, mq, mysql, mongo, es or hbase and the like can be packaged into a service interface. The test interface provides a get method (for example, querying a result of a query in the resource), a post method (for example, adding a data set), a put method (for example, updating a data set), a delete method (for example, deleting a data set), and the like to the outside.
And instantiating the service node, namely configuring a test data set for each service node to be tested based on the service flow graph, namely configuring action, state and result corresponding to each service node to be tested. Wherein, action represents specific service, for example, data is acquired by get method; state represents the state of the service node, namely the state of action execution; result represents that the test logic of the service node logic passes or fails, and a logic method for verifying an expected result needs to be configured in result.
The software testing method of the embodiment of the invention services the process of software testing, tests each service node to be tested by combining the service flow graph, namely, determines the testing sequence of each service node to be tested according to the service flow graph, and calls the testing interface in sequence to obtain the corresponding testing data set so as to test each service node to be tested, thereby ensuring that testers do not need to write complex sequence codes.
The scheduling logic adopts node layering logic, that is, nodes with the same number from the service node to the intermediate node of the initial (star) node are node sets in the same layer, and if a node is located on different paths, the node belongs to different layers. For example, in fig. 2, layer 0: a service node A; layer 1: a service node B and a service node C; layer 2: the service node D may trigger monitoring of a next-layer node when the previous-layer node performs the test, that is, the next-layer node may monitor execution result information of the previous-layer node and obtain execution result information of a related service node in the previous-layer node, and trigger the next-layer node to perform the test if the test passes, where the related node in the previous-layer node of the service node D includes a service node B and a service node C.
In order to further explain the technical idea of the embodiment of the present invention, the technical solution of the embodiment of the present invention is now described with reference to specific application scenarios.
Example one
Assuming that software testing is performed on four service nodes to be tested (service node A, service node B, service node C and service node D), wherein the service node A, the service node B, the service node C and the service node D can be service nodes of the same system or service nodes of different systems, extracting technical frames of the service node A, the service node B, the service node C and the service node D in advance, and respectively packaging the technical frames into a testing interface A, a testing interface B, a testing interface C and a testing interface D; then creating a traffic flow graph (as shown in fig. 3); respectively acquiring a test data set of a node to be tested based on the service flow graph, the test interface A, the test interface B, the test interface C and the test interface D, and configuring the test data set for the service node A, the service node B, the service node C and the service node D; and finally, executing the test data sets of the service node A, the service node B, the service node C and the service node D in sequence to obtain a test result, specifically, executing the test data set of the service node A at first, executing the test data set of the service node B and the test data set of the service node C concurrently when the result of the A passes, executing the service node D when the result of the B and the result of the C both pass, and if the result of any service node to be tested fails in the test process, the software fails in the test and directly exits or retests.
Example two
Suppose that one service node to be tested of a piece of software is a document resource of a full-text search engine (elastic). FIG. 3 is a logic method corresponding to a service node to be tested, where get indicates that a test data set is obtained, action and state flow have a cycle, and if the state satisfies the configured method, the cycle will be skipped; result is a decision logic to verify whether the executed state results in a pass or fail.
Fig. 4 is a schematic diagram of main blocks of a device for software testing according to an embodiment of the present invention.
As shown in fig. 4, the apparatus 400 for testing software according to the embodiment of the present invention includes: an encapsulation module 401, an acquisition module 402 and a calling module 403.
Wherein the content of the first and second substances,
the packaging module 401 is configured to extract a technical framework of a service node to be tested and package the technical framework as a test interface;
an obtaining module 402, configured to obtain a technical association between the service nodes to be tested;
and the calling module 403 is configured to call the test interface to perform software test based on the technology association.
Further, the technical framework includes a test dataset including an operational dataset and a validation dataset, and a communication platform; wherein the validation dataset includes expected result information when the run dataset is executed.
In this embodiment of the present invention, the invoking module 403 is further configured to: based on the technical association, calling the test interface in order to obtain the running data set and the verification data set; executing the running data set and monitoring the state of the service node to be tested; the state of the service node to be tested comprises a state of executing the running data set and corresponding execution result information; comparing the execution result information with the expected result information to obtain a comparison result, and if the comparison result is consistent, passing the test; if the comparison result is inconsistent, the test fails.
In this embodiment of the present invention, the obtaining module 402 is further configured to: creating a business flow graph; and acquiring the technical association between the service nodes to be tested based on the service flow graph.
Furthermore, the technical association is a test logic of the service node to be tested; the calling module is further to: monitoring the comparison result of the service node to be tested in the previous layer; and when the comparison result of the service node to be tested in the previous layer is consistent, calling the test interface to acquire the running data set and the verification data set.
According to the device for testing the software, the technical framework for extracting the service node to be tested is adopted and packaged to be the testing interface; acquiring technical association among service nodes to be tested; the technical means of calling the test interface to perform software test based on technical association overcomes the high requirement on the code capability of testers; the automatic testing framework cannot keep up with the change of the business process, and the efficiency of automatic testing is low; when the technology is newly added, the automatic testing frame cannot carry out automatic testing; the technical problem that automatic testing can not be carried out across service lines or systems is solved, and the requirement on the code capability of testers is further reduced; the software testing efficiency is improved; the method can flexibly adapt to the technical effect of the change of the service node to be tested.
Fig. 5 illustrates an exemplary system architecture 500 of a software testing apparatus or method to which embodiments of the 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 various communication client applications installed thereon, such as a shopping application, a web browser application, a search application, an instant messaging tool, a mailbox client, social platform software, and the like.
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 that provides various services, such as a background management server that supports shopping websites browsed by users using the terminal devices 501, 502, 503. The background 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 (e.g., target push information and product information) to the terminal device.
It should be noted that the method for testing software provided by the embodiment of the present invention is generally executed by the server 505, and accordingly, the apparatus for testing software 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 an encapsulation module, an acquisition module, and a calling module. The names of these modules do not in some cases form a definition of the module itself, for example, the acquiring module may also be described as a module for acquiring technical associations between the service nodes to be tested.
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: step S101: extracting a technical framework of a service node to be tested, and packaging the technical framework into a test interface; step S102: acquiring technical association among service nodes to be tested; step S103: and calling a test interface based on the technical association to perform software test.
According to the technical scheme of the embodiment of the invention, the technical framework for extracting the service node to be tested is adopted and packaged as the test interface; acquiring technical association among service nodes to be tested; the technical means of calling the test interface to perform software test based on technical association overcomes the high requirement on the code capability of testers; the automatic testing framework cannot keep up with the change of the business process, and the efficiency of automatic testing is low; when the technology is newly added, the automatic testing frame cannot carry out automatic testing; the technical problem that automatic testing can not be carried out across service lines or systems is solved, and the requirement on the code capability of testers is further reduced; the software testing efficiency is improved; the method can flexibly adapt to the technical effect of the change of the service node to be tested.
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:
extracting a technical framework of a service node to be tested, and packaging the technical framework into a test interface;
acquiring technical association among the service nodes to be tested;
and calling the test interface based on the technical association to perform software test.
2. The method of claim 1, wherein the technical framework comprises a test dataset and a communication platform, the test dataset comprising a run dataset and a validation dataset; wherein the validation dataset includes expected result information when the run dataset is executed.
3. The method of claim 2, wherein invoking the test interface for software testing based on the technical association comprises:
based on the technical association, calling the test interface in order to obtain the running data set and the verification data set;
executing the running data set and monitoring the state of the service node to be tested; the state of the service node to be tested comprises a state of executing the running data set and corresponding execution result information;
comparing the execution result information with the expected result information to obtain a comparison result, and if the comparison result is consistent, passing the test; if the comparison result is inconsistent, the test fails.
4. The method of claim 1, wherein obtaining a technology association between the service nodes to be tested comprises: creating a business flow graph; and acquiring the technical association between the service nodes to be tested based on the service flow graph.
5. The method of claim 3, wherein the technical association is a test logic of the service node to be tested; based on the technical association, sequentially invoking the test interface to obtain the run dataset and the validation dataset comprises:
monitoring the comparison result of the service node to be tested in the previous layer;
and when the comparison result of the service node to be tested in the previous layer is consistent, calling the test interface to acquire the running data set and the verification data set.
6. An apparatus for testing software, comprising:
the system comprises a packaging module, a test module and a processing module, wherein the packaging module is used for extracting a technical framework of a service node to be tested and packaging the technical framework into a test interface;
the acquisition module is used for acquiring the technical association between the service nodes to be tested;
and the calling module is used for calling the test interface based on the technical association so as to test the software.
7. The apparatus of claim 6, wherein the technical framework comprises a test dataset and a communication platform, the test dataset comprising a run dataset and a validation dataset; wherein the validation dataset includes expected result information when the run dataset is executed.
8. The apparatus of claim 7, wherein the invoking module is further configured to:
based on the technical association, calling the test interface in order to obtain the running data set and the verification data set;
executing the running data set and monitoring the state of the service node to be tested; the state of the service node to be tested comprises a state of executing the running data set and corresponding execution result information;
comparing the execution result information with the expected result information to obtain a comparison result, and if the comparison result is consistent, passing the test; if the comparison result is inconsistent, the test fails.
9. The apparatus of claim 6, wherein the obtaining module is further configured to: creating a business flow graph; and acquiring the technical association between the service nodes to be tested based on the service flow graph.
10. The arrangement according to any of claims 6-9, characterized in that said technical association is a test logic of said service node to be tested; the calling module is further to:
monitoring the comparison result of the service node to be tested in the previous layer;
and when the comparison result of the service node to be tested in the previous layer is consistent, calling the test interface to acquire the running data set and the verification data set.
11. A software-tested 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.
CN201810876897.2A 2018-08-03 2018-08-03 Software testing method and device Pending CN110795331A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810876897.2A CN110795331A (en) 2018-08-03 2018-08-03 Software testing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810876897.2A CN110795331A (en) 2018-08-03 2018-08-03 Software testing method and device

Publications (1)

Publication Number Publication Date
CN110795331A true CN110795331A (en) 2020-02-14

Family

ID=69425655

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810876897.2A Pending CN110795331A (en) 2018-08-03 2018-08-03 Software testing method and device

Country Status (1)

Country Link
CN (1) CN110795331A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111782524A (en) * 2020-06-29 2020-10-16 京东数字科技控股有限公司 Application testing method and device, storage medium and electronic device
CN112199275A (en) * 2020-09-24 2021-01-08 建信金融科技有限责任公司 Component interface test analysis method and device, server and storage medium
CN112699047A (en) * 2021-01-13 2021-04-23 腾讯科技(深圳)有限公司 Application testing method and device, computer equipment and storage medium

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111782524A (en) * 2020-06-29 2020-10-16 京东数字科技控股有限公司 Application testing method and device, storage medium and electronic device
CN112199275A (en) * 2020-09-24 2021-01-08 建信金融科技有限责任公司 Component interface test analysis method and device, server and storage medium
CN112199275B (en) * 2020-09-24 2023-06-27 建信金融科技有限责任公司 Component interface test analysis method and device, server and storage medium
CN112699047A (en) * 2021-01-13 2021-04-23 腾讯科技(深圳)有限公司 Application testing method and device, computer equipment and storage medium
CN112699047B (en) * 2021-01-13 2023-08-25 腾讯科技(深圳)有限公司 Application testing method and device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN108415832B (en) Interface automation test method, device, equipment and storage medium
US10936293B2 (en) Container image layer reordering
US10353913B2 (en) Automating extract, transform, and load job testing
US9652368B2 (en) Using linked data to determine package quality
CN112463729B (en) Data file warehousing method and device, electronic equipment and medium
CN111125107A (en) Data processing method, device, electronic equipment and medium
CN110795331A (en) Software testing method and device
CN110795315A (en) Method and device for monitoring service
CN112817562A (en) Service processing method and device
US11347533B2 (en) Enhanced virtual machine image management system
CN112559024A (en) Method and device for generating transaction code change list
CN112445860B (en) Method and device for processing distributed transaction
CN116483888A (en) Program evaluation method and device, electronic equipment and computer readable storage medium
CN111026629A (en) Method and device for automatically generating test script
CN112783903B (en) Method and device for generating update log
CN113392311A (en) Field searching method, field searching device, electronic equipment and storage medium
CN113032256A (en) Automatic test method, device, computer system and readable storage medium
CN113434382A (en) Database performance monitoring method and device, electronic equipment and computer readable medium
CN112988583A (en) Method and device for testing syntax compatibility of database
CN112799797A (en) Task management method and device
CN112068814A (en) Method, device, system and medium for generating executable file
CN116452208B (en) Method, device, equipment and medium for determining change transaction code
CN110688295A (en) Data testing method and device
CN115934151A (en) Method and device for building multi-terminal small program
CN116701152A (en) Database performance determining method, device, equipment and medium

Legal Events

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