CA3141546A1 - Log-based testing method, device, and computer system - Google Patents
Log-based testing method, device, and computer system Download PDFInfo
- Publication number
- CA3141546A1 CA3141546A1 CA3141546A CA3141546A CA3141546A1 CA 3141546 A1 CA3141546 A1 CA 3141546A1 CA 3141546 A CA3141546 A CA 3141546A CA 3141546 A CA3141546 A CA 3141546A CA 3141546 A1 CA3141546 A1 CA 3141546A1
- Authority
- CA
- Canada
- Prior art keywords
- testing
- scene
- parameters
- validation
- request
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/3668—Testing of software
- G06F11/3672—Test management
- G06F11/3684—Test management for test design, e.g. generating new test cases
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/3668—Testing of software
- G06F11/3672—Test management
- G06F11/3692—Test management for test results analysis
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
A log-based testing method and its apparatus and computer system are disclosed. The method involves acquiring a target testing case that includes at least one testing scene, corresponding validation parameters, and predetermined testing parameters, and configuring a to-be-tested object into a testing scene corresponding to the target testing case;
according to the predetermined testing parameters corresponding to the testing scene, generating and sending testing HTTP
requests, for the testing scene to receive and process so as to generate a corresponding request log; according to the corresponding validation parameters, validating the request logs, and according to validation results, determining whether there is any abnormality in the testing scene.
Testing staff may pre-program testing cases for every to-be-tested-object, determine testing scenes for every testing case, and validate parameters and testing parameters, thereby improving testing efficiency.
according to the predetermined testing parameters corresponding to the testing scene, generating and sending testing HTTP
requests, for the testing scene to receive and process so as to generate a corresponding request log; according to the corresponding validation parameters, validating the request logs, and according to validation results, determining whether there is any abnormality in the testing scene.
Testing staff may pre-program testing cases for every to-be-tested-object, determine testing scenes for every testing case, and validate parameters and testing parameters, thereby improving testing efficiency.
Description
LOG-BASED TESTING METHOD, DEVICE AND COMPUTER SYSTEM
BACKGROUND OF THE INVENTION
Technical Field [0001] The present invention relates to the technical field of testing, and more particularly to a log-based testing method, and its apparatus and computer system.
Description of Related Art
BACKGROUND OF THE INVENTION
Technical Field [0001] The present invention relates to the technical field of testing, and more particularly to a log-based testing method, and its apparatus and computer system.
Description of Related Art
[0002] To ensure normal functions of computer programs, software developers have to frequently test computer programs. In a traditional web-end testing environment, every time before a test can be started, testing cases have to be manual programmed, and corresponding parameters have to manually revised during tests. The both manual parts are time-consuming and complicated, and have high risks of errors. After the web end generates corresponding request logs, operational results of every testing case have to be validated, and omission as well as errors also tend to happen in this stage.
SUMMARY OF THE INVENTION
SUMMARY OF THE INVENTION
[0003] To address the shortcomings of the prior art, the primary objective of the present invention is to provide a log-based testing method, and its apparatus and computer system.
[0004] To achieve the foregoing objective, in a first aspect the present invention provides a log-based testing method, which comprises:
[0005] acquiring a target testing case that includes at least one testing scene, corresponding validation parameters, and predetermined testing parameters, wherein the target testing case is used to test a corresponding to-be-tested object;
[0006] configuring the to-be-tested object into a testing scene corresponding to the target testing case;
[0007] according to the predetermined testing parameters corresponding to the testing scene, Date recue / Date received 2021-12-09 generating and sending testing HTTP requests, for the testing scene to receive and process to generate corresponding request logs, wherein the testing HTTP requests are used to simulate operations of a user; and
[0008] according to the corresponding validation parameters, validating the request logs, and according to validation results, determining whether there is any abnormality in the testing scene.
[0009] In some embodiments, the predetermined testing parameters includes corresponding scene IDs, and the step of according to the predetermined testing parameters corresponding to the testing scene, generating and sending testing HTTP requests, for the testing scene to receive and process to generate corresponding request logs comprises:
[0010] monitoring the to-be-tested-object in a real-time manner, and when it is detected that the to-be-tested-object receives the testing http requests, according to the scene IDs included in the received testing HTTP request, distributing the received testing HTTP requests to the corresponding testing scenes, for the testing scene to receive and process to generate corresponding request logs.
[0011] In some embodiments, the step of the testing scenes receiving and processing the testing HTTP requests to generate corresponding request log comprises:
[0012] publishing the generated request log to predetermined proxy objects;
[0013] the according to the corresponding validation parameters, validating the request logs, and the step of according to validation results, determining whether there is any abnormality in the testing scene comprises:
[0014] subscribing the request logs corresponding to the scene IDs, so as to acquire the request logs from the predetermined proxy objects and according to the validation parameters corresponding to the testing scenes validate the request logs.
[0015] In some embodiments, the predetermined testing parameters includes corresponding testing access browsers.
[0016] In some embodiments, the request log comprises generated fields and target parameters corresponding to each said field, and the step of according to the corresponding validation parameters, validating the request logs, and according to validation results, determining whether there is any abnormality in the testing scene comprises:
Date recue / Date received 2021-12-09
Date recue / Date received 2021-12-09
[0017] when the target parameters corresponding to each said field are identical to the validation parameters corresponding to the field, determining that there is no abnormality.
[0018] In some embodiments, the method comprises:
[0019] when the target parameters corresponding to the field are different from the corresponding validation parameters, giving an alarm signal that includes target parameters different from the corresponding validation parameters and includes the corresponding fields.
[0020] In a second aspect, the present invention provides a log-based testing apparatus, which comprises:
[0021] an acquiring module, for acquiring a target testing case that includes at least one testing scene, corresponding validation parameters, and predetermined testing parameters, wherein the target testing case is used to test a corresponding to-be-tested object;
[0022] a configuring module, for configuring the to-be-tested object into a testing scene corresponding to the target testing case;
[0023] a generating module, for according to the predetermined testing parameters corresponding to the testing scene, generating and sending testing HTTP
requests, for the testing scene to receive and process to generate corresponding request logs, wherein the testing HTTP
requests are used to simulate operations of a user; and
requests, for the testing scene to receive and process to generate corresponding request logs, wherein the testing HTTP
requests are used to simulate operations of a user; and
[0024] a validating module, for according to the corresponding validation parameters, validating the request logs, and according to validation results, determining whether there is any abnormality in the testing scene.
[0025] In some embodiments, the predetermined testing parameters includes corresponding scene IDs, and the generating module is further used to monitor the to-be-tested-object in a real-time manner, and when it is detected that the to-be-tested-object receives the testing http requests, according to the scene IDs included in the received testing HTTP request, distribute the received testing HTTP requests to the corresponding testing scenes, for the testing scene to receive and process to generate corresponding request logs.
[0026] In some embodiments, the testing scene publishing the generated request log to predetermined proxy objects, and the validation module is further used to subscribe the request logs corresponding to the scene IDs, so as to acquire the request logs from the predetermined Date recue / Date received 2021-12-09 proxy objects and according to the validation parameters corresponding to the testing scenes validate the request logs.
[0027] In a third aspect, the present invention provides a computer system, which comprises:
[0028] one or more processors; and
[0029] a memory associated with the one or more processors, the memory being used to store program instructions, which when read and executed by the one or more processors, performing operations of:
[0030] acquiring a target testing case that includes at least one testing scene, corresponding validation parameters, and predetermined testing parameters, wherein the target testing case is used to test a corresponding to-be-tested object;
[0031] configuring the to-be-tested object into a testing scene corresponding to the target testing case;
[0032] according to the predetermined testing parameters corresponding to the testing scene, generating and sending testing HTTP requests, for the testing scene to receive and process to generate corresponding request logs, wherein the testing HTTP requests are used to simulate operations of a user; and
[0033] according to the corresponding validation parameters, validating the request logs, and according to validation results, determining whether there is any abnormality in the testing scene.
[0034] The present invention has the following beneficial effects:
[0035] The present invention provides a log-based testing method, which comprises acquiring a target testing case that includes at least one testing scene, corresponding validation parameters, and predetermined testing parameters, wherein the target testing case is used to test a corresponding to-be-tested object; configuring the to-be-tested object into a testing scene corresponding to the target testing case; according to the predetermined testing parameters corresponding to the testing scene, generating and sending testing HTTP
requests, for the testing scene to receive and process to generate corresponding request logs, wherein the testing HTTP
requests are used to simulate operations of a user; and according to the corresponding validation parameters, validating the request logs, and according to validation results, determining whether there is any abnormality in the testing scene. Testing staff may program testing cases for every Date recue / Date received 2021-12-09 object to be tested in advance and determine testing scenes, validation parameters, and testing parameters for every testing case. Thereby, in a test, a to-be-tested-object can be directly configured into corresponding testing scenes according to the testing cases, and testing requests can be generated according to the predetermined testing parameters, so as to eliminate the need for repeated manual configuration of the to-be-tested-object and for repeated simulation mimicking requests from users. In addition, the request logs obtained in the test can be directly validated according to the corresponding validation parameters, thereby eliminating the need for manual validation after all tests that may cause omission.
BRIEF DESCRIPTION OF THE DRAWINGS
requests, for the testing scene to receive and process to generate corresponding request logs, wherein the testing HTTP
requests are used to simulate operations of a user; and according to the corresponding validation parameters, validating the request logs, and according to validation results, determining whether there is any abnormality in the testing scene. Testing staff may program testing cases for every Date recue / Date received 2021-12-09 object to be tested in advance and determine testing scenes, validation parameters, and testing parameters for every testing case. Thereby, in a test, a to-be-tested-object can be directly configured into corresponding testing scenes according to the testing cases, and testing requests can be generated according to the predetermined testing parameters, so as to eliminate the need for repeated manual configuration of the to-be-tested-object and for repeated simulation mimicking requests from users. In addition, the request logs obtained in the test can be directly validated according to the corresponding validation parameters, thereby eliminating the need for manual validation after all tests that may cause omission.
BRIEF DESCRIPTION OF THE DRAWINGS
[0036] To better illustrate the technical schemes as disclosed in the embodiments of the present invention, accompanying drawings referred in the description of the embodiments below are introduced briefly. It is apparent that the accompanying drawings as recited in the following description merely provide a part of possible embodiments of the present invention, and people of ordinary skill in the art would be able to obtain more drawings according to those provided herein without paying creative efforts, wherein:
[0037] FIG. 1 is a flowchart of a log-based test according to one embodiment of the present invention;
[0038] FIG. 2 is a flowchart of a log-based testing method according to one embodiment of the present invention;
[0039] FIG. 3 is a structural diagram of a log-based testing apparatus according to one embodiment of the present invention; and
[0040] FIG. 4 is a structural diagram of a log-based testing computer system according to one embodiment of the present invention.
DETAILED DESCRIPTION OF THE INVENTION
DETAILED DESCRIPTION OF THE INVENTION
[0041] To make the foregoing objectives, features, and advantages of the present invention clearer and more understandable, the following description will be directed to some embodiments Date recue / Date received 2021-12-09 as depicted in the accompanying drawings to detail the technical schemes disclosed in these embodiments. It is, however, to be understood that the embodiments referred herein are only a part of all possible embodiments and thus not exhaustive. Based on the embodiments of the present invention, all the other embodiments can be conceived without creative labor by people of ordinary skill in the art, and all these and other embodiments shall be embraced in the scope of the present invention.
Embodiment 1
Embodiment 1
[0042] To address issues related to the prior art, the present invention provides a log-based testing method. In the present invention, a testing case includes corresponding objects to be tested, testing scenes, and validation parameters as well as predetermined testing parameters for every testing scene. A to-be-tested-object may be any web-based server end. The testing scene includes to-be-tested-objects, comprising parameters for matching corresponding to-be-tested-objects, such as Pageids, page names, etc., and corresponding scene IDs, as well as triggering types and objects to be triggered. Therein, the triggering types include triggering scenes corresponding to HTTP-testing requests. For example, a testing HTTP request is generated as a result of a user clicking some page element or as a result of a user viewing a to-be-tested-object, etc. Objects to be triggered include configuration values of corresponding to to-be-tested elements. According to these configuration values, to-be-tested elements can be configured into to-be-tested states.
The to-be-tested elements include HTML page elements and the like. The validation parameters include predetermined correct results corresponding to fields included in the request logs obtained after the testing scenes process the corresponding requests.
The to-be-tested elements include HTML page elements and the like. The validation parameters include predetermined correct results corresponding to fields included in the request logs obtained after the testing scenes process the corresponding requests.
[0043] In order to realize automated testing, a testing environment has to be developed in advance through the following steps:
[0044] Si. initializing a testing environment, and creating HTTP request proxy objects;
[0045] Every HTTP request proxy object records scene IDs that are pre-subscribed and thereby monitored by every callback function. The HTTP request proxy objects monitor the request logs generated by the to-be-tested-objects. When a generated request log is detected, according to the scene ID corresponding to the request log, the request log is transmitted to the callback function Date recue / Date received 2021-12-09 monitoring the scene ID. When the callback function acquires the request log, it first determines whether the request log is the one generated by the testing scene monitored by the callback function according to the scene ID corresponding to the request log. If the result is positive, it is to be validated whether there is any abnormality according to the validation parameters.
[0046] S2. generating proxy HTTP requests;
[0047] a proxy HTTP request is used to send the generated testing HTTP
requests that simulate user behaviors to the corresponding testing scenes.
requests that simulate user behaviors to the corresponding testing scenes.
[0048] After the testing environment is built, as shown in FIG. 1, the disclosed log-based testing method specifically comprises:
[0049] Step 1. acquiring target testing cases;
[0050] Before the beginning of a test, testing staff may program testing cases in advance, and set up buried points corresponding to every scene, respectively. The target testing cases include corresponding to-be-tested-objects, testing scenes, and validation parameters as well as predetermined validation parameters corresponding to every testing scene.
[0051] Step 2. configuring the to-be-tested-objects into corresponding testing scenes;
[0052] Every to-be-tested-object may have multiple testing scenes corresponding thereto. The testing scenes may be tested successively or parallelly, without limitation.
[0053] During configuration, callback functions corresponding to the testing scenes may be set, and the request logs corresponding to the scene IDs may be subscribed at the HTTP request proxy objects.
[0054] Step 3. according to predetermined testing parameters corresponding to the testing scenes, generating testing HTTP requests and sending them to the to-be-tested-objects, receiving proxy HTTP requests, and forwarding them to the corresponding testing scenes;
[0055] The testing HTTP requests are used to simulate operations of users on the to-be-tested-objects. The predetermined testing parameters may contain designated access browsers, namely the browsers used by users corresponding to the testing request to g generate the HTTP requests.
[0056] Step 4. processing the testing scenes to generate corresponding request logs;
[0057] When the testing scenes generate request logs, corresponding scene IDs are written into the request logs.
Date recue / Date received 2021-12-09
Date recue / Date received 2021-12-09
[0058] Step 5. when the HTTP request proxy objects monitor request logs, distributing the testing logs to corresponding callback functions according to the scene IDs;
[0059] Step 6. using callback functions to acquire the corresponding request logs and perform validation, and when target parameters corresponding to every field in the request log are identical to the predetermined validation parameters, determining that there is no abnormality in the request logs and there is no abnormality in the corresponding testing scenes;
[0060] When there is any difference, determining that there is abnormality in the corresponding testing scenes and giving an alarm signal, which includes target parameters different from the predetermined validation parameters and includes fields corresponding to the target parameters.
Embodiment 2
Embodiment 2
[0061] Corresponding to the previous embodiment, the present invention provides a log-based testing method as shown in FIG. 2. The method comprises:
[0062] 210. acquiring a target testing case that includes at least one testing scene, corresponding validation parameters, and predetermined testing parameters, wherein the target testing case is used to test a corresponding to-be-tested object;
[0063] 220. configuring the to-be-tested object into a testing scene corresponding to the target testing case;
[0064] 230. according to the predetermined testing parameters corresponding to the testing scene, generating and sending testing HTTP requests, for the testing scene to receive and process to generate corresponding request logs, wherein the testing HTTP requests are used to simulate operations of a user.
[0065] Preferably, predetermined testing parameters includes corresponding scene IDs, and the step of according to the predetermined testing parameters corresponding to the testing scene, generating and sending testing HTTP requests, for the testing scene to receive and process to generate corresponding request logs comprises:
[0066] 231. monitoring the to-be-tested-object in a real-time manner, and when it is detected that the to-be-tested-object receives the testing http requests, according to the scene IDs included in the received testing HTTP request, distributing the received testing HTTP
requests to the Date recue / Date received 2021-12-09 corresponding testing scenes, for the testing scene to receive and process to generate corresponding request logs.
requests to the Date recue / Date received 2021-12-09 corresponding testing scenes, for the testing scene to receive and process to generate corresponding request logs.
[0067] 240. according to the corresponding validation parameters, validating the request logs, and according to validation results, determining whether there is any abnormality in the testing scene.
[0068] Preferably, the step of the testing scenes receiving and processing the testing HTTP
requests to generate corresponding request log comprises:
requests to generate corresponding request log comprises:
[0069] 241. publishing the generated request log to predetermined proxy objects;
[0070] the according to the corresponding validation parameters, validating the request logs, and according to validation results, determining whether there is any abnormality in the testing scene comprises:
[0071] 242. subscribing the request logs corresponding to the scene IDs, so as to acquire the request logs from the predetermined proxy objects, according to the testing scene corresponding validation parameters validation the request log.
[0072] Preferably, the predetermined testing parameters includes corresponding testing access browsers.
[0073] Preferably, the request log comprises generated fields and target parameters corresponding to each said field, and the step of according to the corresponding validation parameters, validating the request logs, and according to validation results, determining whether there is any abnormality in the testing scene comprises:
[0074] 243. when the target parameters corresponding to each said field are identical to the validation parameters corresponding to the field, determining that there is no abnormality in the request log.
[0075] Preferably, the method comprises:
[0076] 244. when the target parameters corresponding to the field are different from the corresponding validation parameters, giving an alarm signal that includes target parameters different from the corresponding validation parameters and includes the corresponding fields.
Embodiment 3 Date recue / Date received 2021-12-09
Embodiment 3 Date recue / Date received 2021-12-09
[0077] Corresponding to the method discussed above, the present invention provides a log-based testing apparatus, as shown in FIG. 3. The apparatus comprises:
[0078] an acquiring module 310, for acquiring target testing case and acquiring the request log, wherein the target testing case comprises at least one testing scene, corresponding validation parameters, and predetermined testing parameters, wherein the target testing case is used to test a corresponding to-be-tested object;
[0079] a configuring module 320, for configuring the to-be-tested object into a testing scene corresponding to the target testing case;
[0080] a generating module 330, for according to the predetermined testing parameters corresponding to the testing scene, generating and sending testing HTTP
requests, for the testing scene to receive and process to generate corresponding request logs, wherein the testing HTTP
requests are used to simulate operations of a user; and
requests, for the testing scene to receive and process to generate corresponding request logs, wherein the testing HTTP
requests are used to simulate operations of a user; and
[0081] a validating module 340, for according to the corresponding validation parameters, validating the request logs, and according to validation results, determining whether there is any abnormality in the testing scene.
[0082] Preferably, the predetermined testing parameters includes corresponding scene IDs, the generating module 330 may further be used to monitoring the to-be-tested-object in a real-time manner, and when it is detected that the to-be-tested-object receives the testing http requests, according to the scene IDs included in the received testing HTTP request, distributing the received testing HTTP requests to the corresponding testing scenes, for the testing scene to receive and process to generate corresponding request logs.
[0083] Preferably, the testing scene publishing the generated request log to predetermined proxy objects, the validation module 340 may further be used to subscribing the request logs corresponding to the scene IDs, so as to acquire the request logs from the predetermined proxy objects and according to the validation parameters corresponding to the testing scenes validate the request logs.
[0084] Preferably, request log comprises generated fields and target parameters corresponding to each said field, the validation module 340 may further be used to when the target parameters corresponding to each said field are identical to the validation parameters corresponding to the Date recue / Date received 2021-12-09 field, determining that there is no abnormality.
[0085] Preferably, the validation module 340 may further be used to when the target parameters corresponding to the field are different from the corresponding validation parameters, giving an alarm signal that includes target parameters different from the corresponding validation parameters and includes the corresponding fields.
Embodiment 4
Embodiment 4
[0086] Corresponding to the foregoing method, apparatus, and system, the present embodiment of the present invention provides a computer system, which comprises:
one or more processors; and a memory associated with the one or more processors, the memory being used to store program instructions, which when read and executed by the one or more processors, performing operations of:
one or more processors; and a memory associated with the one or more processors, the memory being used to store program instructions, which when read and executed by the one or more processors, performing operations of:
[0087] acquiring a target testing case that includes at least one testing scene, corresponding validation parameters, and predetermined testing parameters, wherein the target testing case is used to test a corresponding to-be-tested object;
[0088] configuring the to-be-tested object into a testing scene corresponding to the target testing case;
[0089] according to the predetermined testing parameters corresponding to the testing scene, generating and sending testing HTTP requests, for the testing scene to receive and process to generate corresponding request logs, wherein the testing HTTP requests are used to simulate operations of a user; and
[0090] according to the corresponding validation parameters, validating the request logs, and according to validation results, determining whether there is any abnormality in the testing scene.
[0091] FIG. 4 illustratively depicts a structure of the computer system. It may specifically include a processor 1510, a video display adapter 1511, a disk driver 1512, an I/O port 1513, a network port 1514, and a memory 1520. The processor 1510, the video display adapter 1511, the disk driver 1512, the I/O port 1513, the network port 1514, and the memory 1520 may be communicatively connected through a communication bus 1530.
[0092] Therein, the processor 1510 may be implemented using a common CPU
Date recue / Date received 2021-12-09 (Central Processing Unit), a microprocessor, an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits for executing relevant programs to realize the technical scheme provided by the present invention.
Date recue / Date received 2021-12-09 (Central Processing Unit), a microprocessor, an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits for executing relevant programs to realize the technical scheme provided by the present invention.
[0093] The memory 1520 may be realized using a ROM (Read Only Memory), a RAM
(Random Access Memory), a static storage device, a dynamic storage device or any analog. The memory 1520 may store for an operating system 1521 that controls operation of the computer system 1500, and a basic input/output system (BIOS) for controlling low-level operations of the computer system 1500. In addition, it may further store a web browser 1523, a data storage management system 1524, and an icon and font processing system 1525. The icon and font processing system 1525 may be an application enabling operations of the foregoing various steps of the embodiments of the present invention. In any case, when the technical scheme provided by present invention is realized using software or firmware, the related program codes are stored in the memory 1520 for the processor 1510 to call and execute.
(Random Access Memory), a static storage device, a dynamic storage device or any analog. The memory 1520 may store for an operating system 1521 that controls operation of the computer system 1500, and a basic input/output system (BIOS) for controlling low-level operations of the computer system 1500. In addition, it may further store a web browser 1523, a data storage management system 1524, and an icon and font processing system 1525. The icon and font processing system 1525 may be an application enabling operations of the foregoing various steps of the embodiments of the present invention. In any case, when the technical scheme provided by present invention is realized using software or firmware, the related program codes are stored in the memory 1520 for the processor 1510 to call and execute.
[0094] The I/O port 1513 is for connecting an I/O module for allowing data input and output.
The input/output module may be built in the apparatus as a component (not shown), or may be set externally and connected to the apparatus so as to provides corresponding functions. Therein, the input device may include a keyboard, a mouse, a touch panel, a microphone, various sensors or more. The output device may include a display, an amplifier, a vibrator, an indicator or more.
The input/output module may be built in the apparatus as a component (not shown), or may be set externally and connected to the apparatus so as to provides corresponding functions. Therein, the input device may include a keyboard, a mouse, a touch panel, a microphone, various sensors or more. The output device may include a display, an amplifier, a vibrator, an indicator or more.
[0095] The network port 1514 is for connecting a communication module (not shown) to allow communication between the disclosed apparatus and external devices. Therein, the communication module may enable communication either in a wired manner (such as through a USB, a network line, etc.) or in a wireless way (such as through a mobile network, WIFI, Bluetooth, etc.).
[0096] The bus 1530 comprises a channel allowing information transmission among the components of the device (i.e., the processor 1510, the video display adapter 1511, the disk driver 1512, the I/O port 1513, the network port 1514, and the memory 1520).
[0097] Moreover, the computer system 1500 may further obtain information about specific collection conditions from a virtual resources object collection condition information database 1541 for its condition determination or the like.
Date recue / Date received 2021-12-09
Date recue / Date received 2021-12-09
[0098] It is to be noted that while the apparatus in the depicted embodiment works merely by virtue of the processor 1510, the video display adapter 1511, the disk driver 1512, the I/O port 1513, the network port 1514, the memory 1520, and the bus 1530, in practical implementations, the apparatus may further include additional components required for its desired purposes.
Moreover, people skilled in the art would appreciate that the disclosed apparatus may only include the minimal number of components for realizing the scheme of the present invention instead of having all these depicted components.
Moreover, people skilled in the art would appreciate that the disclosed apparatus may only include the minimal number of components for realizing the scheme of the present invention instead of having all these depicted components.
[0099] From the description above, people skilled in the art would clearly recognize that the present invention may be realized using software in combination with necessary universal hardware-based platform. Based on this understanding, the technical scheme of the present invention may, in nature or for its part that is contributive to the improvement of the prior art, implemented in the form of a software product. Such a computer software product may be stored in a storage medium, such as a ROM/RAM, a disc, an optical disk, or the like and include several instructions that direct a computer-based apparatus (such as a personal computer, a cloud server, or a network device) to perform the methods as described in any embodiment or any part of an embodiment of the present invention.
[0100] The embodiments disclosed herein are described in a progressive sense, and therefore a part in one embodiment may having tis details complemented by the description for its counter parts in other embodiments. Every embodiment is such described that it only emphasizes what differentiates it from the other embodiments. Particularly, for a system or an embodiment directed to a system, the subject matter may be described in a simplified way as more details may be learned from the embodiment about its relevant method. The system and system embodiment disclosed herein are merely illustrative, in which a unit described as a separated part may be or may be not physically separated, and a part shown as a unit may be or may be not a physical unit, meaning that it may be located at one site or alternatively be distributed across multiple units in a network. The purpose of an embodiment may be realized using all or some of the described/shown modules according to practical needs. People skilled in the art would understand and implement the present invention without paying creative efforts.
[0101] The present invention has been described with reference to the preferred embodiments Date recue / Date received 2021-12-09 and it is understood that the embodiments are not intended to limit the scope of the present invention. Moreover, as the contents disclosed herein should be readily understood and can be implemented by a person skilled in the art, all equivalent changes or modifications which do not depart from the concept of the present invention should be encompassed by the appended claims.
Hence, the scope of the present invention shall only be defined by the appended claims.
Date recue / Date received 2021-12-09
Hence, the scope of the present invention shall only be defined by the appended claims.
Date recue / Date received 2021-12-09
Claims (10)
1. A log-based testing method, wherein comprising:
acquiring a target testing case that includes at least one testing scene, corresponding validation parameters, and predetermined testing parameters, wherein the target testing case is used to test a corresponding to-be-tested object;
configuring the to-be-tested object into a testing scene corresponding to the target testing case;
according to the predetermined testing parameters corresponding to the testing scene, generating and sending testing HTTP requests, for the testing scene to receive and process to generate corresponding request logs, wherein the testing HTTP requests are used to simulate operations of a user; and according to the corresponding validation parameters, validating the request logs, and according to validation results, determining whether there is any abnormality in the testing scene.
acquiring a target testing case that includes at least one testing scene, corresponding validation parameters, and predetermined testing parameters, wherein the target testing case is used to test a corresponding to-be-tested object;
configuring the to-be-tested object into a testing scene corresponding to the target testing case;
according to the predetermined testing parameters corresponding to the testing scene, generating and sending testing HTTP requests, for the testing scene to receive and process to generate corresponding request logs, wherein the testing HTTP requests are used to simulate operations of a user; and according to the corresponding validation parameters, validating the request logs, and according to validation results, determining whether there is any abnormality in the testing scene.
2. The log-based testing method of claim 1, wherein the predetermined testing parameters includes corresponding scene IDs, and the step of according to the predetermined testing parameters corresponding to the testing scene, generating and sending testing HTTP requests, for the testing scene to receive and process to generate corresponding request logs comprises:
monitoring the to-be-tested-object in a real-time manner, and when it is detected that the to-be-tested-object receives the testing http requests, according to the scene IDs included in the received testing HTTP request, distributing the received testing HTTP requests to the corresponding testing scenes, for the testing scene to receive and process to generate corresponding request logs.
Date recue / Date received 2021-12-09
monitoring the to-be-tested-object in a real-time manner, and when it is detected that the to-be-tested-object receives the testing http requests, according to the scene IDs included in the received testing HTTP request, distributing the received testing HTTP requests to the corresponding testing scenes, for the testing scene to receive and process to generate corresponding request logs.
Date recue / Date received 2021-12-09
3. The log-based testing method of claim 2, wherein the step of the testing scenes receiving and processing the testing HTTP requests to generate corresponding request log comprises:
publishing the generated request log to predetermined proxy objects;
and the step of according to the corresponding validation parameters, validating the request logs, and according to validation results, determining whether there is any abnormality in the testing scene comprises:
subscribing the request logs corresponding to the scene IDs, so as to acquire the request logs from the predetermined proxy objects and according to the validation parameters corresponding to the testing scenes validate the request logs.
publishing the generated request log to predetermined proxy objects;
and the step of according to the corresponding validation parameters, validating the request logs, and according to validation results, determining whether there is any abnormality in the testing scene comprises:
subscribing the request logs corresponding to the scene IDs, so as to acquire the request logs from the predetermined proxy objects and according to the validation parameters corresponding to the testing scenes validate the request logs.
4. The log-based testing method of any of claims 1 through 3, wherein the predetermined testing parameters includes corresponding testing access browsers.
5. The log-based testing method of any of claims 1 through 3, wherein the request log comprises generated fields and target parameters corresponding to each said field, and the step pf according to the corresponding validation parameters, validating the request logs, and according to validation results, determining whether there is any abnormality in the testing scene comprises:
when the target parameters corresponding to each said field are identical to the validation parameters corresponding to the field, determining that there is no abnormality.
when the target parameters corresponding to each said field are identical to the validation parameters corresponding to the field, determining that there is no abnormality.
6. The log-based testing method of any of claim 5, wherein further comprising:
when the target parameters corresponding to the field are different from the corresponding validation parameters, giving an alarm signal that includes target parameters different from the corresponding validation parameters and includes the corresponding fields.
Date recue / Date received 2021-12-09
when the target parameters corresponding to the field are different from the corresponding validation parameters, giving an alarm signal that includes target parameters different from the corresponding validation parameters and includes the corresponding fields.
Date recue / Date received 2021-12-09
7. A log-based testing apparatus, wherein comprising:
an acquiring module, for acquiring a target testing case that includes at least one testing scene, corresponding validation parameters, and predetermined testing parameters, wherein the target testing case is used to test a corresponding to-be-tested object;
a configuring module, for configuring the to-be-tested object into a testing scene corresponding to the target testing case;
a generating module, for according to the predetermined testing parameters corresponding to the testing scene, generating and sending testing HTTP requests, for the testing scene to receive and process to generate corresponding request logs, wherein the testing HTTP
requests are used to simulate operations of a user; and a validating module, for according to the corresponding validation parameters, validating the request logs, and according to validation results, determining whether there is any abnormality in the testing scene.
an acquiring module, for acquiring a target testing case that includes at least one testing scene, corresponding validation parameters, and predetermined testing parameters, wherein the target testing case is used to test a corresponding to-be-tested object;
a configuring module, for configuring the to-be-tested object into a testing scene corresponding to the target testing case;
a generating module, for according to the predetermined testing parameters corresponding to the testing scene, generating and sending testing HTTP requests, for the testing scene to receive and process to generate corresponding request logs, wherein the testing HTTP
requests are used to simulate operations of a user; and a validating module, for according to the corresponding validation parameters, validating the request logs, and according to validation results, determining whether there is any abnormality in the testing scene.
8. The log-based testing apparatus of claim 7, wherein the predetermined testing parameters includes corresponding scene IDs, and the generating module is further used to monitor the to-be-tested-object in a real-time manner, and when it is detected that the to-be-tested-object receives the testing http requests, according to the scene IDs included in the received testing HTTP request, to distribute the received testing HTTP requests to the corresponding testing scenes, for the testing scene to receive and process to generate corresponding request logs.
9. The log-based testing apparatus of claim 8, wherein the testing scene publishing the generated request log to predetermined proxy objects, and the validation module is further used to subscribe the request logs corresponding to the scene IDs, so as to acquire the request logs from the Date recue / Date received 2021-12-09 predetermined proxy objects and according to the validation parameters corresponding to the testing scenes validate the request logs.
10. A computer system, wherein comprising:
one or more processors; and a memory associated with the one or more processors, the memory being used to store program instructions, which when read and executed by the one or more processors, performing operations of:
acquiring a target testing case that includes at least one testing scene, corresponding validation parameters, and predetermined testing parameters, wherein the target testing case is used to test a corresponding to-be-tested object;
configuring the to-be-tested object into a testing scene corresponding to the target testing case;
according to the predetermined testing parameters corresponding to the testing scene, generating and sending testing HTTP requests, for the testing scene to receive and process to generate corresponding request logs, wherein the testing HTTP requests are used to simulate operations of a user; and according to the corresponding validation parameters, validating the request logs, and according to validation results, determining whether there is any abnormality in the testing scene.
Date recue / Date received 2021-12-09
one or more processors; and a memory associated with the one or more processors, the memory being used to store program instructions, which when read and executed by the one or more processors, performing operations of:
acquiring a target testing case that includes at least one testing scene, corresponding validation parameters, and predetermined testing parameters, wherein the target testing case is used to test a corresponding to-be-tested object;
configuring the to-be-tested object into a testing scene corresponding to the target testing case;
according to the predetermined testing parameters corresponding to the testing scene, generating and sending testing HTTP requests, for the testing scene to receive and process to generate corresponding request logs, wherein the testing HTTP requests are used to simulate operations of a user; and according to the corresponding validation parameters, validating the request logs, and according to validation results, determining whether there is any abnormality in the testing scene.
Date recue / Date received 2021-12-09
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202011448356.3A CN112905445B (en) | 2020-12-09 | 2020-12-09 | A log-based testing method, device and computer system |
| CN202011448356.3 | 2020-12-09 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CA3141546A1 true CA3141546A1 (en) | 2022-06-09 |
Family
ID=76111675
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CA3141546A Pending CA3141546A1 (en) | 2020-12-09 | 2021-12-09 | Log-based testing method, device, and computer system |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN112905445B (en) |
| CA (1) | CA3141546A1 (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115454800A (en) * | 2022-09-17 | 2022-12-09 | 北京百度网讯科技有限公司 | Log data verification method and device, electronic equipment, storage medium and product |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113568829A (en) * | 2021-07-05 | 2021-10-29 | Oppo广东移动通信有限公司 | A kind of field testing method and device, storage medium |
| CN114218106B (en) * | 2021-12-16 | 2024-12-20 | 建信金融科技有限责任公司 | System testing method and device |
Family Cites Families (10)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104111885B (en) * | 2013-04-22 | 2017-09-15 | 腾讯科技(深圳)有限公司 | The method of calibration and device of interface testing result |
| CN106021079B (en) * | 2016-05-06 | 2018-10-09 | 华南理工大学 | It is a kind of based on the Web application performance test methods for being frequently visited by the user series model |
| CN107562613B (en) * | 2016-06-30 | 2021-02-05 | 阿里巴巴集团控股有限公司 | Program testing method, device and system |
| CN108399114B (en) * | 2018-03-21 | 2021-02-02 | 财付通支付科技有限公司 | System performance testing method and device and storage medium |
| CN109800160B (en) * | 2018-12-27 | 2021-03-05 | 深圳云天励飞技术有限公司 | Cluster server fault testing method and related device in machine learning system |
| CN110362473B (en) * | 2019-05-31 | 2023-07-11 | 口口相传(北京)网络技术有限公司 | Method and device for optimizing test environment, storage medium, and terminal |
| CN110908920A (en) * | 2019-12-03 | 2020-03-24 | 浪潮商用机器有限公司 | An interface function testing method, device and related components |
| CN111666565A (en) * | 2020-06-22 | 2020-09-15 | 深圳壹账通智能科技有限公司 | Sandbox simulation test method and device, computer equipment and storage medium |
| CN111865726B (en) * | 2020-07-29 | 2022-03-08 | 中国工商银行股份有限公司 | Service message testing method, device, computer system and storage medium |
| CN112017723B (en) * | 2020-08-31 | 2022-11-15 | 深圳佰维存储科技股份有限公司 | Power failure test method and device for memory, readable storage medium and electronic equipment |
-
2020
- 2020-12-09 CN CN202011448356.3A patent/CN112905445B/en active Active
-
2021
- 2021-12-09 CA CA3141546A patent/CA3141546A1/en active Pending
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115454800A (en) * | 2022-09-17 | 2022-12-09 | 北京百度网讯科技有限公司 | Log data verification method and device, electronic equipment, storage medium and product |
Also Published As
| Publication number | Publication date |
|---|---|
| CN112905445A (en) | 2021-06-04 |
| CN112905445B (en) | 2024-08-27 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CA3141546A1 (en) | Log-based testing method, device, and computer system | |
| KR102158754B1 (en) | Method and apparatus for operating on smart network interface card | |
| US20140331209A1 (en) | Program Testing Service | |
| US8306805B2 (en) | Scenario generation method and scenario generation apparatus | |
| US20060288256A1 (en) | Stress testing a website having a backend application | |
| US9292423B1 (en) | Monitoring applications for compatibility issues | |
| TW201514686A (en) | Method and system for automated test and result comparison | |
| CN112732499B (en) | A testing method, device and computer system based on microservice architecture | |
| CN111767241A (en) | PCIe fault injection test method, device and storage medium | |
| CN105262608A (en) | Monitoring method and monitoring device for network service | |
| CN111078539A (en) | Test method, device, system and computer readable storage medium | |
| CN114168471A (en) | Test method, device, electronic equipment and storage medium | |
| JP6283096B2 (en) | Program test service | |
| CN109324968B (en) | System testing method and device | |
| US20140331205A1 (en) | Program Testing Service | |
| CN113362173A (en) | Anti-duplication mechanism verification method, anti-duplication mechanism verification system, electronic equipment and storage medium | |
| CN112084114B (en) | Method and apparatus for testing interfaces | |
| CN112445697B (en) | Method and apparatus for testing applications | |
| CN112882948A (en) | Stability testing method, device and system for application and storage medium | |
| CN115190293B (en) | A dialing test method, device, electronic equipment and computer storage medium | |
| CN110851688A (en) | Page request method, device and equipment | |
| CN115509918A (en) | Software testing method and device, electronic equipment and storage medium | |
| JP2953946B2 (en) | Test processing system | |
| CN112650679B (en) | Test verification method, device and computer system | |
| CN111708684B (en) | Method, device and computer system for recording page access |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| EEER | Examination request |
Effective date: 20220916 |
|
| EEER | Examination request |
Effective date: 20220916 |
|
| EEER | Examination request |
Effective date: 20220916 |
|
| EEER | Examination request |
Effective date: 20220916 |
|
| EEER | Examination request |
Effective date: 20220916 |