Test method, device, electronic device and computer readable storage medium

By receiving the client's test request and matching the context parameters, generating test instances and configuration constraints, the problems of high and low efficiency of offline environment testing in the existing technology are solved, and efficient and low-cost testing efficiency is achieved.

CN111831566BActive Publication Date: 2025-05-09DOUYIN VISION CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010691632.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-07-17
Publication Date
2025-05-09
Estimated Expiration
2041-01-04

AI Technical Summary

Technical Problem

In the prior art, testing the services of the live broadcast platform through the individual deployment of offline environments, resulting in high costs, low testing efficiency, and online and offline data are prone to errors.

Method used

Provides a test method, by receiving a client's test request, matching context parameters with preset test environment parameters, generating test instances and configuring the constraints of the test service, responding to the test service call request and returning the result.

Benefits of technology

It solves the high cost and inefficiency problems of deploying offline environment testing separately, improves testing efficiency, and reduces the risk of online and offline data errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111831566B_ABST
    Figure CN111831566B_ABST
Patent Text Reader

Abstract

The disclosed embodiment discloses a test method, device, electronic device and computer-readable storage medium. The method includes: receiving a test request from a client; the test request includes context parameters of the client; matching the context parameters with preset test environment parameters; when the context parameters match the test environment parameters, generating a test instance according to the context parameters, and configuring constraints of the test service provided by the test instance; in response to a received call request for the test service of the test instance, returning a response result according to the constraints of the test service. The method solves the technical problems of high cost, low test efficiency and easy errors in online and offline data caused by testing various services by deploying offline environments separately in related technologies.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of data processing, and in particular to a testing method, device, electronic device, and computer-readable storage medium. Background Art

[0002] With the development of information technology, live broadcast platforms have also developed. In common online live broadcast platforms, in order to increase the fun of interaction between anchors and users and to encourage anchors to produce higher-quality live video content, virtual gift options are usually designed under the live video web page. Gift giving is the core experience of live broadcasting. In order to verify the correctness of gift giving, related technologies maintain a separate offline environment, with deployment and storage isolated from online. However, this approach has increasingly exposed some problems, such as the gradual migration of services to the cloud, the cumbersome deployment of services in offline environments, and the need to configure local data due to the sandbox mechanism. Misoperation can cause online and offline data to be dirty. Summary of the invention

[0003] This summary is provided to introduce concepts in a brief form that will be described in detail in the detailed description below. This summary is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.

[0004] In order to solve the above problems, the embodiments of the present disclosure propose the following technical solutions.

[0005] In a first aspect, an embodiment of the present disclosure provides a testing method, including:

[0006] receiving a test request from a client; the test request including context parameters of the client;

[0007] Matching the context parameters with preset test environment parameters;

[0008] When the context parameters match the test environment parameters, generating a test instance according to the context parameters, and configuring constraints of a test service provided by the test instance;

[0009] In response to the received call request for the test service for the test instance, a response result is returned according to the constraint condition of the test service.

[0010] In a second aspect, an embodiment of the present disclosure provides a testing device, including:

[0011] A receiving module, configured to receive a test request from a client; the test request includes context parameters of the client;

[0012] A matching module, used to match the context parameters with preset test environment parameters;

[0013] A generating module, configured to generate a test instance according to the context parameters when the context parameters match the test environment parameters, and to configure constraints of a test service provided by the test instance;

[0014] The returning module is used to respond to the received call request of the test service for the test instance and return a response result according to the constraint condition of the test service.

[0015] In a third aspect, an embodiment of the present disclosure provides an electronic device, including: at least one processor; and

[0016] A memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute any of the methods described in the first aspect above.

[0017] In a fourth aspect, an embodiment of the present disclosure provides a non-transitory computer-readable storage medium, characterized in that the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute any of the methods described in the first aspect.

[0018] The disclosed embodiment discloses a test method, device, electronic device and computer-readable storage medium. The method includes: receiving a test request from a client; the test request includes context parameters of the client; matching the context parameters with preset test environment parameters; when the context parameters match the test environment parameters, generating a test instance according to the context parameters, and configuring constraints of the test service provided by the test instance; in response to a received call request for the test service of the test instance, returning a response result according to the constraints of the test service. The method solves the technical problems of high cost, low test efficiency and easy errors in online and offline data caused by testing various services by deploying offline environments separately in related technologies.

[0019] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the following preferred embodiments are specifically cited and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.

[0021] Figure 1 A flow chart of a testing method provided in an embodiment of the present disclosure;

[0022] Figure 2 A schematic diagram of an implementation method of entering a test live broadcast room in a test method provided in an embodiment of the present disclosure;

[0023] Figure 3 A schematic diagram of an implementation of giving a virtual gift in the testing method provided in an embodiment of the present disclosure;

[0024] Figure 4 A schematic diagram of an application scenario of the test method provided in an embodiment of the present disclosure in a sandbox live broadcast room;

[0025] Figure 5 A schematic diagram of the structure of an embodiment of a testing device provided in an embodiment of the present disclosure;

[0026] Figure 6 It is a schematic diagram of the structure of an electronic device provided according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0027] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0028] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0029] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0030] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0031] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0032] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0033] Figure 1 This is a flow chart of a test method embodiment provided by an embodiment of the present disclosure. The test method provided by this embodiment can be executed by a test device, which can be implemented as software, or as a combination of software and hardware. The test device can be integrated in a device in the test system, such as a test server. Figure 1 As shown, the method comprises the following steps:

[0034] Step S101, receiving a test request from a client; the test request includes context parameters of the client.

[0035] Among them, the client can be a test APP, and the installed software package on the test APP can be a test version instead of a formal version, and its context parameters can also be context parameters of the test version, for example, it can include but not limited to the version type of the client (such as a test version type), user identification, test instance identification, etc. Among them, when the software package installed by the client is a test version, the version type in the context parameter is a test version type, and when the software package installed by the client is a formal version, the version type in the context parameter is a formal type. The user identification can be information used to identify the identity of the user using the client, such as a user ID. When distributing software packages, the server distributes them according to the user identification, distributes the test version of the software package to the test user, and distributes the formal version to non-test users. The server can record the corresponding user identification when distributing the test version of the software package, and record the user identification for subsequent matching. When the software installed by the client surrounds the test version, the user identification in the context parameter matches the user identification recorded in the system that has distributed the test version, and when the software package installed by the client is a formal version, the user identification in the context parameter does not match the user identification recorded in the system that has distributed the test version. When a client with the test version installed requests to create a test instance, the test instance identifier can be set to the default value in the test request. When the client with the test version installed calls the test service for the test instance, the test instance identifier can be the real test instance identifier assigned after the test instance is created on the server.

[0036] In one embodiment of the present disclosure, a client with a test version installed can initiate a test request to the server, and the test request may include the context parameters of the client. Taking the test of the live broadcast room of the live broadcast network as an example, the server can distribute the test version of the live broadcast network APP to a specific user device for installation, and record the user ID of the user device. After the user device has installed the test version of the live broadcast network APP, it can use the test version of the live broadcast network APP to perform service testing. Optionally, during the test process, the user can create a test live broadcast room through the live broadcast network APP to test various services provided in the live broadcast room. The live broadcast network APP sends a test request to the server based on the user's request to create a test live broadcast room. The test request may include the context parameters of the live broadcast network APP, such as the context parameters including the client version type (for internal test version), user ID (user ID recorded on the server side when distributing the test version) and test instance ID (since the test live broadcast room has not been created at this time, it can be set to a default value).

[0037] Step S102: Match the context parameters with preset test environment parameters.

[0038] Among them, the preset test environment parameters may include the client version type as an internal test version, a user identifier in the whitelist, and a test instance identifier (the identifier is the default value when creating a test instance). When the context parameters carried in the test request match the preset test environment parameters, it can be determined that the current test request is sent by a legitimate test user and the client used is a test version. If the context parameters do not match the preset test environment parameters, for example, the client version type carried in the context parameters is a formal version, the user identifier is not in the whitelist, or the test instance identifier is not the default value or is not a created test instance identifier, it can be determined that the current test request is not sent by a legitimate test user.

[0039] Exemplarily, step S102 includes:

[0040] Determine whether the client version type is a test version, whether the user identifier is in a whitelist, and whether the test instance identifier is a default value.

[0041] The whitelist list can be preset, for example, when distributing the test version to the user device, the user ID corresponding to the user device that distributes the test version software package and successfully installs the test version software package is added to the whitelist list. The default value is the default value of the test instance identifier. Since the actual test instance identifier has not been generated when the client requests to create a test instance, the client can carry the default value in the context parameter so that the server can confirm that the context parameter matches the preset test environment parameter.

[0042] Exemplarily, the method further includes:

[0043] The test version is released to the user device, and the user ID corresponding to the user device is added to the whitelist list.

[0044] Among them, the user device can be the user device used by the tester. The server distributes the test version of the software package to the user device of the tester. After the test version of the software package is successfully installed on the user device, the server adds the user identifier corresponding to the user device to the whitelist list to allow the user identifier to request the creation of a test instance and call the test service provided by the test instance.

[0045] Step S103 : when the context parameter matches the test environment parameter, a test instance is generated according to the context parameter, and constraint conditions of a test service provided by the test instance are configured.

[0046] When the context parameters of the client sending the test request match the test environment parameters, a test instance may be generated based on the context parameters, and constraints of the test service provided by the test instance may be configured.

[0047] The test instance can be, for example, a live webcast room in a live webcast APP, and the test server provided by the test instance can be various services in the live webcast room, such as gift-giving services, special effects services, list update services, and full-site message display services. The test user sends a request to the server to create a test live webcast room by installing the test version of the live webcast APP. After the server determines that the context parameters in the test request match the preset test environment parameters, it creates a test live webcast room based on the test request and returns the room number of the test live webcast room (that is, the actual test instance identifier) ​​to the client. At the same time, the various services provided in the test live webcast room are configured with constraints so that the tester can smoothly test various services. For example, the gift-giving service in the test live webcast room can be configured with a constraint that gifts do not cost money, that is, when the tester tests the gift-giving service in the test live webcast room, he does not need to deduct the account balance, but directly uses the gift-giving service.

[0048] Step S104: in response to the received call request for the test service for the test instance, return a response result according to the constraint condition of the test service.

[0049] Among them, after creating a test instance for the test request of the client whose context parameters match the preset test environment parameters, the test user can call various test services provided by the test instance through the client request. After the server receives the call request for the test service provided by the test instance sent by the client, it can return the response result of the test service according to the configured constraints. The following is still explained using the live broadcast APP as an example. When the test user calls the test service provided in the test live broadcast room, the server can first obtain the call result of the test service according to the constraints configured for the called test service. For example, the test user uses the gift service in the test live broadcast room. After receiving the gift service request, the server does not check the user account balance, but directly returns the response result of the gift service to the live broadcast APP.

[0050] Optionally, after receiving a call request for a test service provided by a test instance, the server can first verify whether the context parameters carried in the call request match the preset test environment parameters (the test instance identifier in the context parameters is the actual test instance identifier, not the default value). If they match, a response result is returned according to the configured constraints, otherwise an error message is returned. In this way, illegal persons can be prevented from using the services of the test live broadcast room.

[0051] Optional, such as Figure 2 As shown, the test instance is a test live broadcast room; the call request is to enter the test live broadcast room, and the step S104 includes:

[0052] Step S201, in response to the call request, determining whether the user identifier in the call request is in a whitelist;

[0053] Step S202, when the user identifier is in the whitelist, return the parameters of the test live broadcast room so that the user can enter the test live broadcast room.

[0054] Among them, for the test live broadcast room, when the user requests to enter the test live broadcast room through the network live broadcast APP, the server must first verify whether the user ID in the context parameter of the network live broadcast APP is in the white list. If the user ID is in the white list, the user is allowed to enter the test live broadcast room. If the user is not a member of the white list, the user is denied entry to the test live broadcast room. In this way, the mutual isolation of test users and online users can be achieved.

[0055] Optionally, the parameters of the test live broadcast room may be information such as the room number of the test live broadcast room, so that the live broadcast APP can obtain relevant data of the test live broadcast room according to the parameters and display the content of the test live broadcast room on the user device.

[0056] Optionally, the step S104 further includes:

[0057] When the user identification is not in the whitelist, an error parameter is returned to deny the user entry into the test live broadcast room.

[0058] Among them, when the user identifier requesting to enter the test live broadcast room is not in the whitelist, it means that the context parameters corresponding to the user identifier are inconsistent with the preset test environment parameters, that is, the user is not a legitimate tester and therefore cannot use the services in the test live broadcast room. An error parameter can be returned to the live broadcast APP to refuse the live broadcast APP from displaying the content in the test live broadcast room to the user.

[0059] Optionally, the test instance is a test live broadcast room; the call request is to send a virtual gift; and step S104 includes:

[0060] In response to the calling request, when the context parameter corresponding to the calling request matches the test environment parameter, a response message indicating successful gift delivery is returned.

[0061] Among them, after the test user enters the test live broadcast room, if he requests to call the gift service, the server can first verify whether the corresponding context parameters in the call request match the preset test environment parameters after receiving the call request. If they match, the response information of successful gift delivery can be directly returned without checking the balance in the user's account. In this way, the isolation of testing and online is achieved by distinguishing between the test live broadcast room and the formal online live broadcast room.

[0062] Optional, such as Figure 3 As shown, the test instance is a test live broadcast room; the call request is to send a virtual gift, and the step S104 includes:

[0063] Step S301, when the context parameter corresponding to the call request matches the test environment parameter, assigning a virtual price to the virtual gift;

[0064] Step S302, updating the list information of the test live broadcast room according to the virtual price.

[0065] Among them, since the list of the live broadcast room is bound to the value of the gifts received by the live broadcast room, the higher the value of the gifts received, the higher the ranking of the live broadcast room in the list. For the test live broadcast room, each time the user calls the gift sending service to send a virtual gift, although the user's account balance is not checked, a virtual price can be assigned to the gift sent by the call request, and the list information of the test live broadcast room can be updated based on the virtual price.

[0066] Optionally, the test instance is a test live broadcast room; the call request is a special effect request; and step S104 includes:

[0067] In response to the call request, when the context parameter corresponding to the call request matches the test environment parameter, a gift list under the test environment is returned.

[0068] In this optional implementation, after the test user enters the test live broadcast room, if the test user requests to call the special effects service, the server can first verify whether the corresponding context parameters in the call request match the preset test environment parameters after receiving the call request. If they match, the preset test gift list in the test environment can be returned. Optionally, the preset test gift list can be a gift list different from the online official version, that is, a gift list specifically used for testing. The tester can test the various gifts in the received test gift list, and put the tested gifts online after the test passes.

[0069] Optionally, the test instance is a test live broadcast room; the method may further include:

[0070] In response to a display event of a platform message, when the platform message is a message that matches the test live broadcast room, the platform message is displayed in the test live broadcast room.

[0071] In this optional implementation, since the test live broadcast room and the formal online live broadcast room exist at the same time, after the whole site message is generated in the server, the whole site message will be sent to each live broadcast room for display. In order to achieve the isolation between the test live broadcast room and the formal online live broadcast room, a message that is only displayed in the test live broadcast room can be set. Therefore, after the display event of the platform message occurs, it can be determined whether the platform message is a message displayed in the preset test live broadcast room. If so, the platform message is displayed in the test live broadcast room. If the platform message is not a message displayed in the test live broadcast room, the message is not displayed in the test live broadcast room. For example, an identifier can be set for the platform message. If the identifier matches the preset identifier of the test live broadcast room, the platform message can be considered to be a message displayed in the test live broadcast room.

[0072] The following uses the sandbox live broadcast room as an example to illustrate the application scenario of the embodiment of the present disclosure.

[0073] Figure 4 This is a schematic diagram of the application scenario of the test method provided by the embodiment of the present disclosure in the sandbox live broadcast room. Figure 4 As shown, the software package distribution server distributes the official version of the software package and the test version of the software package to each user device. For example, the official version of the software package (such as Figure 4 The ID1 device shown in FIG. 1 is used to distribute the test version of the software package to the user device of the test user (such as Figure 4After the ID1 device installs the official version of the software package, the live broadcast client installed and running sends a request to the live broadcast server to create a live broadcast room. The request carries the context parameters of the official version. The live broadcast server creates a normal live broadcast room for the ID1 device according to the request; and after the ID2-ID4 devices install the test version of the software package, the live broadcast client installed and running sends a request to the live broadcast server to create a live broadcast room. The request carries the context parameters of the test version. The context parameters include the test version type, the user ID in the whitelist (ID2, ID3 or ID4), and the live broadcast room ID (because the live broadcast room has not been successfully created on the server, the live broadcast room ID is set to the default value at this time); after the live broadcast server receives the context parameters of the test version, because the context parameters match the preset test environment parameters, it can create a sandbox room and configure the behavior constraints of various services in the sandbox environment. For example, the device of user ID2-ID4 sends a request to create a live broadcast room through the client. The server determines that it is a sandbox environment through the context parameters. In this case, a preset label can be added to the live broadcast room ID to indicate that the live broadcast room is a sandbox room, that is, a test live broadcast room, not an ordinary live broadcast room. Through this constraint, it is possible to intuitively determine whether it is a sandbox room from the live broadcast room ID to avoid unnecessary calls; for requests to enter the sandbox live broadcast room, if the user ID is a non-sandbox user, that is, a user ID not in the whitelist, the user cannot enter the sandbox live broadcast room; when giving a gift, if the context parameters are consistent with the test environment parameters If the user balance is not matched, the gift will be returned directly without checking the user balance. In addition, for special effect-related services, different gift test lists can be returned when the context parameters match the test environment parameters, so that testers can test the functions in the gift test list and put the gifts online after passing the test. Regarding the list, since live broadcasts need to provide various lists to stimulate consumption, and current live broadcast rooms usually use gift messages to update the list, the gift-giving service virtualizes the gift price in the sandbox live broadcast room so that the list can be tested. Regarding the whole site message, the sandbox live broadcast room message can also be provided, which is only displayed in all sandbox live broadcast rooms. Test users can also exit the sandbox mode. There are two specific ways: install the official version of the software package on the device and remove the user ID from the whitelist. On the client side, the user balance is not checked when sending gifts in the sandbox live broadcast room, and the user will be prompted that he is in the sandbox live broadcast room. When the client obtains the feature list, it needs to report the room ID to the server.

[0074] The disclosed embodiment discloses a test method, which includes: receiving a test request from a client; the test request includes context parameters of the client; matching the context parameters with preset test environment parameters; when the context parameters match the test environment parameters, generating a test instance according to the context parameters, and configuring constraints of the test service provided by the test instance; in response to a received call request for the test service of the test instance, returning a response result according to the constraints of the test service. The technical problems of high cost, low test efficiency, and easy errors in online and offline data caused by testing various services by deploying offline environments separately in related technologies are solved.

[0075] In the above, although the various steps in the above method embodiment are described in the above order, those skilled in the art should be aware that the steps in the embodiments of the present disclosure are not necessarily executed in the above order, and they may also be executed in other orders such as reverse order, parallel order, and cross order. Moreover, on the basis of the above steps, those skilled in the art may also add other steps. These obvious variations or equivalent replacement methods should also be included in the protection scope of the present disclosure and will not be repeated here.

[0076] Figure 5 A schematic diagram of the structure of a test device embodiment provided in the present disclosure, such as Figure 5 As shown, the device 500 includes: a receiving module 501, a matching module 502, a generating module 503 and a returning module 504.

[0077] in,

[0078] The receiving module 501 is used to receive a test request from a client; the test request includes the data of the client;

[0079] A matching module 502, used to match the context parameters with preset test environment parameters;

[0080] A generating module 503, configured to generate a test instance according to the context parameters when the context parameters match the test environment parameters, and to configure constraints of the test service provided by the test instance;

[0081] The return module 504 is configured to return a response result according to the constraint condition of the test service in response to the received call request of the test service for the test instance.

[0082] Furthermore, the context parameters include: client version type, user identifier and test instance identifier.

[0083] Furthermore, the matching module 502 includes:

[0084] The first determination submodule is used to determine whether the client version type is a test version, whether the user identifier is in a whitelist, and whether the test instance flag is a default value.

[0085] Furthermore, the testing device 500 further includes:

[0086] The publishing module is used to publish the test version of the client to the user equipment and add the user identification corresponding to the user equipment to the whitelist.

[0087] Further, the test instance is a test live broadcast room; the call request is to enter the test live broadcast room; the return module 504 includes:

[0088] A second determination submodule is used to determine, in response to the call request, whether the user identifier in the call request is in a whitelist;

[0089] The first return submodule is used to return the parameters of the test live broadcast room when the user identifier is in the white list, so that the user can enter the test live broadcast room.

[0090] Furthermore, the returning module 504 further includes:

[0091] The second return submodule is used to return an error parameter when the user identifier is not in the whitelist to prevent the user from entering the test live broadcast room.

[0092] Further, the test instance is a test live broadcast room; the call request is to send a virtual gift; the return module 504 includes:

[0093] The third return submodule is used to respond to the call request and return a response message indicating that the gift is successfully sent when the context parameter corresponding to the call request matches the test environment parameter.

[0094] Furthermore, the test instance is a test live broadcast room; the call request is to send a virtual gift; the return module 504 further includes:

[0095] A price virtualization submodule, used for assigning a virtual price to the virtual gift when the context parameter corresponding to the call request matches the test environment parameter;

[0096] An updating submodule is used to update the list information of the test live broadcast room according to the virtual price.

[0097] Further, the test instance is a test live broadcast room; the call request is a special effect request; the return module 504 includes:

[0098] The fourth return submodule is used to respond to the call request and return a test gift list under the test environment when the context parameter corresponding to the call request matches the test environment parameter.

[0099] Further, the test instance is a test live broadcast room; the test device 500 also includes:

[0100] The display module is used to respond to the display event of the platform message and display the platform message in the test live broadcast room when the platform message is a message that matches the test live broadcast room.

[0101] Figure 5 The device shown can perform Figure 1-Figure 4 For the method of the embodiment shown in the figure, the part not described in detail in this embodiment can be referred to Figure 1-Figure 4 The implementation process and technical effects of this technical solution refer to Figure 1-Figure 4 The description in the illustrated embodiment will not be repeated here.

[0102] Reference below Figure 6 , which shows a schematic diagram of the structure of an electronic device 600 suitable for implementing the embodiment of the present disclosure. The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle terminals (such as vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 6 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0103] like Figure 6 As shown, the electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0104] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 6 The electronic device 600 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0105] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 609, or installed from a storage device 608, or installed from a ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0106] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0107] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0108] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0109] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: obtains a data set, wherein the data set includes multiple labeled data, each labeled data includes a first data and at least one label; calculates the characteristics of the label based on the first data corresponding to the label; and updates the label of the first data in the data set based on the characteristics of the label.

[0110] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0111] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0112] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a unit does not, in some cases, limit the unit itself.

[0113] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0114] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0115] According to one or more embodiments of the present disclosure, a testing method is provided, comprising:

[0116] receiving a test request from a client; the test request including context parameters of the client;

[0117] Matching the context parameters with preset test environment parameters;

[0118] When the context parameters match the test environment parameters, generating a test instance according to the context parameters, and configuring constraints of a test service provided by the test instance;

[0119] In response to the received call request for the test service for the test instance, a response result is returned according to the constraint condition of the test service.

[0120] Furthermore, the context parameters include: client version type, user identifier and test instance identifier.

[0121] Further, matching the context parameters with preset test environment parameters includes:

[0122] Determine whether the client version type is a test version, whether the user identifier is in a whitelist, and whether the test instance flag is a default value.

[0123] Furthermore, the method further comprises:

[0124] The test version of the client is released to the user equipment, and the user identification corresponding to the user equipment is added to the whitelist.

[0125] Further, the test instance is a test live broadcast room; the call request is to enter the test live broadcast room; in response to the received call request for the test service for the test instance, a response result is returned according to the constraint condition of the test service, including:

[0126] In response to the call request, determining whether the user identifier in the call request is located in a whitelist;

[0127] When the user identification is in the whitelist, the parameters of the test live broadcast room are returned to enable the user to enter the test live broadcast room.

[0128] Further, in response to the received call request for the test service for the test instance, returning a response result according to the constraint condition of the test service, further comprising:

[0129] When the user identification is not in the whitelist, an error parameter is returned to deny the user entry into the test live broadcast room.

[0130] Further, the test instance is a test live broadcast room; the call request is to send a virtual gift; in response to the received call request for the test service for the test instance, a response result is returned according to the constraint condition of the test service, including:

[0131] In response to the calling request, when the context parameter corresponding to the calling request matches the test environment parameter, a response message indicating successful gift delivery is returned.

[0132] Further, the test instance is a test live broadcast room; the call request is to send a virtual gift; in response to the received call request of the test service for the test instance, a response result is returned according to the constraint condition of the test service, and further includes:

[0133] When the context parameter corresponding to the call request matches the test environment parameter, assigning a virtual price to the virtual gift;

[0134] Update the list information of the test live broadcast room according to the virtual price.

[0135] Further, the test instance is a test live broadcast room; the call request is a special effect request; in response to the received call request of the test service for the test instance, a response result is returned according to the constraint condition of the test service, including:

[0136] In response to the call request, when the context parameter corresponding to the call request matches the test environment parameter, a test gift list under the test environment is returned.

[0137] Further, the test instance is a test live broadcast room; the method further includes:

[0138] In response to a display event of a platform message, when the platform message is a message that matches the test live broadcast room, the platform message is displayed in the test live broadcast room.

[0139] According to one or more embodiments of the present disclosure, a testing device is provided, comprising:

[0140] A receiving module, configured to receive a test request from a client; the test request includes context parameters of the client;

[0141] A matching module, used to match the context parameters with preset test environment parameters;

[0142] A generating module, configured to generate a test instance according to the context parameters when the context parameters match the test environment parameters, and to configure constraints of a test service provided by the test instance;

[0143] The returning module is used to respond to the received call request of the test service for the test instance and return a response result according to the constraint condition of the test service.

[0144] Furthermore, the context parameters include: client version type, user identifier and test instance identifier.

[0145] Furthermore, the matching module includes:

[0146] The first determination submodule is used to determine whether the client version type is a test version, whether the user identifier is in a whitelist, and whether the test instance flag is a default value.

[0147] Furthermore, the testing device also includes:

[0148] The publishing module is used to publish the test version of the client to the user equipment and add the user identification corresponding to the user equipment to the whitelist.

[0149] Further, the test instance is a test live broadcast room; the call request is to enter the test live broadcast room; the return module includes:

[0150] A second determination submodule is used to determine, in response to the call request, whether the user identifier in the call request is in a whitelist;

[0151] The first return submodule is used to return the parameters of the test live broadcast room when the user identifier is in the white list, so that the user can enter the test live broadcast room.

[0152] Furthermore, the return module further includes:

[0153] The second return submodule is used to return an error parameter when the user identifier is not in the whitelist to prevent the user from entering the test live broadcast room.

[0154] Further, the test instance is a test live broadcast room; the call request is to send a virtual gift; the return module includes:

[0155] The third return submodule is used to respond to the call request and return a response message indicating that the gift is successfully sent when the context parameter corresponding to the call request matches the test environment parameter.

[0156] Furthermore, the test instance is a test live broadcast room; the call request is to send a virtual gift; and the return module further includes:

[0157] A price virtualization submodule, used for assigning a virtual price to the virtual gift when the context parameter corresponding to the call request matches the test environment parameter;

[0158] An updating submodule is used to update the list information of the test live broadcast room according to the virtual price.

[0159] Further, the test instance is a test live broadcast room; the call request is a special effect request; and the return module includes:

[0160] The fourth return submodule is used to respond to the call request and return a test gift list under the test environment when the context parameter corresponding to the call request matches the test environment parameter.

[0161] Further, the test instance is a test live broadcast room; the device also includes:

[0162] The display module is used to respond to the display event of the platform message and display the platform message in the test live broadcast room when the platform message is a message that matches the test live broadcast room.

[0163] According to one or more embodiments of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute any of the aforementioned test methods.

[0164] According to one or more embodiments of the present disclosure, a non-transitory computer-readable storage medium is provided, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute any of the aforementioned test methods.

[0165] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

Claims

1. A testing method, characterized in that: Applicable to servers, including: Receive a test request from a client; the test request includes context parameters of the client; the context parameters include: a test instance identifier; Matching the context parameters with preset test environment parameters; When the context parameter matches the test environment parameter, a test instance is generated according to the context parameter, the test instance identifier is returned to the client, and constraints of the test service provided by the test instance are configured, wherein the test instance identifier is used by the client to display the test instance according to the test instance identifier; In response to the received call request for the test service for the test instance, returning a response result according to the constraint condition of the test service; The test instance is a test live broadcast room; the call request is to give a virtual gift; in response to the received call request of the test service for the test instance, a response result is returned according to the constraint condition of the test service, including: In response to the call request, when the context parameter corresponding to the call request matches the test environment parameter, a response message indicating that the gift is delivered successfully is returned; wherein the test instance identifier in the context parameter corresponding to the call request is the actual test instance identifier; Matching the context parameters with preset test environment parameters includes: Determine whether the test instance identifier is a default value.

2. The method according to claim 1, characterized in that The context parameters include: client version type and user identification.

3. The method according to claim 2, characterized in that Matching the context parameters with preset test environment parameters includes: Determine whether the client version type is a test version and whether the user identifier is in a whitelist.

4. The method according to any one of claims 1 to 3, characterized in that: Also includes: The test version of the client is released to the user equipment, and the user identification corresponding to the user equipment is added to the whitelist.

5. The method according to any one of claims 1 to 3, characterized in that: The test instance is a test live broadcast room; the call request is to enter the test live broadcast room; in response to the received call request of the test service for the test instance, a response result is returned according to the constraint condition of the test service, including: In response to the call request, determining whether the user identifier in the call request is located in a whitelist; When the user identification is in the whitelist, the parameters of the test live broadcast room are returned to enable the user to enter the test live broadcast room.

6. The method according to claim 5, characterized in that In response to the received call request for the test service for the test instance, returning a response result according to the constraint condition of the test service, further comprising: When the user identification is not in the whitelist, an error parameter is returned to deny the user entry into the test live broadcast room.

7. The method according to claim 1, characterized in that The test instance is a test live broadcast room; the call request is to send a virtual gift; in response to the received call request of the test service for the test instance, a response result is returned according to the constraint condition of the test service, and further includes: When the context parameter corresponding to the call request matches the test environment parameter, assigning a virtual price to the virtual gift; Update the list information of the test live broadcast room according to the virtual price.

8. The method according to any one of claims 1 to 3, characterized in that: The test instance is a test live broadcast room; the call request is a special effect request; in response to the received call request of the test service for the test instance, a response result is returned according to the constraint condition of the test service, including: In response to the call request, when the context parameter corresponding to the call request matches the test environment parameter, a test gift list under the test environment is returned.

9. The method according to any one of claims 1 to 3, characterized in that: The test instance is a test live broadcast room; the method further includes: In response to a display event of a platform message, when the platform message is a message that matches the test live broadcast room, the platform message is displayed in the test live broadcast room.

10. A testing device, characterized in that: Applicable to servers, including: A receiving module, configured to receive a test request from a client; the test request includes context parameters of the client; the context parameters include: a test instance identifier; A matching module, used to match the context parameters with preset test environment parameters; A generation module, configured to generate a test instance according to the context parameters when the context parameters match the test environment parameters, return the test instance identifier to the client, and configure constraints on the test service provided by the test instance, wherein the test instance identifier is used by the client to display the test instance according to the test instance identifier; A return module, configured to respond to the received call request of the test service for the test instance and return a response result according to the constraint condition of the test service; The test instance is a test live broadcast room; the call request is to give a virtual gift; in response to the received call request of the test service for the test instance, a response result is returned according to the constraint condition of the test service, including: In response to the call request, when the context parameter corresponding to the call request matches the test environment parameter, a response message indicating that the gift is delivered successfully is returned; wherein the test instance identifier in the context parameter corresponding to the call request is the actual test instance identifier; Matching the context parameters with preset test environment parameters includes: Determine whether the test instance identifier is a default value.

11. An electronic device, comprising: a memory for storing computer readable instructions; as well as A processor, configured to execute the computer-readable instructions, so that the processor implements the method according to any one of claims 1-9 when executed.

12. A non-transitory computer-readable storage medium, used for storing computer-readable instructions, which, when executed by a computer, causes the computer to execute the method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Scheme test method and server

    CN106856439A

  • Test method, terminal device and mock server

    CN111026672A