Method, device and electronic device for testing search function of application

By synchronizing the data of the test environment to the database of the production environment and using the search engine system of the production environment for cross-domain access, the problem of high cost of search function testing and limited functions in the test environment is solved, and more complete and accurate search logic is achieved. test.

CN115017044BActive Publication Date: 2025-01-17ALIBABA (CHINA) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210618365.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-01
Publication Date
2025-01-17
Estimated Expiration
2042-06-01

AI Technical Summary

Technical Problem

When testing the application's search function in a test environment, it is difficult for the existing technology to achieve cost-effective complete testing, and the simplified version of the search engine system has limited functions and cannot meet complex search statistics, sorting and recommendation requirements.

Method used

By synchronizing the data in the source data table related to the target application in the test environment's database to the online production environment's database and processing the data tables available for the target search engine system, the search engine system in the production environment is used for the use of the search engine system in the production environment. Cross-domain access to enable search function testing.

Benefits of technology

It realizes more complete and accurate search logic testing at a lower cost in the test environment, avoiding the high cost of deploying search engine systems separately, and at the same time, using the search engine systems in the production environment to provide more complete functional support.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115017044B_ABST
    Figure CN115017044B_ABST
Patent Text Reader

Abstract

The embodiment of the present application discloses a method, device and electronic device for testing the search function of an application, the method comprising: determining a target application that needs to be tested in a test environment; if the target application includes a search function, determining a source data table related to the target application in the database of the test environment; synchronizing the data in the source data table to the database of the online production environment, and processing it into a target data table available to the target search engine system; when testing the search function of the target application in the test environment, sending a search request by cross-domain access to the target search engine system in the test environment, so that the search engine system returns search results by retrieving the target data table. Through the embodiment of the present application, a more complete test of the search function of an application can be achieved in a test environment at a lower cost.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of application testing technology, and in particular to a method, device and electronic device for performing search function testing on an application. Background Art

[0002] For a software application product (including application programs or web pages, etc.), testing is required from the completion of development to the official release to users. Usually, a specific development platform can provide a test environment for software application products. In this test environment, the functions of the application can be tested by constructing some virtual data (for example, virtual user accounts, virtual goods, amounts, etc.). Since the test environment does not involve real online data, it has relatively high security. If some defects are found, they can be adjusted in time and retested before being released online.

[0003] Among them, many applications to be tested may involve search functions. For some group developers, multiple different product lines may develop multiple different applications, but they can rely on the same underlying search engine. They only need to modify the upper-level search logic according to the scenario requirements of the specific application to achieve the search function that adapts to the specific application scenario requirements. For example, an application is focused on providing travel services, and another application is focused on providing cross-border commodity information services. Both applications require search functions, and both can use the same underlying search engine, but they differ in the upper-level search logic. However, after an application is developed, it may be necessary to test the search function. The test objectives may include: according to the specific upper-level search logic, whether the search engine system can normally return the required search results, or whether the search engine system can normally go through the subsequent processing logic after returning the search results, for example, after searching for a specific commodity, whether the order operation can be performed normally, etc.

[0004] However, the test environment and the production (online) environment are usually isolated from each other and belong to different networks. Therefore, the test environment cannot directly use the search engine system in the production environment to test specific applications. The test environment usually does not have a dedicated search engine system. Although you can consider building a search engine environment specifically for the test environment, the cost will be very high (hundreds of physical machines are required to support the search service of a single application). The amount of data required for offline testing is very small compared to the online data in the production environment. Therefore, the machine load rate will be very low, so it is not economical to build a search engine environment for the test environment alone.

[0005] In order to be able to test the search function of a specific application in a test environment, one solution in the prior art is to provide a simplified search engine system for the test environment. The specific application to be tested can build specific data into this search engine, and send the specific search request to this simplified search engine for processing and testing the search results. However, this simplified search engine has independent data analysis and data rules. The data needs to be processed according to the rules before it can be built into this search engine, which is relatively costly. In addition, this simplified search engine usually implements basic search functions, but does not support search statistics, search sorting, search customization, recommendations and other functions. Therefore, there may be situations where the test objectives cannot be achieved. Summary of the invention

[0006] The present application provides a method, device and electronic device for testing the search function of an application, which can achieve more complete testing of the search function of an application in a test environment at a lower cost.

[0007] This application provides the following solutions:

[0008] A method for testing a search function of an application, comprising:

[0009] Identify the target applications that need to be tested in the test environment;

[0010] If the target application includes a search function, determining a source data table related to the target application in a database of the test environment;

[0011] Synchronize the data in the source data table to the database of the online production environment, and process it into a target data table that can be used by the target search engine system;

[0012] When testing the search function of the target application in the test environment, a search request is sent by cross-domain access to the target search engine system in the test environment, so that the search engine system returns search results by retrieving the target data table, so as to test the search function in the target application based on the search results.

[0013] A device for testing a search function of an application, comprising:

[0014] An application determination unit, used for determining a target application that needs to be tested in a test environment;

[0015] a source data table determining unit, configured to determine a source data table related to the target application in a database of the test environment if the target application includes a search function;

[0016] A data synchronization unit, used to synchronize the data in the source data table to the database of the online production environment, and process the data into a target data table available to the target search engine system;

[0017] A cross-domain request unit is used to send a search request by cross-domain access to the target search engine system in the test environment when testing the search function of the target application in the test environment, so that the search engine system returns the search result by retrieving the target data table, so as to test the search function in the target application based on the search result.

[0018] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of any of the methods described above.

[0019] An electronic device, comprising:

[0020] one or more processors; and

[0021] A memory associated with the one or more processors, the memory being used to store program instructions, wherein the program instructions, when read and executed by the one or more processors, execute the steps of any of the methods described above.

[0022] According to the specific embodiments provided in this application, this application discloses the following technical effects:

[0023] Through the embodiment of the present application, for the target application that needs to be tested in the test environment, if the search logic needs to be tested, the data in the source data table related to the target application in the database of the test environment can be synchronized to the database of the online production environment, and processed as a target data table available to the search engine system in the production environment. In this way, when the search function of the target application is tested in the test environment, a search request can be sent by cross-domain access to the search engine system in the test environment, so that the search engine system returns the search results by retrieving the target data table, so as to test the search function in the target application based on the search results. In this way, there is no need to deploy a search engine system separately for the test environment, so that the search logic of the application can be tested in the test environment at a lower cost; in addition, since the search engine system in the production environment is used to complete the test process, and this search engine has relatively complete functions, a more complete and accurate test can be achieved for the search logic in the application. At the same time, since the specific test process is carried out in the test environment, if a defect is found during the test process, the modification of the application-related code can still be achieved in the test environment at a lower cost.

[0024] Among them, in order to synchronize the data in the source data table related to the target application in the database of the test environment to the database of the online production environment, it can be achieved in a full + incremental manner. For the historical stock data in the source data table in the test environment database, it can be synchronized to the open data processing service system of the production environment through an offline synchronization tool; for incremental data, it can be monitored through a data change monitoring tool and sent to the message middleware system in the production environment through a message. Afterwards, the offline data processing system corresponding to the search engine system can merge the synchronized full data and incremental data, and process them into a target data table available to the search engine.

[0025] In order to avoid interfering with the search engine system of the production system, this can be achieved through the search engine system in the pre-release system, so that the search requests initiated by the application in the test environment can be responded to by the independent server cluster corresponding to the pre-release environment.

[0026] Of course, any product implementing the present application does not necessarily need to achieve all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0028] Figure 1 It is a schematic diagram of the system architecture provided by the embodiment of the present application;

[0029] Figure 2 is a flow chart of the method provided in the embodiment of the present application;

[0030] Figure 3 is a schematic diagram of the interaction process provided by the embodiment of the present application;

[0031] Figure 4 is a schematic diagram of a device provided in an embodiment of the present application;

[0032] Figure 5 It is a schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0033] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.

[0034] In order to facilitate understanding of the technical solutions provided by the embodiments of the present application, some basic concepts are first briefly introduced below.

[0035] From development to user use, an application involves multiple environments, such as development environment, test environment, pre-release environment, and production environment. The development environment is the environment used when developing the application. Each developer can work on his or her own code branch. Before testing or when the development reaches a certain level, the developers can merge the code and conduct joint debugging.

[0036] The test environment is used to test the application. It can be deployed by testers to test the application, fix defects, release updates, etc. The test environment is an offline environment that can construct some virtual data to test whether the various functions in the application can be used normally, whether there are certain defects, etc.

[0037] The pre-release environment is a transition from the test environment to the production environment. Since the test environment may be subject to some restrictions, some processes or data may not be tested. Therefore, verification can be performed in the pre-release environment to ensure the quality of the product launch. The pre-release environment is generally connected to the database of the production environment, so that the pre-release environment and the online production environment can share the database, that is, the pre-release environment uses the database of the online production environment. Although it is also used for testing, the biggest difference between the pre-release environment and the test environment is that the synchronization between the pre-release environment and the production system is relatively high. Some tests, such as those that require large amounts of data, can be tested in the pre-release environment. The performance of the program is more accurate than in the test environment (generally less data). It should be noted that although the configuration of the pre-release environment is basically consistent with the online production environment, the web server of the pre-release environment is not within the scope of the integrated server of the online production system, and is a cluster composed of one or more separate machines. Therefore, the access domain name of the pre-release environment will also be different from that of the online production environment. The online production environment can be provided to external users for access, and the pre-release environment can only be accessed internally.

[0038] The production environment, also known as the online environment, is the environment officially provided to users.

[0039] Among them, the same search engine system as in the production environment can be used normally in the pre-release environment, and can be connected to the database of the production environment. Therefore, the search function of the application can be tested in the pre-release environment.

[0040] However, in the embodiment of the present application, the purpose is to meet the demand for testing the search function of the application in the test environment, and for this purpose, the embodiment of the present application provides a new solution. In this solution, the data in the data table related to the application to be tested in the test environment database can be synchronized to the database of the online production environment by the developer or tester of the specific application to be tested, and can be processed as a data table available to the search engine system, and the search engine can be the same as the search engine system actually used in the online production environment. In other words, the search engine system in the production environment can be made to search for data derived from the test environment database. Thus, in the test environment, the same search engine system as in the production environment can be used to implement the test of the search-related logic in the application to be tested. For example, when testing, a search request can be initiated to the search engine system by cross-domain access to the search engine system from the test environment, and then, according to the search results returned by the search engine, the search logic in the specific application is tested. Among them, under the preferred embodiment, in order to avoid affecting the online production environment, the search engine system in the pre-release environment can be accessed across domains from the test environment, so that the independent server cluster corresponding to the pre-release environment responds to this search request.

[0041] It should be noted that the implementation basis of the above scheme is that the development process of the application system and the search engine system are independent of each other, and the application verification only focuses on the code changes of the application. The search engine system is just an environmental infrastructure. The application party's requirement for it is that the data of the search engine system can match the test environment / stage where the application is located (the test environment hopes to search for daily data, and the online search for online data). Therefore, during the test process, the application code changes involved need to be deployed in the offline environment, so that the cost of using multiple changes in parallel, integrated and other environments is the lowest. In the above scheme provided in the embodiment of the present application, the test of the search logic of a specific application can be implemented in the test environment. In this way, the data generation of the test application data is still in the offline environment, and the search engine system can use the search engine system in the production environment or the pre-release environment, and the application data is synchronized from the database of the offline test environment to the search engine in the production environment or the pre-release environment. In this way, since there is no need to deploy a search engine system separately for the test environment, the cost will be relatively low; in addition, the search engine system in the production environment has relatively complete functions, so a more complete and accurate test can be implemented for the search logic in the application. If defects are found during the test process, the modification of the application-related code can still be implemented in the test environment at a lower cost.

[0042] Among them, when implementing it, how to deploy the data in the test environment database to the database of the online production environment is an issue that needs to be considered. Regarding this issue, in an optional implementation of this application, a full + incremental data synchronization method can be adopted. First, for the historical stock data in the test environment database, such as Figure 1As shown, the full amount can be synchronized to the open data processing service system of the production environment / pre-release environment through the offline data synchronization tool. The original function of the open data processing service system is to store the data generated in real time in the production system for subsequent analysis, calculation, information recommendation and other applications. In the embodiment of the present application, the data in the data table related to the application to be tested in the database of the test environment can be synchronized to this open data processing service system, and the system can be used as a data source for the search engine, so that the data in the test environment database becomes the data source of the search engine in the production system. Of course, in the specific implementation, the data from the test environment database may not be directly used by the search engine system. For this reason, it can also be processed into a data table available to the search engine system. Specifically, since the search engine system is usually equipped with an offline data processing system for converting and processing various source data and then sending it to the search engine system for use, therefore, in the embodiment of the present application, after the data in the relevant data table of the test environment is fully synchronized to the open data processing service system, it can also be processed into a target data table available to the search engine system through the offline data processing system corresponding to the search engine system.

[0043] In addition, in addition to some historical stock data, the database of the test environment also contains some incremental data, including data corresponding to operations such as adding, deleting, and modifying. For this incremental data, in the embodiment of the present application, Figure 1 As shown, the data change messages in the relevant data tables in the test environment can be monitored by the change monitoring system in the test environment; then, the monitored data change messages can be converted into the message format defined in the message middleware system in the production environment, and the data change messages can be sent to the message middleware system in the production environment by calling the interface of the message middleware system, so as to synchronize the incremental data in the relevant data tables in the test environment to the database in the production environment. Specifically, such incremental data can also be processed into a data table available to the search engine system after being merged with the full data by the offline data processing system corresponding to the search engine system. Among them, in order to facilitate the data processing, the full and incremental data synchronized to the production environment can be merged by the offline data processing system corresponding to the search engine system, and processed into a target data table available to the search engine system, and then provided to the search engine system for use.

[0044] After synchronizing the data in the test environment database to the production environment in the above manner, during the testing of the target application in the test environment, a search request can be initiated from the test environment to the search engine system of the specific production environment or pre-release environment, and the search results returned by the search engine system can be obtained to complete the testing of the relevant search logic in the target application.

[0045] Among them, since the pre-release environment can use the same search engine system as the production environment and can be connected to the database of the production environment, in order to avoid interfering with the search engine system in the actual online production environment, the above test process can be implemented through the search engine system in the pre-release environment. That is, the specific search request can be sent to the search engine system in the pre-release environment through cross-domain access, so that the service can be provided by the independent server cluster corresponding to the pre-release environment, so as not to affect the search engine system in the production environment.

[0046] Among them, during specific implementation, in order to facilitate the testing of the search logic in the application through the solution provided by the embodiment of the present application, the specific implementation solution can also be productized, for example, it can be a service system for users such as testers. Through this productized service system, testers and other users can specify the application to be tested in the system, and select or specify the data table related to the application to be tested from each data table in the database of the test environment. Afterwards, the service system can synchronize the data in this data table to the database of the online production environment, and process it into a target data table available to the search engine system in the production environment. In other words, the productized service system can mainly provide related services for synchronizing the data in the data table related to the specific application in the test environment database to the database of the production environment.

[0047] The specific implementation scheme provided in the embodiments of the present application is described in detail below.

[0048] Specifically, the embodiment of the present application first provides a method for testing the search function of an application from the perspective of the above-mentioned productized service system, see Figure 2 , the method may specifically include:

[0049] S201: Determine a target application that needs to be tested in a test environment.

[0050] Specifically, the service system can be informed of the target application that needs to be tested in the test environment by inputting the identifier of the application to be tested in the service system. When the data in the data table related to the application in the test environment database is subsequently synchronized to the production environment, the identifier of the target application can also be provided. In this way, when the application subsequently initiates a search request to the search engine, the data related to the application in the production environment can be searched.

[0051] S202: If the target application includes a search function, determine a source data table related to the target application in the database of the test environment.

[0052] After the application to be tested is determined, since the application needs to provide a search function, in order to implement the test of the search logic in the test environment, the source data table related to the target application in the database of the test environment can be determined first. Specifically, the tester user can input the name of the source data table, the database where it is located, etc. in the aforementioned service system to determine the source data table related to the target application in the database of the above test environment.

[0053] S203: Synchronize the data in the source data table to the database of the online production environment, and process it into a target data table available to the target search engine system.

[0054] After determining the source data table related to the target application in the database of the test environment, the data in the source data table can be synchronized to the database of the online production environment and processed into a target data table available to the search engine system in the production environment.

[0055] Specifically, the data synchronization process can be realized in a full + incremental manner. Specifically, for the full amount of data, that is, the historical stock data in the database of the test environment, for this kind of data, the offline data synchronization tool can be used to synchronize the historical stock data in the source data table to the open data processing service system in the production environment. Among them, the main function of this open data processing service system is to store and calculate the data generated in real time in the production environment to provide data indicator analysis, information recommendation and other related services. In addition, this stored data can also be used as a data source for the search engine system, but it needs to be processed before it can become available to the search engine system. For this reason, in the prior art, there is usually an offline data processing system equipped for the search engine system to realize offline processing of data and provide it to the search engine system for use, so as to improve the efficiency of the search engine. Therefore, in the embodiment of the present application, for the historical stock data in the relevant data table in the test environment database, it can be fully updated to this open data processing service system, and then the synchronized data can be processed by the offline data processing system, so as to be processed into a target data table available to the search engine system.

[0056] It should be noted that, in a specific implementation, it is also possible to apply for permission for the offline data processing system corresponding to the search engine system to use the data in the open data processing service system, so that the offline data processing system can process the data synchronized to the open data processing service system to generate a target data table that can be used by the search engine system.

[0057] For the incremental data in the data table related to the current target user in the test environment database, the data change message in the source data table can be monitored by the message monitoring system in the test environment. Afterwards, the monitored data change message can be converted into the message format defined in the message middleware system in the production environment, and the data change message can be sent to the message middleware system in the production environment by calling the interface of the message middleware system, so as to synchronize the incremental data in the source data table to the database of the production environment.

[0058] In specific implementation, in order to achieve the above purpose, it is also possible to create a service of autonomous consumption mode in the message monitoring system in the test environment, and access the source data table that needs to be monitored, so that the message monitoring system can monitor the data change events in the source data table. Specifically, the specific message middleware system can be a message middleware system of the pre-release environment. At this time, it is also possible to apply for an account of the pre-release environment in advance and obtain an authorization token (Token) and a key. In addition, you can download the plug-in of the above-mentioned message monitoring system, customize the consumption service logic, and then convert the data change message into the message format of the message middleware system, and send the message to the pre-release environment of the message middleware system. Furthermore, you can also apply to the message middleware system for authorization information, and apply for a message topic (Topic) in the message middleware system to receive messages sent from the message monitoring system in the test environment.

[0059] After completing the full and incremental data synchronization, the historical stock data and the incremental data can be merged through the offline data processing system corresponding to the search engine system, and processed to generate a target data table that meets the format requirements of the search engine system.

[0060] Among them, the offline data processing system is a system that provides offline data processing services for the search engine system, and can connect to multiple data sources. Therefore, in the embodiment of the present application, the offline data processing system can be used to merge the data synchronized from the test environment database to the open data processing service system and the message middleware system, and process it into a target data table that can be used by the search engine system. For example, some useless fields can be removed, and related fields in different source data tables can be associated to generate a target data table, etc.

[0061] In specific implementation, since the above-mentioned offline data processing system can also be used to process the data actually generated in the production environment, the embodiment of the present application uses the resources in the online environment (production / pre-release) for data processing, so it is necessary to consider the problem of data isolation. Of course, since the offline data processing system performs isolated storage of data for different processing tasks, it can naturally have the effect of data isolation. However, in order to avoid failures caused by reasons such as misoperation, it is also possible to apply to create an independent project in the offline data processing system corresponding to the search engine system, so as to allocate independent resources for data processing from the test environment, thereby isolating the data actually generated in the production environment. In the case where the offline data processing system exists in the form of cloud services, an independent cloud account can be applied for and operated for test resources. Specifically, an independent cloud account, independent search engine resources, and offline data processing project resources can be applied for, and so on.

[0062] S204: When testing the search function of the target application in the test environment, a search request is sent by cross-domain access to the target search engine system in the test environment, so that the search engine system returns search results by retrieving the target data table, so as to test the search function in the target application based on the search results.

[0063] After synchronizing the data in the data table related to the current application in the test environment database to the database in the production environment, the search logic in the application can be tested in the test environment using the search engine system in the production environment. Since the test environment and the production environment belong to different networks, the specific application can send a search request by cross-domain access to the search engine system from the test environment. After receiving the search request, the search engine system finds that it comes from an application in the test environment, and can retrieve the target data table related to the test of the application from the production environment database and return the corresponding search results. After receiving the search results in the test environment, the search logic in the application can be tested based on the search results, including determining whether the search results meet expectations, whether the search results can continue to trigger subsequent processing logic such as adding purchases and placing orders, and so on.

[0064] As mentioned above, in the case of a pre-release environment, a search request can be sent by performing cross-domain access to the search engine system deployed in the pre-release environment in the test environment. In this way, since the pre-release environment is usually deployed in an independent server cluster, the search request from the test environment can be responded to by the independent server cluster, thereby avoiding interference with the search engine system in the production environment.

[0065] In summary, in the above solution provided in the embodiment of the present application, the search logic of a specific application can be tested in an offline test environment. Figure 3 As shown, the data generation of the test application data is still in the offline environment, and the search engine system can use the search engine system in the production environment or the pre-release environment. The application data is synchronized from the database of the offline test environment to the search engine in the production environment or the pre-release environment, so that the search engine in the production environment or the pre-release environment can be used to meet the needs of testing the search logic of the application in the test environment.

[0066] It should be noted that the solution provided in the embodiment of the present application may be imperceptible to the upper-layer application, and for users such as testers, there is no change in the function and operation of the application. The access process of the system can be completed after the aforementioned data synchronization, security isolation and other processing. When accessing, you can also check the data source configuration. If it is a search engine project (there can be multiple actual search engines), just change the data source to the target data table in the format required by the search engine. In addition, if a search engine system in a pre-release environment is used, the search domain name can also be changed in the accessed application. This is because the domain names of the pre-release environment and the production environment are different, and in the embodiment of the present application, it is necessary to call the search engine system of the pre-release environment from the prediction environment. Therefore, it can be changed to the domain name corresponding to the pre-release environment. Correspondingly, the search domain name needs to have cross-domain capabilities. Regarding the implementation of cross-domain capabilities, it does not belong to the key content of the embodiment of the present application and will not be described in detail here.

[0067] In summary, through the embodiment of the present application, for the target application that needs to be tested in the test environment, if the search logic needs to be tested, the data in the source data table related to the target application in the database of the test environment can be synchronized to the database of the online production environment, and processed as a target data table available to the search engine system in the production environment. In this way, when the search function of the target application is tested in the test environment, a search request can be sent by cross-domain access to the search engine system in the test environment, so that the search engine system returns the search results by retrieving the target data table, so as to test the search function in the target application based on the search results. In this way, there is no need to deploy a search engine system separately for the test environment, so that the search logic of the application can be tested in the test environment at a lower cost; in addition, since the search engine system in the production environment is used to complete the test process, and this search engine has relatively complete functions, a more complete and accurate test can be achieved for the search logic in the application. At the same time, since the specific test process is carried out in the test environment, if a defect is found during the test process, the modification of the application-related code can still be achieved in the test environment at a lower cost.

[0068] Among them, in order to synchronize the data in the source data table related to the target application in the database of the test environment to the database of the online production environment, it can be achieved in a full + incremental manner. For the historical stock data in the source data table in the test environment database, it can be synchronized to the open data processing service system of the production environment through an offline synchronization tool; for incremental data, it can be monitored through a data change monitoring tool and sent to the message middleware system in the production environment through a message. Afterwards, the offline data processing system corresponding to the search engine system can merge the synchronized full data and incremental data, and process them into a target data table available to the search engine.

[0069] In order to avoid interfering with the search engine system of the production system, this can be achieved through the search engine system in the pre-release system, so that the search requests initiated by the application in the test environment can be responded to by the independent server cluster corresponding to the pre-release environment.

[0070] It should be noted that the embodiments of the present application may involve the use of user data. In actual applications, user-specific personal data can be used in the scheme described herein within the scope permitted by applicable laws and regulations, subject to the requirements of applicable laws and regulations of the country where the user is located (for example, with the user's explicit consent, effective notification to the user, etc.).

[0071] Corresponding to the above method embodiment, the present application embodiment also provides a device for testing the search function of an application, see Figure 4 , the method may include:

[0072] An application determination unit 401 is used to determine a target application that needs to be tested in a test environment;

[0073] A source data table determining unit 402 is configured to determine a source data table related to the target application in a database of the test environment if the target application includes a search function;

[0074] A data synchronization unit 403 is used to synchronize the data in the source data table to the database of the online production environment, and process the data into a target data table available to the target search engine system;

[0075] The cross-domain request unit 404 is used to send a search request by cross-domain access to the target search engine system in the test environment when testing the search function of the target application in the test environment, so that the search engine system returns the search result by retrieving the target data table, so as to test the search function in the target application based on the search result.

[0076] Wherein, a pre-release environment is also included between the test environment and the production environment; the pre-release environment can be connected to the database in the production environment, and the same search engine system as that in the production environment is deployed through an independent server cluster;

[0077] The cross-domain request unit can be specifically used for:

[0078] The search request is sent by performing cross-domain access in the test environment to the search engine system deployed in the pre-release environment.

[0079] Specifically, the data synchronization unit may include:

[0080] A full synchronization subunit, used to synchronize the historical stock data in the source data table to the open data processing service system in the production environment using an offline data synchronization tool, wherein the open data processing service system is used to store and calculate the data generated in real time in the production environment;

[0081] A monitoring subunit, configured to monitor data change messages in the source data table through a message monitoring system in a test environment;

[0082] The incremental synchronization sub-unit is used to convert the monitored data change messages into the message format defined in the message middleware system in the production environment, and send the data change messages to the message middleware system in the production environment by calling the interface of the message middleware system, so as to synchronize the incremental data in the source data table to the database of the production environment.

[0083] Specifically, when processing the synchronized data, the data synchronization unit may be used to:

[0084] The historical stock data and the incremental data are merged through the offline data processing system corresponding to the target search engine system, and are processed to generate a target data table that meets the format requirements of the target search engine system.

[0085] In addition, the device may also include:

[0086] The permission application unit is used to apply for permission to use the data in the open data processing service system for the offline data processing system corresponding to the target search engine system.

[0087] The project creation unit is used to apply for creating an independent project in the offline data processing system corresponding to the target search engine system, so as to allocate independent resources for data processing from the test environment to isolate it from the online data in the production environment.

[0088] The monitoring subunit may be specifically used for:

[0089] A service in an autonomous consumption mode is created in the message monitoring system in the test environment, and the source data table to be monitored is accessed so that the message monitoring system can monitor data change events in the source data table.

[0090] Furthermore, the device may further include:

[0091] The authorization unit is used to apply for authorization information from the message middleware system in the production environment, and apply for a message topic in the message middleware system to receive messages sent from the message monitoring system in the test environment.

[0092] In addition, an embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the steps of any one of the methods in the aforementioned method embodiments are implemented.

[0093] And an electronic device, comprising:

[0094] one or more processors; and

[0095] A memory associated with the one or more processors, the memory being used to store program instructions, wherein the program instructions, when read and executed by the one or more processors, execute the steps of the method described in any one of the aforementioned method embodiments.

[0096] in, Figure 5 The architecture of the electronic device is shown as an example, which may include a processor 510, a video display adapter 511, a disk drive 512, an input / output interface 513, a network interface 514, and a memory 520. The processor 510, the video display adapter 511, the disk drive 512, the input / output interface 513, the network interface 514, and the memory 520 may be communicatively connected via a communication bus 530.

[0097] Among them, the processor 510 can be implemented by a general-purpose CPU (Central Processing Unit, processor), a microprocessor, an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, etc., to execute relevant programs to implement the technical solution provided in this application.

[0098] The memory 520 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 520 can store an operating system 521 for controlling the operation of the electronic device 500, and a basic input and output system (BIOS) for controlling the low-level operation of the electronic device 500. In addition, a web browser 523, a data storage management system 524, and a search test processing system 525, etc. can also be stored. The above-mentioned search test processing system 525 can be an application program that specifically implements the operations of the aforementioned steps in the embodiment of the present application. In short, when the technical solution provided by the present application is implemented by software or firmware, the relevant program code is stored in the memory 520 and is called and executed by the processor 510.

[0099] The input / output interface 513 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.

[0100] The network interface 514 is used to connect to a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).

[0101] The bus 530 comprises a pathway for transmitting information between the various components of the device (eg, the processor 510, the video display adapter 511, the disk drive 512, the input / output interface 513, the network interface 514, and the memory 520).

[0102] It should be noted that, although the above device only shows a processor 510, a video display adapter 511, a disk drive 512, an input / output interface 513, a network interface 514, a memory 520, a bus 530, etc., in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include components necessary for implementing the solution of the present application, and does not necessarily include all the components shown in the figure.

[0103] It can be known from the description of the above implementation methods that those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present application can be essentially or partly contributed to the prior art in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present application or certain parts of the embodiments.

[0104] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can refer to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without creative work.

[0105] The above is a detailed introduction to the method, device and electronic device for testing the search function of the application provided by the present application. The principle and implementation method of the present application are described in detail using specific examples. The description of the above embodiments is only used to help understand the method and core idea of ​​the present application. At the same time, for those skilled in the art, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as limiting the present application.

Claims

1. A method for testing a search function of an application, characterized in that: include: Identify the target applications that need to be tested in the test environment; If the target application includes a search function, determining a source data table related to the target application in a database of the test environment; Synchronize the data in the source data table to the database of the online production environment, and process it into a target data table that can be used by the target search engine system; When testing the search function of the target application in the test environment, a search request is sent by cross-domain access to the target search engine system in the test environment, so that the search engine system returns search results by retrieving the target data table, so as to test the search function in the target application based on the search results; wherein, the target search engine system is located in a production environment or a pre-release environment.

2. The method according to claim 1, characterized in that A pre-release environment is also included between the test environment and the production environment; the pre-release environment can be connected to the database in the production environment and deploy the same search engine system as that in the production environment through an independent server cluster; The sending of the search request by cross-domain access to the target search engine system in the test environment includes: The search request is sent by performing cross-domain access in the test environment to the search engine system deployed in the pre-release environment.

3. The method according to claim 1, characterized in that The step of synchronizing the data in the source data table to the database of the production environment includes: Using an offline data synchronization tool, all the historical stock data in the source data table is synchronized to the open data processing service system in the production environment, where the open data processing service system is used to store and calculate the data generated in real time in the production environment; Monitoring data change messages in the source data table through a message monitoring system in a test environment; The monitored data change message is converted into the message format defined in the message middleware system in the production environment, and the data change message is sent to the message middleware system in the production environment by calling the interface of the message middleware system, so as to synchronize the incremental data in the source data table to the database of the production environment.

4. The method according to claim 3, characterized in that The processing is to make the target data table available to the target search engine system, including: The historical stock data and the incremental data are merged through the offline data processing system corresponding to the target search engine system, and are processed to generate a target data table that meets the format requirements of the target search engine system.

5. The method according to claim 4, characterized in that Also includes: Apply for permission to use data in the open data processing service system for the offline data processing system corresponding to the target search engine system.

6. The method according to claim 4, characterized in that Also includes: An application is made to create an independent project in the offline data processing system corresponding to the target search engine system so as to allocate independent resources for data processing from the test environment to isolate it from the online data in the production environment.

7. The method according to claim 3, characterized in that The monitoring of the data change message in the source data table by the message monitoring system in the test environment includes: A service in an autonomous consumption mode is created in the message monitoring system in the test environment, and the source data table to be monitored is accessed so that the message monitoring system can monitor data change events in the source data table.

8. The method according to claim 3, characterized in that Also includes: Apply to the message middleware system of the production environment for authorization information, and apply for a message topic in the message middleware system to receive messages sent from the message monitoring system in the test environment.

9. A device for testing the search function of an application, characterized in that: include: An application determination unit, used for determining a target application that needs to be tested in a test environment; a source data table determining unit, configured to determine a source data table related to the target application in a database of the test environment if the target application includes a search function; A data synchronization unit, used to synchronize the data in the source data table to the database of the online production environment, and process the data into a target data table available to the target search engine system; A cross-domain request unit is used to send a search request by cross-domain access to the target search engine system in the test environment when testing the search function of the target application in the test environment, so that the search engine system returns the search result by retrieving the target data table, so as to test the search function in the target application based on the search result; wherein, the target search engine system is located in a production environment or a pre-release environment.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method described in any one of claims 1 to 8 are implemented.

11. An electronic device, characterized in that: include: one or more processors; as well as A memory associated with the one or more processors, the memory being used to store program instructions, wherein the program instructions, when read and executed by the one or more processors, execute the steps of the method described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Test method and device, equipment and storage medium

    CN113934637A

  • System and method for testing, monitoring, and tracking distributed transactions using a search engine

    US20040193612A1