CN108647139B - System test method, device, storage medium and electronic device - Google Patents

System test method, device, storage medium and electronic device Download PDF

Info

Publication number
CN108647139B
CN108647139B CN201810226571.5A CN201810226571A CN108647139B CN 108647139 B CN108647139 B CN 108647139B CN 201810226571 A CN201810226571 A CN 201810226571A CN 108647139 B CN108647139 B CN 108647139B
Authority
CN
China
Prior art keywords
log
test
target
running
code
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
CN201810226571.5A
Other languages
Chinese (zh)
Other versions
CN108647139A (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.)
Shanghai Ctrip Digital Information Technology Co.,Ltd.
Original Assignee
Ctrip Financial Technology Shanghai 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 Ctrip Financial Technology Shanghai Co Ltd filed Critical Ctrip Financial Technology Shanghai Co Ltd
Priority to CN201810226571.5A priority Critical patent/CN108647139B/en
Publication of CN108647139A publication Critical patent/CN108647139A/en
Application granted granted Critical
Publication of CN108647139B publication Critical patent/CN108647139B/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

Abstract

The invention discloses a system testing method, a system testing device, a storage medium and an electronic device. Wherein, the method comprises the following steps: receiving a test request sent by a test system, wherein the test request is used for requesting to test a target code in the tested system; responding to the test request to obtain a target operation log corresponding to the target code from the operation log of the tested system, wherein the operation log is a log generated in the operation process of the tested system, and the target operation log is a log generated when the tested system operates the target code; and sending a target operation log to the test system, wherein the target operation log is used for the test system to test the target code. The invention solves the technical problems of lower test accuracy and test efficiency of the automatic test scheme of the system in the related technology.

Description

System test method, device, storage medium and electronic device
Technical Field
The invention relates to the field of testing, in particular to a system testing method, a system testing device, a storage medium and an electronic device.
Background
In the implementation of the code, there may be scenarios where the results are the same (e.g., the interface returns and the database states are the same), but the logic of the implementation is different. The existing automatic test mainly makes assertions on interface return, database state and the like, and cannot determine the specific implementation logic of the scene. Therefore, the test accuracy and the test efficiency of the automatic test scheme of the system in the related technology are lower.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the invention provides a system testing method, a system testing device, a storage medium and an electronic device, and at least solves the technical problems of low testing accuracy and testing efficiency of an automatic testing scheme of a system in the related technology.
According to an aspect of an embodiment of the present invention, there is provided a method for testing a system, including: receiving a test request sent by a test system, wherein the test request is used for requesting to test a target code in the tested system; responding to the test request to acquire a target operation log corresponding to the target code from an operation log of the tested system, wherein the operation log is a log generated in the operation process of the tested system, and the target operation log is a log generated when the tested system operates the target code; and sending the target operation log to the test system, wherein the target operation log is used for the test system to test the target code.
Optionally, the obtaining the target operation log corresponding to the target code from the operation log of the system under test in response to the test request includes: responding to the test request to acquire target identification information for identifying the target running log from the test request; and searching the running log corresponding to the target identification information from the identification information and the running log with the corresponding relation.
Optionally, before the target operation log corresponding to the target code is obtained from the operation log of the system under test in response to the test request, the method further includes: sending a calling request to the tested system, wherein the calling request is used for requesting to call the tested system; and under the condition of receiving confirmation information sent by the tested system, operating the tested system and storing the operation log generated by the tested system in the operation process, wherein the confirmation information is used for indicating that the tested system is successfully called.
Optionally, the storing the operation log generated by the system under test in the operation process includes: acquiring the running log generated in the running process of the tested system and the code identification of the program code run by the tested system when the running log is generated, and determining the code identification as the identification information of the running log; establishing a corresponding relation between the running log and the code identifier; storing the running log and the code identification with the corresponding relation; or acquiring an operation log generated in the operation process of the system to be tested; distributing a log identifier for the running log, and determining the log identifier as the identifier information of the running log; establishing a corresponding relation between the running log and the log identifier; and storing the running log and the log identification with the corresponding relation.
According to another aspect of the embodiments of the present invention, there is also provided a testing apparatus of a system, including: the system comprises a receiving module, a test module and a judging module, wherein the receiving module is used for receiving a test request sent by a test system, and the test request is used for requesting to test a target code in the tested system; an obtaining module, configured to obtain, in response to the test request, a target operation log corresponding to the target code from an operation log of the system under test, where the operation log is a log generated in an operation process of the system under test, and the target operation log is a log generated when the system under test operates the target code; the first sending module is configured to send the target operation log to the test system, where the target operation log is used for the test system to test the target code.
Optionally, the obtaining module includes: an obtaining unit, configured to obtain, in response to the test request, target identification information for identifying the target operation log from the test request; and the searching unit is used for searching the running log corresponding to the target identification information from the identification information and the running log which have the corresponding relation.
Optionally, the apparatus further comprises: the second sending module is used for sending a calling request to the tested system, wherein the calling request is used for requesting to call the tested system; and the processing module is used for operating the tested system and storing the operation log generated by the tested system in the operation process under the condition of receiving confirmation information sent by the tested system, wherein the confirmation information is used for indicating that the tested system is successfully called.
Optionally, the processing module includes: the first processing unit is used for acquiring the running log generated in the running process of the tested system and the code identifier of the program code run by the tested system when the running log is generated, and determining the code identifier as the identifier information of the running log; establishing a corresponding relation between the running log and the code identifier; storing the running log and the code identification with the corresponding relation; or, the second processing unit is used for acquiring an operation log generated in the operation process of the system to be tested; distributing a log identifier for the running log, and determining the log identifier as the identifier information of the running log; establishing a corresponding relation between the running log and the log identifier; and storing the running log and the log identification with the corresponding relation.
According to another aspect of the embodiments of the present invention, there is also provided a storage medium, characterized in that the storage medium stores therein a computer program, wherein the computer program is configured to execute the method described in any one of the above when executed.
According to another aspect of the embodiments of the present invention, there is also provided an electronic apparatus, including a memory and a processor, wherein the memory stores therein a computer program, and the processor is configured to execute the method described in any one of the above through the computer program.
In the embodiment of the invention, a test request sent by a test system is received, wherein the test request is used for requesting to test a target code in the tested system; responding to the test request to obtain a target operation log corresponding to the target code from the operation log of the tested system, wherein the operation log is a log generated in the operation process of the tested system, and the target operation log is a log generated when the tested system operates the target code; the method comprises the steps of sending a target operation log to a test system, wherein the target operation log is used for a mode that the test system tests a target code, generating a log corresponding to the running code when the tested system runs, obtaining the target operation log corresponding to the target code requested by a received test request when the code needs to be tested, and sending the target operation log to the test system to indicate the test system to test the target code, so that the test of the specified code is realized, the technical effects of improving the test accuracy and the test efficiency of an automatic test scheme of the system are realized, and the technical problems of low test accuracy and test efficiency of the automatic test scheme of the system in the related technology are solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a schematic diagram of an alternative system testing method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of an application environment of an alternative system testing method according to an embodiment of the present invention;
FIG. 3 is a first schematic diagram of a test apparatus of an alternative system according to an embodiment of the present invention;
FIG. 4 is a second schematic diagram of an alternative system test apparatus according to an embodiment of the present invention;
FIG. 5 is a third schematic diagram of a test apparatus of an alternative system according to embodiments of the invention;
FIG. 6 is a fourth schematic diagram of a testing apparatus of an alternative system according to embodiments of the present invention;
FIG. 7 is a diagram illustrating an application scenario of an alternative system testing method according to an embodiment of the present invention;
FIG. 8 is a diagram illustrating an application scenario of an alternative system testing method according to an embodiment of the present invention; and
FIG. 9 is a schematic diagram of an alternative electronic device according to an embodiment of the invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to an aspect of an embodiment of the present invention, there is provided a method for testing a system, as shown in fig. 1, the method including:
s102, receiving a test request sent by a test system, wherein the test request is used for requesting to test a target code in the tested system;
s104, responding to the test request to acquire a target operation log corresponding to the target code from the operation log of the tested system, wherein the operation log is a log generated in the operation process of the tested system, and the target operation log is a log generated when the tested system operates the target code;
and S106, sending a target operation log to the test system, wherein the target operation log is used for the test system to test the target code.
Optionally, in this embodiment, the testing method of the system may be applied to a hardware environment formed by the log query service system 202, the testing system 204, and the system under test 206 shown in fig. 2. As shown in FIG. 2, log query service system 202 receives a test request sent by test system 204, where the test request is used to request that target code in system under test 206 be tested. The log query service system 202 responds to the test request to obtain a target running log corresponding to the target code from the running log of the system under test 206, where the running log is a log generated in the running process of the system under test 206, and the target running log is a log generated when the system under test 206 runs the target code. The log query service system 202 sends a target operation log to the test system 204, wherein the target operation log is used for the test system 204 to test the target code.
Optionally, in this embodiment, the testing method of the system may be applied, but not limited to, in a scenario where the testing system performs an automated test on the system under test, so as to improve the testing accuracy and the testing efficiency of an automated testing scheme for the system. The above is only an example, and this is not limited in this embodiment.
It can be seen that through the above steps, a log corresponding to the running code is generated for the running code when the tested system runs, when the code needs to be tested, a target running log corresponding to the target code requested by the received test request is obtained, and the target running log is sent to the test system to instruct the test system to test the target code, so that the test on the specified code is realized, the technical effects of improving the test accuracy and the test efficiency of the automatic test scheme of the system are realized, and the technical problems of lower test accuracy and test efficiency of the automatic test scheme of the system in the related art are solved.
Optionally, the running log of the system under test is stored by using the identification information and the running log having the corresponding relationship, that is, the identification information may be allocated to the running log generated for the running code, and the identification information and the running log may be stored in a key-value key value pair form in which the running log is a value, and when a test request is received, the identification information of the target code requested by the test request is obtained, so that the target running log corresponding to the target code is obtained according to the identification information. For example: in the step S104, target identification information for identifying a target operation log is acquired from the test request in response to the test request; and searching the running log corresponding to the target identification information from the identification information and the running log which have the corresponding relation.
Optionally, during the test of the system under test, an operation log of the system under test is generated along with the operation of the system under test. For example: before the step S104, sending a call request to the system under test, where the call request is used to request to call the system under test; and under the condition of receiving confirmation information sent by the tested system, operating the tested system and storing an operation log generated by the tested system in the operation process, wherein the confirmation information is used for indicating that the tested system is successfully called.
Optionally, but not limited to, the operation log generated by the system under test during the operation process may be stored by one of the following methods:
in the first mode, the code identifier of the program code is used as the identifier information of the operation log, the corresponding relation between the program code and the operation log is established, and the code identifier and the operation log with the corresponding relation are stored. For example: acquiring an operation log generated in the operation process of a tested system and a code identifier of a program code operated by the tested system when the operation log is generated, and determining the code identifier as the identification information of the operation log; establishing a corresponding relation between the running log and the code identifier; and storing the running log and the code identification with the corresponding relation.
And secondly, distributing log identification for the running log, establishing a corresponding relation between the log identification and the running log, and storing the log identification and the running log with the corresponding relation. For example: acquiring an operation log generated in the operation process of a tested system; distributing a log identifier for the running log, and determining the log identifier as the identifier information of the running log; establishing a corresponding relation between the running log and the log identifier; and storing the running log and the log identification with the corresponding relation.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
According to another aspect of the embodiments of the present invention, there is also provided a testing apparatus of a system for implementing the testing method of the above system, as shown in fig. 3, the apparatus including:
1) a receiving module 32, configured to receive a test request sent by a test system, where the test request is used to request to test a target code in a system under test;
2) the obtaining module 34 is configured to obtain a target operation log corresponding to the target code from an operation log of the system under test in response to the test request, where the operation log is a log generated in an operation process of the system under test, and the target operation log is a log generated when the system under test operates the target code;
3) the first sending module 36 is configured to send a target operation log to the test system, where the target operation log is used for the test system to test the target code.
Optionally, in this embodiment, the testing apparatus of the system described above may be applied to a hardware environment formed by the log query service system 202, the testing system 204, and the system under test 206 shown in fig. 2. As shown in FIG. 2, log query service system 202 receives a test request sent by test system 204, where the test request is used to request that target code in system under test 206 be tested. The log query service system 202 responds to the test request to obtain a target running log corresponding to the target code from the running log of the system under test 206, where the running log is a log generated in the running process of the system under test 206, and the target running log is a log generated when the system under test 206 runs the target code. The log query service system 202 sends a target operation log to the test system 204, wherein the target operation log is used for the test system 204 to test the target code.
Optionally, in this embodiment, the testing apparatus of the system may be, but is not limited to, applied in a scenario where a testing system performs an automated test on a system under test, so as to improve the testing accuracy and the testing efficiency of an automated testing scheme for the system. The above is only an example, and this is not limited in this embodiment.
Therefore, by the device, the corresponding log is generated for the running code when the tested system runs, when the code needs to be tested, the target running log corresponding to the target code requested by the received test request is obtained, and the target running log is sent to the test system to indicate the test system to test the target code, so that the test on the specified code is realized, the technical effects of improving the test accuracy and the test efficiency of the automatic test scheme of the system are realized, and the technical problems of lower test accuracy and test efficiency of the automatic test scheme of the system in the related technology are solved.
As an alternative, as shown in fig. 4, the obtaining module 34 includes:
1) an obtaining unit 42, configured to obtain, in response to the test request, target identification information for identifying the target operation log from the test request;
2) and the searching unit 44 is used for searching the running log corresponding to the target identification information from the identification information and the running log which have the corresponding relation.
Optionally, the running log of the system under test is stored by using the identification information and the running log having the corresponding relationship, that is, the identification information may be allocated to the running log generated for the running code, and the identification information and the running log may be stored in a key-value key value pair form in which the running log is a value, and when a test request is received, the identification information of the target code requested by the test request is obtained, so that the target running log corresponding to the target code is obtained according to the identification information.
As an alternative, as shown in fig. 5, the apparatus further includes:
1) the second sending module 52 is configured to send a call request to the system under test, where the call request is used to request to call the system under test;
2) and the processing module 54 is configured to, in a case that confirmation information sent by the system under test is received, run the system under test and store a running log generated by the system under test in a running process, where the confirmation information is used to indicate that the system under test is successfully called.
Optionally, during the test of the system under test, an operation log of the system under test is generated along with the operation of the system under test.
As an alternative, as shown in fig. 6, the processing module 54 includes:
1) the first processing unit 62 is configured to obtain an operation log generated by the system under test in an operation process and a code identifier of a program code that is executed by the system under test when the operation log is generated, and determine the code identifier as identifier information of the operation log; establishing a corresponding relation between the running log and the code identifier; storing the running log and the code identification with the corresponding relation; alternatively, the first and second electrodes may be,
2) the second processing unit 64 is configured to obtain an operation log generated in the operation process of the system under test; distributing a log identifier for the running log, and determining the log identifier as the identifier information of the running log; establishing a corresponding relation between the running log and the log identifier; and storing the running log and the log identification with the corresponding relation.
Optionally, an operation log generated by the system under test during the operation process may be stored in one of the processing units.
Optionally, the first processing unit uses the code identifier of the program code as the identification information of the operation log, establishes a corresponding relationship between the program code and the operation log, and stores the code identifier and the operation log having the corresponding relationship. And distributing a log identifier for the running log through the second processing unit, establishing a corresponding relation between the log identifier and the running log, and storing the log identifier and the running log with the corresponding relation.
The application environment of the embodiment of the present invention may refer to the application environment in the above embodiments, but is not described herein again. The embodiment of the invention provides an optional specific application example of the connection method for implementing the real-time communication.
As an alternative embodiment, the method for testing the system may be, but is not limited to, applied in a scenario where a system under test is tested by a testing system as shown in fig. 7. In this scenario, a log query service is provided. And in the implementation process of the code, writing a corresponding log in a key point log file of logic processing. In the process of automatic testing, information such as log files and log keywords which need to be asserted is transmitted by calling an interface of log query service, whether the log exists in the log files is queried, and whether the corresponding log content is found is returned by the interface. The return of the log query interface is asserted during the test.
As shown in fig. 8: from A to C, this can be achieved either through B1 or through B2. In the present scenario, a log may be logged for B1 when passing B1 and B2 when passing B2.
Optionally, in this scenario, it is desirable to uniquely determine the log corresponding to a request when asserted. The log may be identified by 2 methods:
mode 1, when a log related to B1 is logged, a unique key related to a request is incidentally logged, such as: the request number. The request numbers are different for different requests, so that the log corresponding to the request can be found when asserted, and is not interfered by other requests.
In mode 2, for requests without a unique key, before each request for writing the log, the previous log file is changed into another format, and the log file write log is newly created. Such as: log file is order.log, when a request comes in, the order.log is firstly renamed to order X.log (X is a random sequence), then an order.log file is newly created, and the log related to the request is written.
Alternatively, as shown in fig. 7, the system under test may be tested by:
step 1, the test system calls the tested system. (the tested system writes the corresponding log in the log file in the process of code implementation).
And 2, returning the tested system to be successfully called.
And 3, calling log query service by the test system.
Step 4, the log query service queries the system log under test (e.g., whether a log of B1 was generated during the test).
And step 5, obtaining a query result by the log query service.
And 6, returning the query result to the test system by the log query service.
And 7, the test system makes assertion on the return result.
According to the embodiment, the current test assertion scheme mainly asserts the interface return value and the database data, but the interface return is the same, the database data is the same, and the assertion cannot be realized in any way in different scenarios of the implementation scheme. And the execution track of the code in the test process can be accurately judged in the scene. In addition, the test method can be used independently, and can also be used as a supplementary test scheme of the existing test method.
According to still another aspect of an embodiment of the present invention, there is also provided an electronic device for performing a test of the above system, as shown in fig. 9, the electronic device including: one or more processors 902 (only one of which is shown in the figure), in which a computer program is stored, a memory 904, in which a sensor 906, an encoder 908 and a transmitting device 910 are arranged to carry out the steps of any of the above-described method embodiments by means of the computer program.
Optionally, in this embodiment, the electronic apparatus may be located in at least one network device of a plurality of network devices of a computer network.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, receiving a test request sent by the test system, wherein the test request is used for requesting to test a target code in the tested system;
s2, responding to the test request to obtain a target operation log corresponding to the target code from the operation log of the tested system, wherein the operation log is a log generated in the operation process of the tested system, and the target operation log is a log generated when the tested system operates the target code;
and S3, sending the target operation log to the test system, wherein the target operation log is used for the test system to test the target code.
Alternatively, it can be understood by those skilled in the art that the structure shown in fig. 7 is only an illustration, and the electronic device may also be a terminal device such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, a Mobile Internet Device (MID), a PAD, and the like. Fig. 9 is a diagram illustrating a structure of the electronic device. For example, the electronic device may also include more or fewer components (e.g., network interfaces, display devices, etc.) than shown in FIG. 9, or have a different configuration than shown in FIG. 9.
The memory 902 may be used to store software programs and modules, such as program instructions/modules corresponding to the testing method and apparatus of the system in the embodiment of the present invention, and the processor 904 executes various functional applications and data processing by running the software programs and modules stored in the memory 902, that is, implementing the control method of the target component described above. The memory 902 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 902 may further include memory located remotely from the processor 904, which may be connected to the terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 910 is used for receiving or transmitting data via a network. Examples of the network may include a wired network and a wireless network. In one example, the transmission device 910 includes a Network adapter (NIC) that can be connected to a router via a Network cable and other Network devices so as to communicate with the internet or a local area Network. In one example, the transmission device 910 is a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
Wherein the memory 902 is used for storing, inter alia, application programs.
Embodiments of the present invention also provide a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
Alternatively, in the present embodiment, the storage medium may be configured to store a computer program for executing the steps of:
s1, receiving a test request sent by the test system, wherein the test request is used for requesting to test a target code in the tested system;
s2, responding to the test request to obtain a target operation log corresponding to the target code from the operation log of the tested system, wherein the operation log is a log generated in the operation process of the tested system, and the target operation log is a log generated when the tested system operates the target code;
and S3, sending the target operation log to the test system, wherein the target operation log is used for the test system to test the target code.
Optionally, the storage medium is further configured to store a computer program for executing the steps included in the method in the foregoing embodiment, which is not described in detail in this embodiment.
Alternatively, in this embodiment, a person skilled in the art may understand that all or part of the steps in the methods of the foregoing embodiments may be implemented by a program instructing hardware associated with the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
The integrated unit in the above embodiments, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in the above computer-readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing one or more computer devices (which may be personal computers, servers, network devices, etc.) to execute all or part of the steps of the method according to the embodiments of the present invention.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (8)

1. A method for testing a system, comprising:
receiving a test request sent by a test system, wherein the test request is used for requesting to test a target code in the tested system;
responding to the test request to acquire a target operation log corresponding to the target code from an operation log of the tested system, wherein the operation log is a log generated in the operation process of the tested system, and the target operation log is a log generated when the tested system operates the target code;
sending the target operation log to the test system, wherein the target operation log is used for the test system to test the target code;
before the target operation log corresponding to the target code is acquired from the operation log of the system under test in response to the test request, the method further includes:
sending a calling request to the tested system, wherein the calling request is used for requesting to call the tested system;
and under the condition of receiving confirmation information sent by the tested system, operating the tested system and storing the operation log generated by the tested system in the operation process, wherein the confirmation information is used for indicating that the tested system is successfully called.
2. The method of claim 1, wherein obtaining the target execution log corresponding to the target code from the execution log of the system under test in response to the test request comprises:
responding to the test request to acquire target identification information for identifying the target running log from the test request;
and searching the running log corresponding to the target identification information from the identification information and the running log with the corresponding relation.
3. The method of claim 1, wherein storing the run log generated by the system under test during operation comprises:
acquiring the running log generated in the running process of the tested system and the code identification of the program code run by the tested system when the running log is generated, and determining the code identification as the identification information of the running log; establishing a corresponding relation between the running log and the code identifier; storing the running log and the code identification with the corresponding relation; alternatively, the first and second electrodes may be,
acquiring an operation log generated in the operation process of the system to be tested; distributing a log identifier for the running log, and determining the log identifier as the identifier information of the running log; establishing a corresponding relation between the running log and the log identifier; and storing the running log and the log identification with the corresponding relation.
4. A system testing apparatus, comprising:
the system comprises a receiving module, a test module and a judging module, wherein the receiving module is used for receiving a test request sent by a test system, and the test request is used for requesting to test a target code in the tested system;
an obtaining module, configured to obtain, in response to the test request, a target operation log corresponding to the target code from an operation log of the system under test, where the operation log is a log generated in an operation process of the system under test, and the target operation log is a log generated when the system under test operates the target code;
the first sending module is used for sending the target running log to the test system, wherein the target running log is used for the test system to test the target code;
wherein the apparatus further comprises:
the second sending module is used for sending a calling request to the tested system, wherein the calling request is used for requesting to call the tested system;
and the processing module is used for operating the tested system and storing the operation log generated by the tested system in the operation process under the condition of receiving confirmation information sent by the tested system, wherein the confirmation information is used for indicating that the tested system is successfully called.
5. The apparatus of claim 4, wherein the obtaining module comprises:
an obtaining unit, configured to obtain, in response to the test request, target identification information for identifying the target operation log from the test request;
and the searching unit is used for searching the running log corresponding to the target identification information from the identification information and the running log which have the corresponding relation.
6. The apparatus of claim 4, wherein the processing module comprises:
the first processing unit is used for acquiring the running log generated in the running process of the tested system and the code identifier of the program code run by the tested system when the running log is generated, and determining the code identifier as the identifier information of the running log; establishing a corresponding relation between the running log and the code identifier; storing the running log and the code identification with the corresponding relation; alternatively, the first and second electrodes may be,
the second processing unit is used for acquiring an operation log generated in the operation process of the system to be tested; distributing a log identifier for the running log, and determining the log identifier as the identifier information of the running log; establishing a corresponding relation between the running log and the log identifier; and storing the running log and the log identification with the corresponding relation.
7. A storage medium, in which a computer program is stored, wherein the computer program is arranged to perform the method of any of claims 1 to 3 when executed.
8. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method of any of claims 1 to 3 by means of the computer program.
CN201810226571.5A 2018-03-19 2018-03-19 System test method, device, storage medium and electronic device Active CN108647139B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810226571.5A CN108647139B (en) 2018-03-19 2018-03-19 System test method, device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810226571.5A CN108647139B (en) 2018-03-19 2018-03-19 System test method, device, storage medium and electronic device

Publications (2)

Publication Number Publication Date
CN108647139A CN108647139A (en) 2018-10-12
CN108647139B true CN108647139B (en) 2022-02-15

Family

ID=63744409

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810226571.5A Active CN108647139B (en) 2018-03-19 2018-03-19 System test method, device, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN108647139B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112134719A (en) * 2019-06-25 2020-12-25 中兴通讯股份有限公司 Method and system for analyzing base station security log
CN115001945B (en) * 2022-05-27 2024-03-01 深圳市兴海物联科技有限公司 Log collection monitoring method, device, equipment and computer readable medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102141962A (en) * 2011-04-07 2011-08-03 北京航空航天大学 Safety distributed test framework system and test method thereof
CN102799515A (en) * 2011-05-24 2012-11-28 腾讯科技(深圳)有限公司 Application program testing method and device
CN107704398A (en) * 2017-11-01 2018-02-16 网易(杭州)网络有限公司 Automated testing method and device, storage medium, electronic equipment

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9729671B2 (en) * 2014-10-05 2017-08-08 YScope Inc. Systems and processes for computer log analysis
CN107122290B (en) * 2016-02-25 2020-06-09 阿里巴巴集团控股有限公司 Method and device for recording log information

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102141962A (en) * 2011-04-07 2011-08-03 北京航空航天大学 Safety distributed test framework system and test method thereof
CN102799515A (en) * 2011-05-24 2012-11-28 腾讯科技(深圳)有限公司 Application program testing method and device
CN107704398A (en) * 2017-11-01 2018-02-16 网易(杭州)网络有限公司 Automated testing method and device, storage medium, electronic equipment

Also Published As

Publication number Publication date
CN108647139A (en) 2018-10-12

Similar Documents

Publication Publication Date Title
CN107169094B (en) Information aggregation method and device
CN103475682B (en) File transfer method and file transfer equipment
CN111291079A (en) Data query method and device
CN110213234B (en) Application program file developer identification method, device, equipment and storage medium
CN111045893B (en) Method, device and system for executing monitoring task, storage medium and electronic device
CN111258680B (en) Resource loading method and device, storage medium and electronic device
CN109246078B (en) Data interaction method and server
CN110928770B (en) Software testing method, device, system, storage medium and electronic equipment
CN113672441B (en) Method and device for testing intelligent equipment
CN105554136B (en) Backup Data restoring method, apparatus and system
CN108647139B (en) System test method, device, storage medium and electronic device
CN113434293A (en) Method and apparatus for processing repeat request, storage medium, and electronic apparatus
CN110198227B (en) Log file processing method and device, storage medium and electronic device
CN112671878B (en) Block chain information subscription method, device, server and storage medium
CN115705190A (en) Method and device for determining dependence degree
CN112699034A (en) Virtual login user construction method, device, equipment and storage medium
CN111353136A (en) Method and device for processing operation request
CN109639629B (en) Data access processing method and device, computer equipment and storage medium
CN110933070A (en) User identification method, system, equipment and computer readable storage medium
CN111339170A (en) Data processing method and device, computer equipment and storage medium
CN112416750A (en) Application program boundary testing method and system
CN114371969A (en) Page performance testing method and device, electronic equipment and storage medium
CN114546842A (en) Interface test method and device, storage medium and electronic equipment
CN110688319B (en) Application keep-alive capability test method and related device
CN114356456A (en) Service processing method, device, storage medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20181218

Address after: Room 906, Building No. 16, 968 Jinzhong Road, Changning District, Shanghai, 2005 (8 floors of actual floor)

Applicant after: Ctrip Financial Technology (Shanghai) Co.,Ltd.

Address before: 100080 17th Floor, Yuanwei Building, 29 Suzhou Street, Haidian District, Beijing

Applicant before: BEIJING QUNAR SOFTWARE TECHNOLOGY Co.,Ltd.

GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20230117

Address after: 200335 Room 805, Building 12, No. 968, Jinzhong Road, Changning District, Shanghai

Patentee after: Shanghai Ctrip Digital Information Technology Co.,Ltd.

Address before: Room 906, Building No. 16, 968 Jinzhong Road, Changning District, Shanghai, 2005 (8 floors of actual floor)

Patentee before: Ctrip Financial Technology (Shanghai) Co.,Ltd.