Information processing method and apparatus, storage medium, and electronic device

By managing and sharing Mock data through the contract testing R&D platform, the problem of API interface change synchronization was solved, enabling the front end to quickly obtain feedback information and improving project development efficiency and quality.

CN122132287APending Publication Date: 2026-06-02HANGZHOU NETEASE CLOUD MUSIC TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HANGZHOU NETEASE CLOUD MUSIC TECH CO LTD
Filing Date
2024-12-02
Publication Date
2026-06-02

Smart Images

  • Figure CN122132287A_ABST
    Figure CN122132287A_ABST
Patent Text Reader

Abstract

This disclosure provides an information processing method, apparatus, program product, and electronic device, relating to the field of computer technology. The method is applied to a contract testing and development platform, which is configured with shared contracts signed by multiple development participants. The method includes: receiving a request to be processed, the request carrying: an identifier field indicating the object executing the shared contract and request information for obtaining or querying shared information stored in the contract testing and development platform; determining a set of shared information corresponding to the identifier field from a database corresponding to the contract testing and development platform, and determining feedback information corresponding to the request information from the set of shared information. This disclosure, through a contract development and testing platform, can efficiently respond to requests sent by each development participant, improving overall development efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of this disclosure relate to the field of computer technology, and more specifically, to an information processing method, an information processing apparatus, a computer-readable storage medium, and an electronic device. Background Technology

[0002] This section is intended to provide background or context for the embodiments of this disclosure as set forth in the claims. The description herein is not intended to be a prior art simply because it is included in this section.

[0003] In related technologies, during project development, the Application Programming Interface (API) definition information is manually filled in and maintained by backend developers. If the API changes, the updated API cannot be automatically synchronized to upstream and downstream developers and quality assurance (QA) engineers. Therefore, the frontend and backend development timelines need to be interdependent. This approach not only has high integration costs, but also forces the frontend to passively wait for the backend if their schedules are inconsistent, reducing project development efficiency.

[0004] Furthermore, since the interface test cases are written and maintained by QA on the interface testing platform, front-end developers cannot reuse the data results returned when running the interface test cases. Therefore, if the front-end must start development first, it can only construct mock data itself. In this way, the constructed data is often not fully consistent, and only the key fields can be displayed on the front end. Summary of the Invention

[0005] However, the above approach may result in poor correctness of interface requests and incompleteness of data returns, affecting the actual functionality of the entire chain. This could lead to the project development failing the online review and thus reducing overall development efficiency.

[0006] In view of this, the present disclosure provides an information processing method, an information processing apparatus, a computer-readable storage medium, and an electronic device to improve the efficiency of project research and development to a certain extent.

[0007] According to a first aspect of this disclosure, an information processing method is provided, applied to a contract testing development platform, the contract testing development platform being configured with shared contracts signed by multiple development participants, the method comprising:

[0008] Receive a pending request, the pending request carrying: an identifier field indicating the object executing the shared contract and request information for obtaining or querying the shared information stored in the contract testing and development platform;

[0009] From the database corresponding to the contract testing and R&D platform, determine the shared information set corresponding to the identifier field, and from the shared information set, determine the feedback information corresponding to the request information.

[0010] In one possible implementation, the method further includes, before receiving the request to be processed:

[0011] Receive shared contract initiation information from various R&D participants;

[0012] Based on the shared contract initiation information and the identification information of each R&D participant, the account corresponding to each R&D participant is determined; different accounts can enable a Mock test case of the contract testing R&D platform.

[0013] In one possible implementation, the method further includes:

[0014] Receive data update requests;

[0015] According to the data update request, the database corresponding to the contract testing R&D platform is updated; wherein, the database stores at least one of the following data: data generated by traffic recording, data generated by testing based on test interface API cases in the interface testing platform, and data accumulated by the gateway.

[0016] In one possible implementation, the method further includes:

[0017] Receive a Mock data construction request;

[0018] From the database of the contract testing R&D platform, search for matching data that matches the request parameters included in the Mock data construction request;

[0019] Based on the matching data, construct the corresponding Mock data.

[0020] In one possible implementation, the method further includes:

[0021] Receive a request to construct a contract mock test case;

[0022] Based on the contract Mock test cases, construct the adaptation scenario of the request indication, determine the corresponding text test cases, and the return Mock data corresponding to the text test cases;

[0023] Based on the text use case and the returned Mock data, construct the corresponding contract Mock test case.

[0024] In one possible implementation, the method further includes:

[0025] Receive a scenario Mock test mode request, wherein the scenario Mock test mode request carries at least two interfaces corresponding to the target scenario;

[0026] Find contract mock test cases for at least two interfaces corresponding to the target scenario, and test the found contract mock test cases to obtain the corresponding mock data.

[0027] In one possible implementation, the method further includes:

[0028] Receive Mock test mode switching request;

[0029] Based on the Mock test mode switching request, the scenario Mock test mode is switched to single-interface Mock test mode.

[0030] In one possible implementation, if the request to be processed is an interface processing request or a Mock data query request, then before determining the feedback information corresponding to the request information, the method further includes:

[0031] Perform contract mock verification on the requested information.

[0032] In one possible implementation, the request information is subjected to contract mock verification, including:

[0033] Determine the request parameters in the request information, the request parameters including fields in the Uniform Resource Locator (URL) parameter and the values ​​corresponding to those fields;

[0034] If the field and its corresponding value conform to the contract definition in the contract testing and development platform, then the request information is determined to have passed the contract Mock verification.

[0035] If the field and its corresponding value do not conform to the contract definition in the contract testing and development platform, an error message is determined and sent to the triggering object corresponding to the development request.

[0036] In one possible implementation, if the request to be processed is an interface processing request, then a shared information set corresponding to the identifier field is determined from the database of the contract testing R&D platform, and feedback information corresponding to the request information is determined from the shared information set, including:

[0037] Determine the interface database corresponding to the interface definition platform connected to the contract testing R&D platform, and use the interface database as a shared information set corresponding to the identifier field;

[0038] From the interface database, determine the interface-related information corresponding to the request information as the feedback information.

[0039] In one possible implementation, if the request to be processed is a Mock data query request, then a shared information set corresponding to the identifier field is determined from the database of the contract testing R&D platform, and feedback information corresponding to the request information is determined from the shared information set, including:

[0040] Determine the test database corresponding to the interface test platform connected to the contract test R&D platform, and use the test database as a shared information set corresponding to the identifier field;

[0041] From the test database, the mock data corresponding to the request information is determined as the feedback information.

[0042] According to a second aspect of this disclosure, an information processing apparatus is provided for use in a contract testing and development platform, the contract testing and development platform executing a shared contract signed by various development participants, the apparatus comprising:

[0043] A receiving unit is used to receive a request to be processed, the request carrying: an identifier field indicating the object executing the shared contract and request information for obtaining or querying the shared information stored in the contract testing and development platform;

[0044] The processing unit is used to determine the shared information set corresponding to the identifier field from the database corresponding to the contract testing R&D platform, and to determine the feedback information corresponding to the request information from the shared information set.

[0045] In one possible implementation, before receiving the request to be processed, the apparatus further includes a determining unit for:

[0046] Receive shared contract initiation information from various R&D participants;

[0047] Based on the shared contract initiation information and the identification information of each R&D participant, the account corresponding to each R&D participant is determined; different accounts can enable a Mock test case of the contract testing R&D platform.

[0048] In one possible implementation, the device further includes an updating unit for:

[0049] Receive data update requests;

[0050] According to the data update request, the database corresponding to the contract testing R&D platform is updated; wherein, the database stores at least one of the following data: data generated by traffic recording, data generated by testing based on test interface API cases in the interface testing platform, and data accumulated by the gateway.

[0051] In one possible implementation, the device further includes a construction unit for:

[0052] Receive a Mock data construction request;

[0053] From the database of the contract testing R&D platform, search for matching data that matches the request parameters included in the Mock data construction request;

[0054] Based on the matching data, construct the corresponding Mock data.

[0055] In one possible implementation, the device further includes a construction unit for:

[0056] Receive a request to construct a contract mock test case;

[0057] Based on the contract Mock test cases, construct the adaptation scenario of the request indication, determine the corresponding text test cases, and the return Mock data corresponding to the text test cases;

[0058] Based on the text use case and the returned Mock data, construct the corresponding contract Mock test case.

[0059] In one possible implementation, the processing unit is further configured to:

[0060] Receive a scenario Mock test mode request, wherein the scenario Mock test mode request carries at least two interfaces corresponding to the target scenario;

[0061] Find contract mock test cases for at least two interfaces corresponding to the target scenario, and test the found contract mock test cases to obtain the corresponding mock data.

[0062] In one possible implementation, the processing unit is further configured to:

[0063] Receive Mock test mode switching request;

[0064] Based on the Mock test mode switching request, the scenario Mock test mode is switched to single-interface Mock test mode.

[0065] In one possible implementation, if the request to be processed is an interface processing request or a Mock data query request, then before determining the feedback information corresponding to the request information, the device further includes a verification unit, used for:

[0066] Perform contract mock verification on the requested information.

[0067] In one possible implementation, the device further includes a verification unit for:

[0068] Determine the request parameters in the request information, the request parameters including fields in the Uniform Resource Locator (URL) parameter and the values ​​corresponding to those fields;

[0069] If the field and its corresponding value conform to the contract definition in the contract testing and development platform, then the request information is determined to have passed the contract Mock verification.

[0070] If the field and its corresponding value do not conform to the contract definition in the contract testing and development platform, an error message is determined and sent to the triggering object corresponding to the development request.

[0071] In one possible implementation, if the request to be processed is an interface processing request, the processing unit is specifically used for:

[0072] Determine the interface database corresponding to the interface definition platform connected to the contract testing R&D platform, and use the interface database as a shared information set corresponding to the identifier field;

[0073] From the interface database, determine the interface-related information corresponding to the request information as the feedback information.

[0074] In one possible implementation, if the request to be processed is a Mock data query request, the processing unit is specifically used for:

[0075] Determine the test database corresponding to the interface test platform connected to the contract test R&D platform, and use the test database as a shared information set corresponding to the identifier field;

[0076] From the test database, the mock data corresponding to the request information is determined as the feedback information.

[0077] According to a third aspect of this disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the method of the first aspect described above and possible implementations thereof.

[0078] According to a fourth aspect of this disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform the method of the first aspect and possible implementations thereof by executing the executable instructions.

[0079] The technical solution disclosed herein has the following beneficial effects:

[0080] In this embodiment, since the contract testing R&D platform is configured with shared contracts signed by multiple R&D participants, when a pending request is received, which carries an identifier field indicating the object executing the shared contract and request information for obtaining or querying shared information stored in the contract testing R&D platform, the shared information set corresponding to the identifier field can be determined from the database corresponding to the contract testing R&D platform, and the feedback information corresponding to the request information can be determined from the shared information set. In other words, by implementing the management and sharing of Mock data based on the contract testing R&D platform, the convenience and reusability of data construction are improved. This allows front-end developers to quickly obtain feedback information to execute contract Mock tests, avoiding blockages caused by back-end developers not having developed the necessary code, and preventing R&D quality issues caused by front-end developers constructing data, thereby improving overall R&D efficiency and quality.

[0081] Other features and advantages of this disclosure will be set forth in the following description and will be apparent in part from the description or may be learned by practicing the disclosure. The objects and other advantages of this disclosure may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings. Attached Figure Description

[0082] To more clearly illustrate the technical solutions of the embodiments of this disclosure, the accompanying drawings used in the embodiments of this disclosure will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0083] Figure 1 This illustration shows a schematic diagram of an application scenario in this exemplary embodiment;

[0084] Figure 2 This diagram illustrates a system architecture of a contract testing platform according to this exemplary embodiment.

[0085] Figure 3 A flowchart illustrating an information processing method in this exemplary embodiment is shown.

[0086] Figure 4An interactive schematic diagram of an information processing method in this exemplary embodiment is shown;

[0087] Figure 5 A schematic diagram illustrating one method for determining a contract Mock test case in this exemplary embodiment is shown;

[0088] Figure 6 A schematic diagram illustrating a switching contract testing mode in this exemplary embodiment is shown;

[0089] Figure 7 This diagram illustrates the structure of an information processing apparatus according to this exemplary embodiment.

[0090] Figure 8 A schematic diagram of the structure of an electronic device in this exemplary embodiment is shown. Detailed Implementation

[0091] To make the objectives, technical solutions, and advantages of this disclosure clearer, the technical solutions in the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this disclosure, and not all of them. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure. Unless otherwise specified, the embodiments and features in the embodiments of this disclosure can be arbitrarily combined with each other. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than that shown here.

[0092] The term "comprising" and any variations thereof in the specification and claims of this disclosure are intended to cover non-exclusive protection. For example, a process, method, system, product, or apparatus that comprises a series of steps or units is not limited to the steps or units listed, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to such process, method, product, or apparatus.

[0093] In this disclosure, there are one or more embodiments; "multiple" refers to two or more. "And / or" describes the relationship between the associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following associated objects are in an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.

[0094] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order, sequence, size, or priority. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.

[0095] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, which are schematic illustrations of this disclosure and are not necessarily drawn to scale. Some block diagrams shown in the drawings may be functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software, in hardware modules or integrated circuits, or in networks, processors, or microcontrollers. Implementations can be carried out in various forms and should not be construed as limited to the examples set forth herein. The features, structures, or characteristics described in this disclosure can be combined in any suitable manner in one or more implementations. Numerous specific details are provided in the following description to give a thorough description of the embodiments of this disclosure. However, those skilled in the art will recognize that one or more specific details may be omitted when implementing the technical solutions of this disclosure, or other methods, components, apparatuses, steps, etc., may be used to replace one or more specific details. It should be noted that in the embodiments of this disclosure, the collection, dissemination, and use of data (e.g., contract mock data) comply with relevant national laws and regulations. Invention Overview

[0097] In related technologies, during project development, the Application Programming Interface (API) definition information is manually filled in and maintained by backend developers. If the API changes, the updated API cannot be automatically synchronized to upstream and downstream developers and quality assurance (QA) engineers. Therefore, the frontend and backend development timelines need to be interdependent. This approach not only has high integration costs, but also forces the frontend to passively wait for the backend if their schedules are inconsistent, reducing project development efficiency.

[0098] Furthermore, since the interface test cases are written and maintained by QA on the interface testing platform, front-end developers cannot reuse the data results returned when running the interface test cases. Therefore, if the front-end must invest in development first, it can only construct mock data itself. In this way, the data construction often does not fully conform to the requirements, and only the key fields can be displayed on the front-end.

[0099] However, the aforementioned method of having front-end developers construct mock data themselves may lead to issues with the correctness of actual API requests and the completeness of returned data, thus affecting the entire functional chain. For example, front-end developers might only care that the API request was sent and the mock returned data, assuming it meets the requirements, and then directly deploy the project. In such cases, if there are errors in the requested fields, but these are not checked and the problem is overlooked, the project will be deployed directly, becoming an online issue. When there are urgent requirements that necessitate front-end deployment first, if the project does not meet expectations or even requires emergency fixes and releases, especially when client versions have review mechanisms, the losses will be significant, resulting in considerable wasted costs and reduced development efficiency.

[0100] In addition, when front-end developers develop based on mock data, the mock data depends on the interface contract definition, and the work of constructing mock data is relatively cumbersome. Moreover, the constructed mock data cannot be reused, which reduces the development efficiency of the entire project.

[0101] In view of one or more of the above-mentioned problems, an exemplary embodiment of this disclosure provides an information processing method. Since the contract testing R&D platform is configured with shared contracts signed by multiple R&D participants, when a pending request is received, wherein the pending request carries: an identifier field indicating the object executing the shared contract and request information for obtaining or querying shared information stored in the contract testing R&D platform; the shared information set corresponding to the identifier field can be determined from the database corresponding to the contract testing R&D platform, and feedback information corresponding to the request information can be determined from the shared information set. In other words, by implementing the management and sharing of Mock data based on the contract testing R&D platform, the convenience and reusability of data construction are improved. In this way, front-end developers can quickly obtain feedback information to execute contract Mock tests, thus avoiding being blocked due to back-end developers not having developed the tests, and avoiding R&D quality problems caused by front-end developers constructing data, thereby improving the overall efficiency and quality of R&D.

[0102] After introducing the basic principles of this disclosure, various non-limiting embodiments of this disclosure will be described in detail below.

[0103] Application Scenarios Overview

[0104] To better understand the technical solutions provided in the embodiments of this disclosure, the following is a brief introduction to the application scenarios applicable to the technical solutions provided in the embodiments of this disclosure. It should be noted that the application scenarios described below are only for illustrating the embodiments of this disclosure and are not intended to limit the scope. In specific implementation, the technical solutions provided in the embodiments of this disclosure can be flexibly applied according to actual needs.

[0105] To provide a clearer description of the embodiments of this disclosure, some key terms are introduced below:

[0106] Mock data: Mock data refers to data that simulates a real data source during software development, possessing a similar data structure and fields. Mock data is used for development, testing, and demonstration when the actual data source is unavailable or unattainable.

[0107] Contract: In a broad sense, it can be understood as a document that establishes a relationship between two or more parties. In this embodiment of the disclosure, it can be understood as a document that establishes a relationship between multiple parties participating in a research and development project and agrees on the use of data. The contract includes at least API interface definition information (request, response), text use cases based on the interface, its Mock data, and interface Mock verification.

[0108] Contract Mock Test Cases: Contract Mock test cases can be understood as text-based test cases written from a functional perspective based on interfaces. They require corresponding data to be returned to the front-end. Mock creates virtual data to facilitate development and testing. For example, after the front-end and back-end define their interface documentation, front-end developers can simulate the interface's return data to observe the page's functional effects before the back-end interface functionality is completed. During development or testing, if it's necessary to consider the impact of various abnormal interface returns on the front-end page, mock interface return data can also be used to verify the effects of functional anomalies.

[0109] Contract-based testing development model: This can be understood as a contract-based development model. It refers to a three-way handshake agreement for the formulation and review of the interface contract in the front end, based on the traditional agile development process. Contract mock test cases and verifications are added. In this way, the contract-based testing development model can help decouple the front end and back end, reduce the situation of the back end blocking the front end development, and improve the efficiency of requirement development.

[0110] Front-end: can be understood as the general term for the front-end pages of products such as mobile client APP, H5 (HyperText Markup Language 5), RN (React Native), World Wide Web (web) client, Personal Computer (PC) client, Mac (Macintosh) client, etc.

[0111] Traffic acquisition data refers to randomly sampling and copying real traffic from online users, storing the corresponding operational data, and basing it on actual user behavior and usage data.

[0112] In this embodiment of the disclosure, information processing technology can be applied to various business scenarios where software, websites, and platforms need to iterate or develop new sub-functions. The business corresponding to the software, website, and platform is, for example, finance, games, shopping, multimedia, etc. For example, software that provides functions such as short video browsing, publishing, collecting, and liking needs to be iteratively developed, or software that provides music playback functions needs to be iteratively developed. This embodiment of the disclosure does not limit this.

[0113] Please see Figure 1 As shown, Figure 1 This is an application scenario to which the technical solution of the present disclosure embodiment can be applied. In the schematic diagram of this scenario, it includes a front-end participant device 101, an electronic device 102, and a back-end participant device 103. The front-end participant device 101 and the back-end participant device 103 can be multiple devices. Figure 1Only one example is shown, meaning that a project can involve multiple front-end developers and multiple back-end developers. Optionally, the application scenario can also include equipment for quality management engineers. Figure 1 Not shown in the image.

[0114] It should be noted that in this embodiment, the functions of the front-end participant device 101 and the back-end participant device 103 may change as their corresponding user identities change. For example, in the first time period, if user 1 is a front-end developer, the device used by user 1, or the device associated with user 1 (e.g., the device used by user 1's work partner or team member), can be called front-end participant device 101. In the second time period, if user 1 no longer uses the device and it is used by the back-end developer, then the device can be called back-end participant device 103.

[0115] Among them, the front-end participant device 101, electronic device 102 and back-end participant device 103 can all communicate directly or indirectly through one or more networks 104.

[0116] In this embodiment, an electronic device 102 is equipped with a contract testing and development platform, which is configured with shared contracts signed by multiple development participants. Thus, the electronic device 102 can receive pending requests sent by a front-end developer via its corresponding front-end participant device 101 or by a back-end developer via its corresponding back-end participant device 103. These pending requests carry an identifier field indicating the object executing the shared contract and request information for retrieving or querying shared information stored in the contract testing and development platform. The electronic device 102 can then determine the shared information set corresponding to the identifier field from the database corresponding to the contract testing and development platform, and determine the feedback information corresponding to the request information from the shared information set.

[0117] in, Figure 1 The various front-end participant devices 101 and back-end participant devices 103 can be mobile phones, tablets (PADs), personal computers (PCs), smart TVs, smartwatches, smart speakers, smart in-vehicle devices, and wearable devices, but are not limited to these.

[0118] as well as, Figure 1The electronic device 102 can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server or cloud server cluster that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms, but is not limited to these.

[0119] Of course, the methods provided in this disclosure are not limited to... Figure 1 The application scenarios shown can also be used in other possible application scenarios, such as application scenarios where only electronic devices implement information processing methods. This disclosure does not impose any limitations on the embodiments.

[0120] Please see Figure 2 As shown, Figure 2 A system architecture diagram of the contract testing R&D platform in this exemplary embodiment is shown. In this embodiment, the contract testing R&D platform includes an interface query module 201, an interface details module 202, a contract verification module 203, a scenario Mock module 204, and a personnel information & access control module 205.

[0121] In this embodiment, the interface query module 201 can connect to the interface definition platform. In other words, it breaks down the barrier between the two platforms. Thus, when the contract testing development platform receives an interface search request, it can immediately retrieve the latest interface request and returned rule definitions from the interface definition platform, while displaying basic details such as interface description, interface owner, and review status. Furthermore, when the interface rule definitions in the interface definition platform change, they can be automatically synchronized to the contract testing development platform via the interface query module 201. This ensures that the returned interface information is up-to-date, avoiding situations where the latest API interface definition information cannot be obtained.

[0122] In this embodiment of the disclosure, the interface details module 202 includes a request submodule 2021, a Mock data query submodule 2022, and a new Mock data submodule 2023.

[0123] In this embodiment, the request support submodule 2021 is connected to the request resource management platform, meaning that the contract testing development platform and the request resource management platform are integrated. Furthermore, the request support submodule 2021 integrates a Postman plugin, which can send various simulated user HTTP request data to the server via a Chrome extension. This allows developers to respond promptly and correctly, or to pre-process error messages before product release, thereby ensuring the stability and security of the product after launch.

[0124] Optionally, since the request resource management platform can provide common request data and frequently used data accumulation, when request support is needed, different request data can be provided according to business lines, business function modules, and business scenarios. Existing request content can also be used directly, supporting common parameters, improving platform usability, and enhancing the efficiency of front-end and back-end interface debugging.

[0125] In this embodiment of the disclosure, the Mock data query submodule 2022 can respond to relevant query requests based on the test dataset corresponding to the interface testing platform and display the results.

[0126] In this embodiment, the newly added Mock data submodule 2023 can connect to the interface testing platform via the Mock data recommendation module, thus bridging the gap between the interface testing platform and the contract testing development platform. The Mock data recommendation module can store data generated through traffic recording, data generated from API test cases in the interface testing platform, and data accumulated by the gateway in an embedded storage system (ES). This allows for rapid data retrieval using ES storage's custom word segmentation and document relevance query capabilities, making ES storage the database returned by the contract mock response. Of course, other storage systems can also be selected to store data generated through traffic recording, data generated from API test cases in the interface testing platform, and data accumulated by the gateway; this embodiment does not limit this choice.

[0127] In this embodiment, the newly added Mock data submodule 2023 supports one-click Mock functionality. In other words, users can select a function key in the contract testing development platform that supports intelligent and automated construction of Mock data. This function key can be, for example, a button named "One-click Mock," or a floating box named "Mock Construction," or other forms, which are not limited in this embodiment.

[0128] In this embodiment, the newly added Mock data submodule 2023 also supports the construction of contract mock test cases. During the development of required functions, from the perspective of product requirements, there is a need for corresponding data to be returned to the front end. Therefore, it is necessary to write text test cases based on the interface, and at the same time, Mock creates corresponding return data to facilitate development and testing, thus forming contract mock test cases for this product requirement function.

[0129] In this embodiment of the disclosure, the personnel information & permission control module 205 is used to distinguish the Mock data corresponding to each participant from the Mock data of others, and supports permission control for operations such as editing, modifying and updating Mock data, contract Mock test cases, etc.

[0130] In this embodiment of the disclosure, the scene Mock module 204 supports both single-interface Mock test mode and scene Mock test mode.

[0131] In this embodiment, mocking a single interface is performed, a process referred to as single-interface mock testing mode. Specifically, when a user logs into the contract testing development platform, they need to use the account they set up in the front-end mock settings entry to log in. In other words, the same account can be used to connect the front-end and the contract testing development platform. After the user logs into the contract platform for testing, the platform can search for the contract mock test cases enabled under the corresponding interface and return the mock results.

[0132] Optionally, multiple contract mock test cases can be created under a single interface. The mock data in different contract mock test cases will be different; for example, the values ​​of one or more fields in the mock data may differ, thus adapting to different requirements such as normal, abnormal, and boundary conditions. Furthermore, a switch can be used to control whether a specific contract mock test case is enabled. It should be noted that only one contract mock test case can be enabled when mocking a single interface. This ensures that the returned mock data is unique. If other contract mock test cases need to be enabled, they can be switched on and off using the aforementioned switch.

[0133] In other words, the single-interface mock test mode is bound to a user account, and a user account can only use one mode at a time. However, the currently selected mock test mode displayed on the contract testing development platform can be switched back and forth without affecting each other. During mock matching, based on the user account information carried in the request header and the mock test mode set by that user account on the contract testing development platform, different mock adaptation logics can be executed to determine the corresponding mock test mode.

[0134] In this embodiment of the disclosure, when the test mode of the contract testing R&D platform is switched to the scenario Mock test mode, a switch can be used to control whether a specific scenario is mocked. A scenario can be understood as a combination of multiple interfaces; obviously, this embodiment supports batch mocking of multiple interfaces within a single scenario. That is, if the scenario Mock test mode is executed, mocking can be performed on multiple interfaces simultaneously.

[0135] For example, all interfaces on the app's homepage can be aggregated into one scenario, making it easy to control the mock state of the interfaces in the homepage scenario. Specifically, each interface under the scenario can only choose to enable one mock data, and the on / off state of each mock data in the scenario mock test mode is independent and does not conflict with the mock data state of other scenarios or single interface modes.

[0136] Furthermore, this embodiment of the disclosure can also support simultaneous mocking of different scenarios. For example, in addition to the homepage scenario, other page or functional scenarios can be added, such as subpage XX scenario or functional XX scenario. Mocking of the homepage scenario, subpage XX scenario, and functional XX scenario can be enabled simultaneously. Optionally, different mock data can be designed according to business relevance and different verification scenarios, contract mock test cases can be aggregated according to scenarios, and mocking can be enabled with one click according to the scenario dimension.

[0137] As can be seen, in this embodiment of the disclosure, if it is a single-interface Mock test mode, the corresponding contract Mock test cases can be found based on the interface path and user account. If it is a scenario Mock test mode, the scenario to be activated can be determined based on the user account, and then the contract Mock test cases activated by the corresponding interface path can be found from the scenario to be activated.

[0138] In this embodiment, the contract verification module 203 can verify the Uniform Resource Locator (URL) parameter in the request according to the rules defined in the interface contract and the rules for interface test verification. For example, it can determine that the required fields key and value in the URL parameter must conform to the contract definition in the aforementioned rules of the interface contract. Specifically, when Mock is enabled and contract Mock data is used, the latest interface contract rules can be retrieved and queried to check whether the client interface request conforms to the verification rules. If the verification fails, the contract test development platform will return a specific code "code": -XXX, and display the reason for the failure on the client page. Error information can also be queried on the contract test development platform.

[0139] In one possible implementation, the contract testing development platform can support the validation of mock data fields and structures. When the interface rule definition changes, it can automatically synchronize with the latest interface rule definition information on the contract testing development platform. Thus, if the interface response fields or hierarchical structure change, the platform will iterate through the existing mock data, and mock data that does not match the interface rule definition will be flagged and a warning tag will be recorded. Furthermore, the creator of the mock data can verify and modify it based on the warning tag, thereby avoiding various problems caused by upstream and downstream parties being unaware of interface definition changes during the development process, and improving overall development efficiency.

[0140] In one possible implementation, the contract testing development platform can support connection via barcode scanning. The barcode information can be, for example, a QR code, a one-dimensional barcode, a two-dimensional barcode, or a composite barcode. For instance, developers can open the client app (debug test package) and scan the QR code on the contract testing development platform to add the platform's account information to the app's Mock settings and simultaneously enable Mock, thus automatically establishing the connection between the client app and the contract testing development platform.

[0141] In one possible implementation, the contract testing development platform can support the sharing and viewing of all contract mock data. That is, both single-interface mock testing and scenario mock testing modes can quickly create and modify their own mock data by copying. Anyone can enable mocking and reuse mock data from others. Furthermore, because user accounts are used for isolation, the reuse of mock data will not affect each other, avoiding the duplication of mock data construction and thus improving overall development efficiency.

[0142] In one possible implementation, the scenario Mock testing mode can also support the snapshot sharing function via a single scenario QR code. This allows the scenario QR code to be sent to other developers, QA, and product visual personnel. All of these personnel can connect to the contract testing R&D platform by scanning the scenario QR code, thereby quickly obtaining Mock data, accelerating the debugging or testing of data status and effect acceptance in a certain scenario, and thus improving overall R&D efficiency.

[0143] In one possible implementation, the contract testing R&D platform supports Mock history archiving, enabling users to view and trace the status of interfaces after they have been mocked in different environments and modes.

[0144] Exemplary methods

[0145] To further illustrate the technical solutions provided by the embodiments of this disclosure, a detailed description is provided below in conjunction with the accompanying drawings and specific implementation methods. Although the embodiments of this disclosure provide method operation steps as shown in the following embodiments or drawings, the method may include more or fewer operation steps based on conventional or non-inventive methods. In steps where there is no logically necessary causal relationship, the execution order of these steps is not limited to the execution order provided by the embodiments of this disclosure. In actual processing or when the device executes the method, it may be executed sequentially or in parallel according to the method shown in the embodiments or drawings.

[0146] Please see Figure 3 , Figure 3 This is a flowchart illustrating an information processing method according to an embodiment of this disclosure. The method can be executed, for example, by an electronic device, which can be... Figure 1 Electronic device 102 or Figure 2 The specific implementation process of this method, using the contract testing R&D platform in [the context of the platform], is as follows:

[0147] Step 301: Receive a pending request. The pending request carries: an identifier field indicating the object that executes the shared contract and request information for obtaining or querying shared information stored in the contract testing and development platform.

[0148] Step 302: Determine the shared information set corresponding to the identifier field from the database corresponding to the contract testing R&D platform, and determine the feedback information corresponding to the request information from the shared information set.

[0149] In this embodiment, since the contract testing R&D platform is configured with shared contracts signed by multiple R&D participants, when a pending request is received, which carries an identifier field indicating the object executing the shared contract and request information for obtaining or querying shared information stored in the contract testing R&D platform, the shared information set corresponding to the identifier field can be determined from the database corresponding to the contract testing R&D platform, and the feedback information corresponding to the request information can be determined from the shared information set. In other words, by implementing mock data management and sharing based on the contract testing R&D platform, the convenience and reusability of data construction are improved. This allows front-end developers to quickly obtain feedback information to execute contract mock tests, avoiding blockages caused by back-end developers not having developed the necessary code, and preventing R&D quality issues caused by front-end developers constructing data, thereby improving overall R&D efficiency and quality.

[0150] For example, see Figure 4 , Figure 4 This is a schematic diagram of yet another information processing method in the embodiments of this disclosure.

[0151] Step 401: The front end sends an HTTP request to the gateway, which carries an identification field.

[0152] Step 402: The gateway determines whether to use the Mock logic based on whether the request contains an identifier field.

[0153] In this exemplary embodiment, the underlying network library and Mock library of the front end have been modified, and a Mock interceptor has been added to the network request processing. This allows requests to include a special identifier field for gateway identification, containing the user account, regardless of whether the environment is online, regression testing, or in testing mode. Furthermore, the ability to turn the Mock switch on and off is supported. This allows for the display of the Mock settings entry during development and debugging testing. By accessing the settings, setting the account, and turning on the Mock switch, the interface request will include the identifier field indicating the execution of the contract mock function. Optionally, the identifier field could be, for example, "TestXXX". Of course, other representations are possible, and this embodiment does not limit this.

[0154] Step 403: Once the gateway determines that the Mock logic will be used, it can send the request to the Mock gateway.

[0155] Optionally, the request may include a path, an identifier field, parameter information, and other request information.

[0156] Step 404: The Mock gateway forwards the request to the Mock server.

[0157] Optionally, a Mock server can be understood as a Mock service-side device, i.e., the aforementioned electronic device 102. In this embodiment, it is mainly used to distinguish it from a regular service-side device. A regular service-side device is an electronic device that does not execute the contract Mock process.

[0158] Step 405: The Mock server determines the feedback information corresponding to the request information.

[0159] In this exemplary embodiment, if the HTTP request sent by the front end to the network management system does not include an identifier field, the gateway directly sends the HTTP request to the server-side device to obtain the corresponding feedback information.

[0160] In this exemplary embodiment, if the Mock data retrieval fails or the retrieval result fails in the feedback information determined by the Mock server, the HTTP request can be sent directly to a regular server-side device to obtain the corresponding feedback information. In other words, the contract Mock process is not executed in either of the aforementioned cases.

[0161] In this exemplary embodiment, to better illustrate how the Mock server determines the feedback information corresponding to the request information, two specific embodiments are described below.

[0162] Example 1

[0163] In this exemplary embodiment, the request to be processed is an interface processing request. In step 301, the request to be processed is received, and the request to be processed carries: an identifier field indicating the object executing the shared contract and request information for obtaining or querying shared information stored in the contract testing and development platform.

[0164] In this exemplary embodiment, after receiving the interface processing request, the contract testing platform can perform contract mock verification on the interface processing request.

[0165] In this exemplary embodiment, the contract testing platform determines the request parameters in the request information. These parameters include fields and their corresponding values ​​in the Uniform Resource Locator (URL) parameter. If the fields and their corresponding values ​​conform to the contract definition in the contract testing development platform, the request information passes the contract mock verification. If the fields and their corresponding values ​​do not conform to the contract definition in the contract testing development platform, an error message is determined and sent to the triggering object corresponding to the development request. It should be noted that the contract testing platform can perform contract mock verification on interface processing requests, which can be achieved through the aforementioned... Figure 2 The contract verification module 203 in the middle is executed, which will not be described in detail here.

[0166] In step 302, the shared information set corresponding to the identifier field is determined from the database of the contract testing R&D platform, and the feedback information corresponding to the request information is determined from the shared information set.

[0167] In this embodiment, the contract testing platform can determine the interface database corresponding to the interface definition platform connected to the contract testing R&D platform, and use the interface database as a shared information set corresponding to the identifier field; from the interface database, it determines the interface-related information corresponding to the request information as feedback information. The specific execution of this process can be referred to the execution process of the interface query module 201, and details can be found in the description of the interface query module 201, which will not be repeated here.

[0168] Example 2

[0169] In this exemplary embodiment, the request to be processed is a Mock data query request. In step 301, the request to be processed is received, and the request to be processed carries: an identifier field indicating the object executing the shared contract and request information for obtaining or querying shared information stored in the contract testing R&D platform.

[0170] In this exemplary embodiment, after receiving the interface processing request, the contract testing platform can perform contract mock verification on the interface processing request.

[0171] In this exemplary embodiment, the contract testing platform determines the request parameters in the request information. These parameters include fields and their corresponding values ​​in the Uniform Resource Locator (URL) parameter. If the fields and their corresponding values ​​conform to the contract definition in the contract testing development platform, the request information passes the contract mock verification. If the fields and their corresponding values ​​do not conform to the contract definition in the contract testing development platform, an error message is determined and sent to the triggering object corresponding to the development request. It should be noted that the contract testing platform can perform contract mock verification on interface processing requests, which can be achieved through the aforementioned... Figure 2 The contract verification module 203 in the middle is executed, which will not be described in detail here.

[0172] In step 302, the shared information set corresponding to the identifier field is determined from the database of the contract testing R&D platform, and the feedback information corresponding to the request information is determined from the shared information set.

[0173] In this exemplary embodiment, a test database corresponding to the interface testing platform connected to the contract testing R&D platform is determined, and the test database is used as a shared information set corresponding to the identifier field. From the test database, Mock data corresponding to the request information is determined as feedback information. This step can be executed by the Mock data query submodule 2022, and details can be found in the description of the Mock data query submodule 2022, which will not be repeated here.

[0174] In one possible implementation, before receiving the pending request, shared contract initiation information sent by each R&D participant can also be received; based on the shared contract initiation information and the identification information corresponding to each R&D participant, the account corresponding to each R&D participant is determined; different accounts can enable a Mock test case of the contract testing R&D platform.

[0175] Optionally, when enabling Mock on the front end, since an account is configured for each person, the account can be used to isolate Mock between different developers or QA personnel. Specifically, different developers or QA personnel enter their own accounts when setting up and enabling Mock in the front end Mock settings entry. This account can be used as agreed request header information and passed to the Mock server.

[0176] Furthermore, although the Mock server service stores contract mock test cases for all interfaces, and each interface can contain multiple contract mock test cases configured with different mock data, each contract mock test case has a separate switch to control whether mocking is enabled for that test case under the interface. Moreover, for the same interface path, the switches for individual contract mock test cases are set to mutual exclusion. This means that at most one contract mock test case can be enabled for each interface. Additionally, this switch is bound to a user account; different accounts, such as developer A (using account A) and developer B (using account B), can both enable this contract mock test case without affecting each other.

[0177] In one possible implementation, a data update request can also be received; based on the data update request, the database corresponding to the contract test development platform is updated; wherein the database stores at least one of the following data: data generated by the traffic recording method, data generated by testing based on test interface API cases in the interface test platform, and data accumulated by the gateway.

[0178] In one possible implementation, a Mock data construction request can also be received; matching data matching the request parameters included in the Mock data construction request can be found in the database of the contract testing R&D platform; and corresponding Mock data can be constructed based on the matching data. The construction of Mock data can be performed as described above. Figure 2 The newly added Mock data submodule was executed in 2023.

[0179] In an exemplary embodiment, a specific element field (i.e., request parameter) can be selected from the interface level or data model level and matched against the response data accumulated from traffic generation and interface testing (i.e., the database of the contract testing R&D platform). If a match is successful, the request is inserted into the existing response data; if a match fails, corresponding response data can be randomly generated based on the field. Furthermore, data isolation is required, and a resource library including content such as videos, images, and URLs is stored in the database corresponding to the contract testing platform.

[0180] Optionally, the automatic generation and recommendation service of response mock data, i.e., the process of constructing corresponding mock data based on matching data, can be illustrated by the following specific examples.

[0181] For example, suppose the interface returns a response, a response definition, and a ResultVO class hierarchy definition. Then, the following steps (1) to (4) can be performed to determine the mock data.

[0182] Step (1): Iterate through the internal fields of the response data. Optionally, the response model is named "JsonController" and is in code / message format. No similarity recommendation is performed. Set code = 200 and message = "success". Iterate through the data field.

[0183] Step (2): When iterating to the data field, the model name of the data field is "ResultRD", which belongs to JsonController. Since the overall result was not obtained in step (1), it attempts to retrieve it from the ES storage based on the aforementioned model name and interface information. If the result is null, it continues to iterate through the internal fields, passing the null result as a parameter.

[0184] Step (3): When iterating through the user field of data, the model name of the user field is "UserRD". Since the upper-level value passed in step (2) is null, it cannot be directly assigned a value. Therefore, it attempts to obtain the value from the ES storage based on the aforementioned model name, interface information, and forced exact match rules. The result is used as a parameter to continue iterating through the internal fields of UserRD. When iterating through the name field, since the result with the model name "UserRD" was obtained from the previous step, the result is directly assigned to name. Other fields can be assigned in a similar way as described above, which will not be repeated here.

[0185] Step (4): Iterate through the description field of data, and the type of the description field is String, that is, the basic type. Since the upper-level value passed in step (2) is null, it cannot be directly assigned a value. Therefore, try to assign a value from the ES storage according to the model name, interface and other information and similarity matching rules, and get the description field under ResultRD, and assign a value accordingly.

[0186] In this way, after all the fields in the response have been assigned values, the assigned response is used as mock data, and feedback information can be obtained.

[0187] In one possible implementation, a contract mock test case construction request may also be received; based on the adaptation scenario indicated by the mock test case construction request, the corresponding text test case and the corresponding return mock data are determined; and based on the text test case and the return mock data, the corresponding contract mock test case is constructed. For example, please refer to [link to relevant documentation]. Figure 5 , Figure 5 This is a schematic diagram illustrating the construction of a Mock test case in an exemplary embodiment of this disclosure.

[0188] In one possible implementation, a scenario Mock test mode request can also be received, which carries at least two interfaces corresponding to the target scenario; contract Mock test cases corresponding to the at least two interfaces corresponding to the target scenario are searched respectively, and the searched contract Mock test cases are tested to obtain the corresponding Mock data.

[0189] It should be noted that both the scenario-based mock test mode and the single-interface mock test mode can be executed by [the relevant authority / organization]. Figure 2 The execution of the Mock module in the scenario 204 is not described in detail here.

[0190] In one possible implementation, a Mock test mode switching request can also be received; based on the Mock test mode switching request, the scenario Mock mode test mode is switched to the single interface Mock test mode.

[0191] For example, see Figure 6 , Figure 6 This is a schematic diagram illustrating a contract mock mode switching in an embodiment of this application. As can be seen, in this embodiment, the single-interface mock test mode and the scenario mock test mode can be continuously switched.

[0192] Exemplary device

[0193] Exemplary embodiments of this disclosure also provide an information processing apparatus. (See reference...) Figure 7 As shown, the information processing device 700 includes the following program modules:

[0194] The receiving unit 701 is used to receive a request to be processed, the request carrying: an identifier field indicating the object executing the shared contract and request information for obtaining or querying the shared information stored in the contract testing and development platform;

[0195] The processing unit 702 is used to determine the shared information set corresponding to the identifier field from the database corresponding to the contract testing R&D platform, and to determine the feedback information corresponding to the request information from the shared information set.

[0196] In one possible implementation, before receiving the request to be processed, the apparatus further includes a determining unit for:

[0197] Receive shared contract initiation information from various R&D participants;

[0198] Based on the shared contract initiation information and the identification information of each R&D participant, the account corresponding to each R&D participant is determined; different accounts can enable a Mock test case of the contract testing R&D platform.

[0199] In one possible implementation, the device further includes an updating unit for:

[0200] Receive data update requests;

[0201] According to the data update request, the database corresponding to the contract testing R&D platform is updated; wherein, the database stores at least one of the following data: data generated by traffic recording, data generated by testing based on test interface API cases in the interface testing platform, and data accumulated by the gateway.

[0202] In one possible implementation, the device further includes a construction unit for:

[0203] Receive a Mock data construction request;

[0204] From the database of the contract testing R&D platform, search for matching data that matches the request parameters included in the Mock data construction request;

[0205] Based on the matching data, construct the corresponding Mock data.

[0206] In one possible implementation, the device further includes a construction unit for:

[0207] Receive a request to construct a contract mock test case;

[0208] Based on the contract Mock test cases, construct the adaptation scenario of the request indication, determine the corresponding text test cases, and the return Mock data corresponding to the text test cases;

[0209] Based on the text use case and the returned Mock data, construct the corresponding contract Mock test case.

[0210] In one possible implementation, the processing unit 702 is further configured to:

[0211] Receive a scenario Mock test mode request, wherein the scenario Mock test mode request carries at least two interfaces corresponding to the target scenario;

[0212] Find contract mock test cases for at least two interfaces corresponding to the target scenario, and test the found contract mock test cases to obtain the corresponding mock data.

[0213] In one possible implementation, the processing unit 702 is further configured to:

[0214] Receive Mock test mode switching request;

[0215] Based on the Mock test mode switching request, the scenario Mock test mode is switched to single-interface Mock test mode.

[0216] In one possible implementation, if the request to be processed is an interface processing request or a Mock data query request, then before determining the feedback information corresponding to the request information, the device further includes a verification unit, used for:

[0217] Perform contract mock verification on the requested information.

[0218] In one possible implementation, the device further includes a verification unit for:

[0219] Determine the request parameters in the request information, the request parameters including fields in the Uniform Resource Locator (URL) parameter and the values ​​corresponding to those fields;

[0220] If the field and its corresponding value conform to the contract definition in the contract testing and development platform, then the request information is determined to have passed the contract Mock verification.

[0221] If the field and its corresponding value do not conform to the contract definition in the contract testing and development platform, an error message is determined and sent to the triggering object corresponding to the development request.

[0222] In one possible implementation, if the request to be processed is an interface processing request, the processing unit 702 is specifically used for:

[0223] Determine the interface database corresponding to the interface definition platform connected to the contract testing R&D platform, and use the interface database as a shared information set corresponding to the identifier field;

[0224] From the interface database, determine the interface-related information corresponding to the request information as the feedback information.

[0225] In one possible implementation, if the request to be processed is a Mock data query request, the processing unit 702 is specifically used for:

[0226] Determine the test database corresponding to the interface test platform connected to the contract test R&D platform, and use the test database as a shared information set corresponding to the identifier field;

[0227] From the test database, the mock data corresponding to the request information is determined as the feedback information.

[0228] The specific details of each part of the above-mentioned device have been described in detail in the method section of the implementation plan. For any undisclosed details, please refer to the implementation plan of the method section, and therefore will not be repeated here.

[0229] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to exemplary embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.

[0230] Exemplary program product

[0231] Exemplary embodiments of this disclosure also provide a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the information processing method described above.

[0232] In one embodiment, the computer program product can be a tangible product containing a computer program, such as a computer-readable storage medium storing the computer program. The readable storage medium can be a storage medium based on electrical, magnetic, optical, electromagnetic, infrared, or other signals, including but not limited to: random access memory (RAM), read-only memory (ROM), magnetic tape, floppy disk, flash memory, hard disk drive (HDD), solid-state drive (SSD), etc. For example, the computer program product can be implemented as a non-volatile storage medium storing the computer program, such as read-only memory, NAND flash memory, etc.

[0233] In one implementation, the computer program product can be an intangible product containing a computer program. For example, the computer program product can be implemented as a virtual digital product, such as an executable file, installation package, or other digital file storing the computer program.

[0234] Computer program code can be written in one or more programming languages. Examples of programming languages ​​include C, Java, and C++. Program code can execute entirely on the user's computing device, partially on the user's computing device, or as a standalone software package. It can also execute partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, such as a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via an internet connection provided by a mobile network operator).

[0235] Computer programs can be carried or transmitted via signals such as electricity, magnetism, light, electromagnetic fields, and infrared radiation. Electronic devices can convert signals carrying computer programs into digital signals, thereby running the computer programs. When a computer program runs on an electronic device, its code is used to cause the electronic device to execute (more specifically, the processor of the electronic device to execute) the method steps of various exemplary embodiments of this disclosure. For example, the above-described information processing method can be executed, which includes the following steps: Step 301: Receive a request to be processed, the request carrying: an identifier field indicating the object executing the shared contract and request information for obtaining or querying shared information stored in the contract testing and development platform. Step 302: Determine the shared information set corresponding to the identifier field from the database corresponding to the contract testing and development platform, and determine the feedback information corresponding to the request information from the shared information set.

[0236] Implementing the above method steps via a computer program, the contract testing R&D platform is configured with shared contracts signed by multiple R&D participants. Therefore, when a pending request is received, which carries an identifier field indicating the object executing the shared contract and request information for retrieving or querying shared information stored on the contract testing R&D platform, the shared information set corresponding to the identifier field can be determined from the database corresponding to the contract testing R&D platform. Furthermore, feedback information corresponding to the request information can be determined from the shared information set. In other words, by implementing Mock data management and sharing based on the contract testing R&D platform, the convenience and reusability of data construction are improved. This allows front-end developers to quickly obtain feedback information to execute contract Mock tests, avoiding blockages caused by back-end developers not having developed the necessary code, and preventing R&D quality issues caused by front-end developers constructing data, thereby improving overall R&D efficiency and quality.

[0237] Exemplary electronic devices

[0238] Exemplary embodiments of this disclosure also provide an electronic device. The electronic device may include a processor and a memory. The memory stores executable instructions for the processor, such as computer programs. The processor executes these executable instructions to perform the method steps of various exemplary embodiments of this disclosure.

[0239] The following is for reference. Figure 8 The electronic device is illustrated by way of a general-purpose computing device. It should be understood that... Figure 8 The electronic device 800 shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments disclosed herein.

[0240] like Figure 8 As shown, the electronic device 800 may include: a processor 810, a memory 820, a bus 830, an I / O (input / output) interface 840, and a network adapter 850.

[0241] The memory 820 may include volatile memory, such as RAM 821 and cache unit 822, and may also include non-volatile memory, such as ROM 823. The memory 820 may also include one or more program modules 824, including but not limited to: an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. For example, program module 824 may include the modules described above.

[0242] The processor 810 may include one or more processing units, such as an AP (Application Processor), a modem processor, a GPU (Graphics Processing Unit), an ISP (Image Signal Processor), a controller, an encoder, a decoder, a DSP (Digital Signal Processor), a baseband processor, and / or an NPU (Neural-Network Processing Unit).

[0243] The processor 810 can be used to execute executable instructions stored in the memory 820, such as the information processing method described above, which includes the following steps: Step 301: Receive a request to be processed, the request carrying: an identifier field indicating the object executing the shared contract and request information for obtaining or querying shared information stored in the contract testing R&D platform. Step 302: Determine the set of shared information corresponding to the identifier field from the database corresponding to the contract testing R&D platform, and determine the feedback information corresponding to the request information from the set of shared information.

[0244] The processor 810 executes the above method steps. Since the contract testing R&D platform is configured with shared contracts signed by multiple R&D participants, when a pending request is received, which carries an identifier field indicating the object executing the shared contract and request information for obtaining or querying shared information stored in the contract testing R&D platform, the shared information set corresponding to the identifier field can be determined from the database corresponding to the contract testing R&D platform, and the feedback information corresponding to the request information can be determined from the shared information set. In other words, by implementing the management and sharing of Mock data based on the contract testing R&D platform, the convenience and reusability of data construction are improved. In this way, front-end developers can quickly obtain feedback information to execute contract Mock tests, thus avoiding being blocked due to the lack of development by back-end developers and avoiding R&D quality problems caused by front-end developers constructing data, thereby improving the overall R&D efficiency and quality.

[0245] Bus 830 is used to connect different components of electronic device 800 and may include data bus, address bus and control bus.

[0246] Electronic device 800 can communicate with one or more external devices 900 (such as keyboard, mouse, external controller, etc.) through I / O interface 840.

[0247] Electronic device 800 can communicate with one or more networks via network adapter 850. For example, network adapter 850 can provide mobile communication solutions such as 3G / 4G / 5G, or wireless communication solutions such as wireless LAN, Bluetooth, and near-field communication. Network adapter 850 can communicate with other modules of electronic device 800 via bus 830.

[0248] although Figure 8 As not shown in the diagram, other hardware and / or software modules may also be configured in the electronic device 800, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0249] As can be seen from the above, the technical solutions disclosed herein can be implemented as methods, apparatus, systems, computer program products, storage media, electronic devices, etc. Those skilled in the art will understand that various aspects of this disclosure can be specifically implemented in the following forms: a completely hardware implementation, a completely software implementation (including firmware, microcode, etc.), or a combination of hardware and software implementations, which may be referred to as "circuit," "module," or "system," respectively.

[0250] It should be understood that this disclosure is not limited to the specific methods, steps, or structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. Those skilled in the art will readily conceive of other embodiments based on the specific implementations provided in this disclosure. Therefore, the specific implementations provided in this disclosure are merely exemplary, and the scope and spirit of this disclosure are indicated by the claims, and should cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary technical means in the art not disclosed in this disclosure.

Claims

1. An information processing method, characterized in that, The method, applied to a contract testing development platform configured with shared contracts signed by multiple development participants, includes: Receive a pending request, the pending request carrying: an identifier field indicating the object executing the shared contract and request information for obtaining or querying the shared information stored in the contract testing and development platform; From the database corresponding to the contract testing and R&D platform, determine the shared information set corresponding to the identifier field, and from the shared information set, determine the feedback information corresponding to the request information.

2. The method according to claim 1, characterized in that, Before receiving the request to be processed, the method further includes: Receive shared contract initiation information from various R&D participants; Based on the shared contract initiation information and the identification information of each R&D participant, the account corresponding to each R&D participant is determined; different accounts can enable a Mock test case of the contract testing R&D platform.

3. The method according to claim 1, characterized in that, The method further includes: Receive data update requests; According to the data update request, the database corresponding to the contract testing R&D platform is updated; wherein, the database stores at least one of the following data: data generated by traffic recording, data generated by testing based on test interface API cases in the interface testing platform, and data accumulated by the gateway.

4. The method according to claim 1, characterized in that, The method further includes: Receive a Mock data construction request; From the database of the contract testing R&D platform, search for matching data that matches the request parameters included in the Mock data construction request; Based on the matching data, construct the corresponding Mock data.

5. The method according to claim 1, characterized in that, The method further includes: Receive a request to construct a contract mock test case; Based on the contract Mock test cases, construct the adaptation scenario of the request indication, determine the corresponding text test cases, and the return Mock data corresponding to the text test cases; Based on the text use case and the returned Mock data, construct the corresponding contract Mock test case.

6. The method according to claim 1, characterized in that, The method further includes: Receive a scenario Mock test mode request, wherein the scenario Mock test mode request carries at least two interfaces corresponding to the target scenario; Find contract mock test cases for at least two interfaces corresponding to the target scenario, and test the found contract mock test cases to obtain the corresponding mock data.

7. The method according to claim 6, characterized in that, The method further includes: Receive Mock test mode switching request; Based on the Mock test mode switching request, the scenario Mock test mode is switched to single-interface Mock test mode.

8. An information processing device, characterized in that, An apparatus for use in a contract testing development platform, wherein the contract testing development platform executes shared contracts signed by various development participants, the apparatus comprising: A receiving unit is used to receive a request to be processed, the request carrying: an identifier field indicating the object executing the shared contract and request information for obtaining or querying the shared information stored in the contract testing and development platform; The processing unit is used to determine the shared information set corresponding to the identifier field from the database corresponding to the contract testing R&D platform, and to determine the feedback information corresponding to the request information from the shared information set.

9. An electronic device, characterized in that, include: processor; Memory for storing the executable instructions of the processor; The processor is configured to perform the method of any one of claims 1-7 by executing the executable instructions.

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