Business system testing method and apparatus

CN116257432BActive Publication Date: 2026-09-18JD DIGITS HAIYI INFORMATION TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211653188.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-21
Publication Date
2026-09-18
Estimated Expiration
2042-12-21

AI Technical Summary

Technical Problem

[0004]随着App的页面不断增多,人工验证无法做到对所有页面进行功能测试,且对于肉眼无法看到的服务下发的埋点,跳转等内容无法直接感知,需要根据网关下发的数据进行对比验证,测试效率低且浪费人力资源

Benefits of technology

[0021] According to another aspect of the present invention, a computer-readable medium is provided having a computer program stored thereon, which, when executed by a processor, implements the business system testing method provided in the embodiments of the present invention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116257432B_ABST
    Figure CN116257432B_ABST
Patent Text Reader

Abstract

The application discloses a kind of business system test method and device, it is related to computer technical field.The specific embodiment of the method includes: according to the access data of interface of online business system, the access amount of each page corresponding to interface is obtained;According to access amount, the page needing comparison is determined;By simulating request to the interface of test business system, to generate the test response content of the page;The test response content of the page and online response content are compared to carry out business system test, and online response content is generated by request to the interface of online business system.The embodiment reaches the effect of quickly carrying out business system test, saves human resources, and can verify to the content such as point of interest under the service issue that the naked eye cannot see, jump, etc., and test is more comprehensive.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to a method and apparatus for testing business systems. Background Technology

[0002] Each time an application (App) server releases a new feature, regression testing is required to validate the content distributed by the server. Currently, regression testing is performed by manually opening the App and interacting with the pages.

[0003] In the process of realizing this invention, the inventors discovered at least the following problems in the prior art:

[0004] As the number of pages in an app continues to increase, manual verification cannot perform functional testing on all pages. Furthermore, it is impossible to directly perceive service delivery tracking points, redirects, and other content that are not visible to the naked eye. Verification requires comparison based on data delivered by the gateway, resulting in low testing efficiency and a waste of human resources. Summary of the Invention

[0005] In view of this, embodiments of the present invention provide a business system testing method and apparatus, which can achieve the effect of rapid business system testing, save human resources, and can verify service delivery tracking points, redirects, and other content that are invisible to the naked eye, making the testing more comprehensive.

[0006] To achieve the above objectives, according to one aspect of the present invention, a business system testing method is provided, comprising: obtaining the access volume of each page corresponding to the interface based on the interface access data of the online business system; determining the pages to be compared based on the access volume; generating test response content of the pages by simulating requests to the interface of the test business system; and comparing the test response content of the pages with the online response content to perform business system testing, wherein the online response content is generated by requesting the interface of the online business system.

[0007] Optionally, determining the pages to be compared based on the access volume includes: sorting the pages corresponding to the interface from largest to smallest according to the access volume; and determining the pages to be compared according to the sorting result.

[0008] Optionally, comparing the test response content and the online response content of the page to conduct business system testing includes: comparing the test response content and the online response content of the page; if the test response content and the online response content are completely consistent, the business system test passes; if there is inconsistency between the test response content and the online response content, the inconsistent content is marked, and the business system test result is determined based on the inconsistent content.

[0009] Optionally, determining the business system test result based on the inconsistency includes: if the inconsistency is caused by functional improvements to the interface, the business system test passes; if the inconsistency is caused by code errors, the business system test fails.

[0010] Optionally, comparing the test response content and the online response content of the page includes: comparing the test response content and the online response content of the page by field name and field value one by one.

[0011] Optionally, before comparing the test response content and the online response content of the page, the method further includes deleting specified fields in the test response content of the page.

[0012] Optionally, before obtaining the access volume of each page corresponding to the interface based on the interface access data of the online business system, the method further includes: setting a scheduled task to poll and obtain the interface access data of the online business system, and storing the interface access data.

[0013] Optionally, storing the interface access data includes: searching the database for interface access data corresponding to a page based on the interface identifier and the page identifier; if the database contains interface access data corresponding to a page, updating the interface access data in the database based on the acquired interface access data and the interface access data in the database; if the database does not contain interface access data corresponding to a page, storing the interface access data in the database.

[0014] Optionally, updating the interface access data in the database based on the acquired interface access data and the interface access data in the database includes: if the access volume of the corresponding page in the acquired interface access data is greater than the access volume of the corresponding page in the interface access data in the database, updating the access volume of the corresponding page in the interface access data in the database using the access volume of the corresponding page in the acquired interface access data.

[0015] According to another aspect of the present invention, a business system testing apparatus is provided, comprising:

[0016] The traffic acquisition module is used to obtain the traffic of each page corresponding to the interface based on the interface access data of the online business system.

[0017] The comparison page determination module is used to determine the pages that need to be compared based on the number of visits.

[0018] The test response content generation module is used to generate the test response content of the page by simulating requests to the interface of the test business system.

[0019] The page response content comparison module is used to compare the test response content of the page with the online response content for business system testing. The online response content is generated by requesting the interface of the online business system.

[0020] According to another aspect of the present invention, a business system testing electronic device is provided, comprising: one or more processors; and a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the business system testing method provided in the embodiments of the present invention.

[0021] According to another aspect of the present invention, a computer-readable medium is provided having a computer program stored thereon, which, when executed by a processor, implements the business system testing method provided in the embodiments of the present invention.

[0022] One embodiment of the above invention has the following advantages or beneficial effects: It obtains the access volume of each page corresponding to the interface based on the interface access data of the online business system; determines the page to be compared based on the access volume; generates the test response content of the page by simulating requests to the interface of the test business system; and compares the test response content of the page with the online response content to conduct business system testing. This technical solution realizes the determination of the page to be compared based on the access volume of each page corresponding to the interface, and conducts business system testing by comparing the test response content of the page with the online response content. It can select pages with traffic as comparison objects based on the access volume of pages corresponding to each interface of the business system. By obtaining the page response data of the online business system and the page response data generated by simulating requests to the test business system, and automatically comparing these two page response data, it conducts business system testing to verify whether there are differences and analyze the reasons for the differences. This achieves the effect of rapid business system testing, saves human resources, and can verify service delivery tracking points, redirects, and other content that are invisible to the naked eye, making the testing more comprehensive.

[0023] The further effects of the aforementioned unconventional alternative methods will be explained below in conjunction with specific implementation methods. Attached Figure Description

[0024] The accompanying drawings are provided to better understand the invention and are not intended to unduly limit the scope of the invention. Wherein:

[0025] Figure 1This is a schematic diagram illustrating the main steps of a business system testing method according to an embodiment of the present invention;

[0026] Figure 2 This is a schematic diagram of the data storage process for interface access according to an embodiment of the present invention;

[0027] Figure 3 This is a schematic diagram illustrating the implementation process of page comparison and verification according to an embodiment of the present invention;

[0028] Figure 4 This is a test system architecture diagram according to an embodiment of the present invention;

[0029] Figure 5 This is a schematic diagram of the main modules of a business system testing device according to an embodiment of the present invention;

[0030] Figure 6 This is an exemplary system architecture diagram in which embodiments of the present invention can be applied;

[0031] Figure 7 This is a schematic diagram of the structure of a computer system suitable for implementing terminal devices or servers of the present invention. Detailed Implementation

[0032] The following description, in conjunction with the accompanying drawings, illustrates exemplary embodiments of the present invention, including various details to aid understanding. These details should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the invention. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.

[0033] The acquisition, storage, use, and processing of data in the technical solution of this invention all comply with the relevant provisions of national laws and regulations.

[0034] To address the technical problems existing in the prior art, this invention provides a business system testing method. This method selects pages with traffic as comparison objects based on the page access volume corresponding to each interface of the business system. It acquires page response data from the online business system and page response data generated by simulating requests to the test business system, and automatically compares these two sets of page response data to perform business system testing. This verifies whether there are discrepancies and analyzes the reasons for such discrepancies, thereby achieving rapid business system testing, saving manpower, and verifying service delivery tracking points and redirects that are invisible to the naked eye, resulting in more comprehensive testing.

[0035] Figure 1 This is a schematic diagram illustrating the main steps of a business system testing method according to an embodiment of the present invention. Figure 1As shown, the business system testing method of this embodiment mainly includes the following steps S101 to S104.

[0036] Step S101: Obtain the access volume of each page corresponding to the interface based on the interface access data of the online business system. According to an embodiment of the present invention, by connecting the application real-time monitoring system with the interface of the online business system and maintaining the interface information in the real-time monitoring system, the application real-time monitoring system can be used to monitor each interface of the business system to obtain the interface access data of each interface, and thus obtain access data such as the access volume of each page corresponding to each interface. The interface access data is not limited to the interface request parameters and the access volume (tps) of each page corresponding to the interface, but can also include the number of requests processed per second, the response time of each request and the average response time, the application's success rate, failure rate, and exception rate in responding to requests, etc. In the real-time monitoring system, business fields corresponding to each interface can be configured, and these interfaces can be maintained through a data dictionary. The data dictionary is a collection of information describing data, a collection of definitions for all data elements used in the system, mainly storing key-value data structures, and also having the ability to store other extended information.

[0037] In embodiments of the present invention, the online business system refers to the older version of the business system running online, while the test business system refers to the new version of the business system that has undergone functional updates but has not yet been launched. Business system testing involves testing the test business system. This testing requires testing each interface within the business system. Therefore, it is necessary to obtain the access volume of each page corresponding to each interface based on the interface access data of the online business system. Subsequently, each interface of the business system can be tested based on the access volume, thereby achieving the purpose of testing the business system.

[0038] Step S102: Determine the pages to be compared based on the access volume. Access volume directly reflects the importance or frequency of access to each page corresponding to the API. Therefore, the pages to be compared can be selected sequentially based on the access volume of each page corresponding to the API.

[0039] According to one embodiment of the present invention, when determining the pages to be compared based on access volume, the pages corresponding to the interface can be sorted from highest to lowest access volume; the pages to be compared are then determined according to the sorting result. Specifically, pages with high access volume can be preferentially selected for comparison.

[0040] Step S103: Generate the test response content for this page by simulating requests to the interface of the test business system. Based on the request parameters of the interface recorded in the application real-time monitoring system, simulated request parameters can be generated and simulated requests can be made to the interface of the test business system. The response content returned by the test business system is then used as the test response content for this page.

[0041] In embodiments of the present invention, the test business system is typically deployed on a gray-scale machine for testing, and client users cannot directly access it. Once the deployment logs confirm that the test business system has been deployed, simulation testing can be performed on it.

[0042] Step S104: Compare the test response content of this page with the online response content to conduct business system testing. The online response content is generated by requesting the interface of the online business system. By comparing the test response content of this page with the online response content, it can be determined whether the content is consistent, and the reasons can be analyzed based on the comparison results to conduct business system testing.

[0043] According to one embodiment of the present invention, comparing the test response content and the online response content of the page to conduct business system testing may specifically include: comparing the test response content and the online response content of the page; if the test response content and the online response content are completely consistent, the business system test passes; if there is inconsistency between the test response content and the online response content, the inconsistent content is marked, and the business system test result is determined based on the inconsistent content.

[0044] Specifically, in embodiments of the present invention, determining the business system test result based on the inconsistency may include: if the inconsistency is caused by functional improvements to the interface, the business system test passes; if the inconsistency is caused by code errors, the business system test fails. If the inconsistency is caused by code corresponding to functional improvements to the interface, it indicates that the inconsistency is normal, no code modification is required, and the business system test passes; if the inconsistency is caused by code errors, the code should be modified to overcome the errors, and the test should be repeated until it passes.

[0045] According to one embodiment of the present invention, comparing the test response content and the online response content of the page may specifically include: comparing the test response content and the online response content of the page by comparing the field names and field values ​​one by one.

[0046] In other embodiments, before comparing the test response content and the online response content of the page, specific fields in the test response content can be deleted. For example, a whitelist can be set to mark specific fields that do not need to be compared or that users do not need to focus on, and these specified fields can be deleted from the test response content of the page to better reflect the comparison results of fields that users are focused on. For content that does not match, it can be marked by highlighting the content, such as by using a prominent color or highlighting it with a different background color, etc.

[0047] According to one embodiment of the present invention, before obtaining the access volume of each page corresponding to an interface based on the interface access data of the online business system, a scheduled task can be set to poll and obtain the interface access data of the online business system, and the interface access data can be stored. Specifically, when monitoring the interfaces of the online business system through an application real-time monitoring system, a scheduled polling can be set to obtain data such as the access volume of each page corresponding to the interface. The interface access data records the correspondence between the interface identifier, the page identifier, and the access volume. For each interface, the application real-time monitoring system has a corresponding monitoring identifier, and the corresponding monitored interface identifier can be found based on the monitoring identifier.

[0048] According to one embodiment of the present invention, storing the interface access data may specifically include: searching the database for interface access data corresponding to a page based on the interface identifier and the page identifier; if the database contains interface access data corresponding to a page, updating the interface access data in the database based on the acquired interface access data and the interface access data in the database; if the database does not contain interface access data corresponding to a page, storing the interface access data in the database. Generally, the data stored in the database is stored daily. Therefore, when storing data, it can be first determined whether there is interface access data corresponding to a page in the database for that day. If not, the interface access data is stored directly; if so, it is further determined whether data updating is necessary.

[0049] Specifically, when updating the interface access data in the database based on the acquired interface access data and the interface access data in the database, the process may include: if the access volume of the corresponding page in the acquired interface access data is greater than the access volume of the corresponding page in the interface access data in the database, then the access volume of the corresponding page in the acquired interface access data is used to update the access volume of the corresponding page in the interface access data in the database. Conversely, if the access volume of the corresponding page in the acquired interface access data is not greater than the access volume of the corresponding page in the interface access data in the database, then there is no need to update the access volume of the corresponding page in the interface access data in the database.

[0050] Figure 2 This is a schematic diagram of the data storage process for interface access according to an embodiment of the present invention. Figure 2 As shown, according to the set scheduled task, interface access data is periodically retrieved from the application real-time monitoring system. This data includes interface identifiers, page identifiers, and the corresponding page views (TPS). Each retrieved data entry is compared with data in the database. First, it checks if the database contains the corresponding interface access data for that page. If not, the retrieved data is saved to the database. If it does, it checks if the page views in the retrieved data are greater than those in the database. If so, the retrieved data is used to update the page views in the database. Otherwise, no processing is required, and the retrieved data entry is discarded.

[0051] Figure 3 This is a schematic diagram illustrating the implementation process of page comparison and verification according to an embodiment of the present invention. Figure 3 As shown, in an embodiment of the present invention, firstly, a test business system is deployed on a gray-scale machine; then, interface access data is acquired to obtain the page identifiers corresponding to all interfaces with access volume, and the pages to be compared are determined based on the access volume, which can be a batch comparison or an individual comparison. Simulated requests are made to the corresponding interfaces of the test business system to obtain the test response data of the pages. Then, the online response data returned by the corresponding interfaces of the online business system is acquired, and the test response data and the online response data are compared, marking any inconsistencies. For each page with marked inconsistencies, it is determined whether they are due to the current functional improvement. If so, the verification passes and no processing is required; otherwise, the code is checked and errors are fixed. Then, the test business system is updated according to the fixed code, and a test request is initiated again until the verification passes. If all pages corresponding to the interface pass the verification, the interface passes the verification; if all interfaces included in the test business system pass the verification, the test business system passes the test.

[0052] Figure 4 This is a test system architecture diagram according to an embodiment of the present invention. Figure 4 As shown, the test system of this invention mainly includes several parts: an online business system, a test business system, an application real-time monitoring system, a timed data acquisition and storage module, a data comparison and verification module, and a database. The online business system runs an older version of the business system, including functional modules such as a homepage, header card, navigation, menu bar, pop-ups, and splash screen. The test business system runs the version of the business system to be tested, containing the same functional modules as the online business system, but with some modules added or removed. The application real-time monitoring system monitors the interfaces of the online business system. It pre-stores interface business field definitions and monitors interface call data by configuring a monitoring identifier for each interface to obtain interface access data such as the number of visits to each page of the interface. The timed data acquisition and storage module, according to a set timed task, polls the application real-time monitoring system to obtain interface access data, performs data cleaning and transformation, and then stores the interface access data in the database. The data comparison and verification module is used to retrieve interface access data from the database and obtain the access volume of each page corresponding to the interface. Then, it determines the page to be compared, performs simulation tests on the test business system to obtain the test response data of the page, compares it with the online response data of the page, and determines the system test result based on the comparison results.

[0053] Figure 5 This is a schematic diagram of the main modules of a business system testing apparatus according to an embodiment of the present invention. Figure 5 As shown, the business system testing device 500 of this embodiment mainly includes:

[0054] The access volume acquisition module 501 is used to obtain the access volume of each page corresponding to the interface based on the interface access data of the online business system.

[0055] The comparison page determination module 502 is used to determine the pages that need to be compared based on the number of visits;

[0056] The test response content generation module 503 is used to generate the test response content of the page by simulating requests to the interface of the test business system.

[0057] The page response content comparison module 504 is used to compare the test response content of the page with the online response content for business system testing. The online response content is generated by requesting the interface of the online business system.

[0058] According to an embodiment of the present invention, the comparison page determination module 502 can also be used to: sort the pages corresponding to the interface from largest to smallest according to the number of visits; and determine the pages to be compared according to the sorting result.

[0059] According to another embodiment of the present invention, the page response content comparison module 504 can also be used to: compare the test response content and the online response content of the page; if the test response content and the online response content are completely consistent, the business system test passes; if there is inconsistency between the test response content and the online response content, mark the inconsistent content, and determine the business system test result based on the inconsistent content.

[0060] According to another embodiment of the present invention, when determining the test result of the business system based on the inconsistency content, the page response content comparison module 504 can also be used to: pass the test if the inconsistency content is caused by the functional improvement of the interface; and fail the test if the inconsistency content is caused by a code error.

[0061] According to another embodiment of the present invention, the page response content comparison module 504 can also be used to: compare the test response content and the online response content of the page according to the field name and field value one by one.

[0062] According to another embodiment of the present invention, the page response content comparison module 504 can also be used to: delete specified fields in the test response content of the page before comparing the test response content and the online response content of the page.

[0063] According to another embodiment of the present invention, the business system testing device 500 may further include an interface access data acquisition module (not shown in the figure), which is used to: before obtaining the access volume of each page corresponding to the interface based on the interface access data of the online business system, poll and acquire the interface access data of the online business system by setting a timed task, and store the interface access data.

[0064] According to another embodiment of the present invention, the interface access data acquisition module (not shown in the figure) can also be used to: search the database for interface access data corresponding to a page based on the interface identifier and the page identifier; if the database contains interface access data corresponding to a page, update the interface access data in the database based on the acquired interface access data and the interface access data in the database; if the database does not contain interface access data corresponding to a page, store the interface access data in the database.

[0065] According to another embodiment of the present invention, the interface access data acquisition module (not shown in the figure) can also be used to: update the access volume of the corresponding page in the interface access data in the database using the access volume of the corresponding page in the acquired interface access data when the access volume of the corresponding page in the acquired interface access data is greater than the access volume of the corresponding page in the interface access data in the database.

[0066] According to the technical solution of this invention, the access volume of each page corresponding to the interface is obtained based on the access data of the online business system; the page to be compared is determined based on the access volume; a test response content for the page is generated by simulating a request to the interface of the test business system; and the test response content of the page is compared with the online response content to conduct business system testing. This technical solution realizes the determination of the page to be compared based on the access volume of each page corresponding to the interface, and the comparison of the test response content of the page with the online response content to conduct business system testing. It can select pages with traffic as comparison objects based on the access volume of each page corresponding to the interface of the business system. By obtaining the page response data of the online business system and the page response data generated by simulating a request to the test business system, and automatically comparing the two page response data, business system testing is conducted to verify whether there are differences and to analyze the reasons for the differences. This achieves the effect of rapid business system testing, saves human resources, and can verify service delivery tracking points, redirects, and other content that cannot be seen by the naked eye, making the testing more comprehensive.

[0067] Figure 6 An exemplary system architecture 600 is shown that can be applied to the business system testing method or business system testing apparatus of the present invention.

[0068] like Figure 6 As shown, system architecture 600 may include terminal devices 601, 602, and 603, a network 604, and a server 605. Network 604 serves as the medium for providing communication links between terminal devices 601, 602, and 603 and server 605. Network 604 may include various connection types, such as wired or wireless communication links or fiber optic cables, etc.

[0069] Users can use terminal devices 601, 602, and 603 to interact with server 605 via network 604 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 601, 602, and 603, such as shopping applications, web browser applications, search applications, business system testing tools, etc. (for example only).

[0070] Terminal devices 601, 602, and 603 can be various electronic devices with displays and web browsing capabilities, including but not limited to smartphones, tablets, laptops, and desktop computers.

[0071] Server 605 can be a server providing various services, such as a backend management server (for example only) that supports requests received by users using terminal devices 601, 602, and 603. The backend management server can process received business system test requests and other data by: obtaining the access volume of each page corresponding to the interface based on the interface access data of the online business system; determining the pages to be compared based on the access volume; generating test response content for the pages by simulating requests to the interfaces of the test business system; comparing the test response content of the pages with the online response content; and feeding back the processing results (e.g., comparison results – for example only) to the terminal devices.

[0072] It should be noted that the business system testing method provided in this embodiment of the invention is generally executed by server 605, and correspondingly, the business system testing device is generally set in server 605.

[0073] It should be understood that Figure 6 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.

[0074] The following is for reference. Figure 7 It shows a schematic diagram of the structure of a computer system 700 suitable for implementing terminal devices or servers of the present invention. Figure 7 The terminal device or server shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of the present invention.

[0075] like Figure 7 As shown, the computer system 700 includes a central processing unit (CPU) 701, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 702 or programs loaded from storage section 708 into random access memory (RAM) 703. The RAM 703 also stores various programs and data required for the operation of the system 700. The CPU 701, ROM 702, and RAM 703 are interconnected via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0076] The following components are connected to the I / O interface 705: an input section 706 including a keyboard, mouse, etc.; an output section 707 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 710 as needed so that computer programs read from it can be installed into the storage section 708 as needed.

[0077] In particular, according to the embodiments disclosed in this invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 709, and / or installed from removable medium 711. When the computer program is executed by central processing unit (CPU) 701, it performs the functions defined above in the system of this invention.

[0078] It should be noted that the computer-readable medium shown in this invention can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this invention, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.

[0079] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0080] The units or modules described in the embodiments of the present invention can be implemented in software or hardware. The described units or modules can also be housed in a processor; for example, a processor can be described as including a traffic acquisition module, a comparison page determination module, a test response content generation module, and a page response content comparison module. The names of these units or modules do not necessarily limit the specific unit or module itself; for example, the traffic acquisition module can also be described as "a module for obtaining the traffic volume of each page corresponding to an interface based on the interface access data of an online business system."

[0081] In another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiments; or it may exist independently and not assembled into the device. The computer-readable medium carries one or more programs, which, when executed by the device, cause the device to include: obtaining the access volume of each page corresponding to an interface based on interface access data of an online business system; determining the pages to be compared based on the access volume; generating test response content for the pages by simulating requests to the interface of the test business system; and comparing the test response content of the pages with online response content to perform business system testing, wherein the online response content is generated by requesting the interface of the online business system.

[0082] According to the technical solution of this invention, the access volume of each page corresponding to the interface is obtained based on the access data of the online business system; the page to be compared is determined based on the access volume; a test response content for the page is generated by simulating a request to the interface of the test business system; and the test response content of the page is compared with the online response content to conduct business system testing. This technical solution realizes the determination of the page to be compared based on the access volume of each page corresponding to the interface, and the comparison of the test response content of the page with the online response content to conduct business system testing. It can select pages with traffic as comparison objects based on the access volume of each page corresponding to the interface of the business system. By obtaining the page response data of the online business system and the page response data generated by simulating a request to the test business system, and automatically comparing the two page response data, business system testing is conducted to verify whether there are differences and to analyze the reasons for the differences. This achieves the effect of rapid business system testing, saves human resources, and can verify service delivery tracking points, redirects, and other content that cannot be seen by the naked eye, making the testing more comprehensive.

[0083] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can occur depending on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A business system testing method characterized by, include: The application real-time monitoring system listens to the interfaces of the online business system to obtain the access volume of each page corresponding to the interface based on the obtained interface access data. The pages that need to be compared are determined based on the number of visits. Based on the request parameters of the interface recorded in the application real-time monitoring system, simulated request parameters are generated, and simulated requests are made to the interface of the test business system to generate the test response content of the page. The test response content of the page is compared with the online response content to conduct business system testing. The online response content is generated by requesting the interface of the online business system. The process of comparing the test response content and the online response content of the page to conduct business system testing includes: comparing the test response content and the online response content of the page; if the test response content and the online response content are completely consistent, the business system test passes; if the test response content and the online response content have inconsistencies, the inconsistencies are marked; if the inconsistencies are caused by functional improvements to the interface, the business system test passes; if the inconsistencies are caused by code errors, the business system test fails.

2. The method of claim 1, wherein, The pages that need to be compared based on the access volume include: The pages corresponding to the interface are sorted from highest to lowest based on the number of visits. The pages to be compared are determined based on the sorting results.

3. The method of any one of claims 1 to 2, wherein, The test response content and the online response content of the page are compared, including: The test response content and the online response content of the page are compared field by field, one by one, by field name and field value.

4. The method according to claim 3, characterized in that, Before comparing the test response content and the online response content of the page, the process also includes: Delete the specified field in the test response content of the page.

5. The method according to claim 1, characterized in that, Before obtaining the page views corresponding to each interface based on the interface access data of the online business system, the following steps are also included: By setting up a scheduled task, the interface access data of the online business system is obtained in a polling manner, and the interface access data is stored.

6. The method according to claim 5, characterized in that, Storing the interface access data includes: Based on the interface identifier and page identifier, check if there is corresponding interface access data for the page in the database; If there is corresponding page interface access data in the database, update the interface access data in the database according to the obtained interface access data and the interface access data in the database. If there is no corresponding page for the interface access data in the database, the interface access data will be stored in the database.

7. The method according to claim 6, characterized in that, Updating the interface access data in the database based on the acquired interface access data and the interface access data in the database includes: If the access count of the corresponding page in the obtained interface access data is greater than the access count of the corresponding page in the interface access data in the database, the access count of the corresponding page in the obtained interface access data is used to update the access count of the corresponding page in the interface access data in the database.

8. A business system testing device, characterized in that, include: The access volume acquisition module is used to listen to the interfaces of the online business system according to the application real-time monitoring system, so as to obtain the access volume of each page corresponding to the interface based on the acquired interface access data. The comparison page determination module is used to determine the pages that need to be compared based on the number of visits. The test response content generation module is used to generate simulated request parameters based on the request parameters of the interface recorded in the application real-time monitoring system, and to make simulated requests to the interface of the test business system to generate the test response content of the page. The page response content comparison module is used to compare the test response content of the page with the online response content for business system testing. The online response content is generated by requesting the interface of the online business system. The page response content comparison module is also used to: compare the test response content and the online response content of the page; if the test response content and the online response content are completely consistent, the business system passes the test; if there is inconsistency between the test response content and the online response content, mark the inconsistent content. If the inconsistency is caused by functional improvements to the interface, the business system passes the test. If the inconsistency is caused by a code error, the business system test fails.

9. An electronic device for testing business systems, characterized in that, include: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-7.

10. A computer-readable medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Admission test case determination method, system, electronic equipment and storage medium

    CN112559321A

  • Method and device for performing interface regression test based on online log

    CN112860538A