CN111639027B - Test method and device and electronic equipment - Google Patents

Test method and device and electronic equipment Download PDF

Info

Publication number
CN111639027B
CN111639027B CN202010451706.5A CN202010451706A CN111639027B CN 111639027 B CN111639027 B CN 111639027B CN 202010451706 A CN202010451706 A CN 202010451706A CN 111639027 B CN111639027 B CN 111639027B
Authority
CN
China
Prior art keywords
test
configuration file
branch
test configuration
tested
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010451706.5A
Other languages
Chinese (zh)
Other versions
CN111639027A (en
Inventor
李欢
王学兵
杜英豪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202010451706.5A priority Critical patent/CN111639027B/en
Publication of CN111639027A publication Critical patent/CN111639027A/en
Application granted granted Critical
Publication of CN111639027B publication Critical patent/CN111639027B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3692Test management for test results analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application discloses a testing method, a testing device and electronic equipment, and relates to the technical field of testing. The specific implementation scheme is as follows: the method comprises the following steps: receiving a first notification related to an object to be detected, which is sent by a background server, wherein the first notification comprises attribute information of a user side; obtaining a test configuration file of an object to be tested, wherein the test configuration file is pulled from a server cluster or is pulled from a background server under the condition that the test configuration file is not pulled from the server cluster, the test configuration file comprises labels of a plurality of branches, and the versions of the object to be tested corresponding to each branch are different; and testing based on the test configuration file to obtain a test result. Even if the test configuration file cannot be pulled from the server cluster, the test configuration file can be pulled from the background server, so that the file pulling stability can be improved, and the test is performed by using the pulled test configuration file, so that the test stability can be improved.

Description

Test method and device and electronic equipment
Technical Field
The present disclosure relates to the field of testing technologies of computer technologies, and in particular, to a testing method and apparatus, and an electronic device.
Background
With the deep development of internet application, human beings gradually advance an era of information explosion from the era of lack of information, and each large application is in order to improve the product competitiveness, and the product iteration speed is faster and faster, but blindly increases new functions, changes the existing use habit of users, and may cause a large amount of user feedback, which is contrary to expectations. In order to better improve product quality and user experience, gray level distribution or AB testing technology is generally adopted in product design, wherein AB testing is simply a method for selecting an optimal solution from two or more optimal solutions of products.
At present, in the AB test process of a product, test configuration information for testing needs to be pulled to conduct testing, however, the stability is poor in the process of pulling the configuration information at present, and the stability of testing is poor easily.
Disclosure of Invention
The application provides a testing method, a testing device and electronic equipment, and aims to solve the problem of poor testing stability in the prior art.
In a first aspect, an embodiment of the present application provides a test method, including:
receiving a first notification related to an object to be detected, which is sent by a background server, wherein the first notification comprises attribute information of a user side;
Obtaining a test configuration file of the object to be tested, wherein the test configuration file is pulled from a server cluster or is pulled from the background server under the condition that the test configuration file is not pulled from the server cluster, the test configuration file comprises labels of a plurality of branches, and the versions of the object to be tested corresponding to each branch are different;
and testing based on the test configuration file to obtain a test result.
In the test method of the embodiment of the application, in the process of acquiring the test configuration file, the test configuration file can be pulled from the server cluster first, if the test configuration file can be pulled from the server cluster, the test can be performed by the test configuration file pulled from the server cluster later, if the test configuration file cannot be pulled from the server cluster, and then the test configuration file can be pulled from the background server even if the test configuration file cannot be pulled from the server cluster, the file pulling stability can be improved, and the test can be performed based on the test configuration file later, so that the test of the object to be tested can be completed, and the test stability can be improved.
In a second aspect, one embodiment of the present application provides a test apparatus comprising:
The first receiving module is used for receiving a first notification related to the object to be detected, which is sent by the background server, wherein the first notification comprises attribute information of a user side;
the first acquisition module is used for acquiring a test configuration file of the object to be tested, wherein the test configuration file is pulled from a server cluster or is pulled from the background server under the condition that the test configuration file is not pulled from the server cluster, the test configuration file comprises labels of a plurality of branches, and the versions of the object to be tested corresponding to each branch are different;
and the test module is used for testing based on the test configuration file to obtain a test result.
In the test device of the embodiment of the application, in the process of acquiring the test configuration file, the test configuration file can be pulled from the server cluster first, if the test configuration file can be pulled from the server cluster, the test can be performed by the test configuration file pulled from the server cluster later, if the test configuration file cannot be pulled from the server cluster, and then the test configuration file can be pulled from the background server even if the test configuration file cannot be pulled from the server cluster, the file pulling stability can be improved, and the test can be performed based on the test configuration file later, so that the test of the object to be tested is completed.
In a third aspect, an embodiment of the present application further provides an electronic device, including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein, the liquid crystal display device comprises a liquid crystal display device,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the methods provided by the embodiments of the present application.
In a fourth aspect, one embodiment of the present application also provides a non-transitory computer-readable storage medium storing computer instructions for causing the computer to perform the methods provided by the embodiments of the present application.
Drawings
The drawings are for better understanding of the present solution and do not constitute a limitation of the present application. Wherein:
FIG. 1 is one of the flow diagrams of the test method of one embodiment provided herein;
FIG. 2 is a second flow chart of a testing method according to one embodiment of the present application;
FIG. 3 is a flow chart of a test profile generation stage in a test method according to one embodiment of the present application;
FIG. 4 is a flow chart of a test profile issue stage in a test method according to one embodiment of the present application;
FIG. 5 is a flow chart of a test profile pull phase in a test method according to one embodiment of the present application;
FIG. 6 is a schematic block diagram of a test system for implementing the test method of the embodiments of the present application;
FIG. 7 is one of the block diagrams of the test apparatus of one embodiment provided herein;
FIG. 8 is a second block diagram of a test apparatus according to one embodiment provided herein;
fig. 9 is a block diagram of an electronic device for implementing the test method of the embodiments of the present application.
Detailed Description
Exemplary embodiments of the present application are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present application to facilitate understanding, and should be considered as merely exemplary. Accordingly, one of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present application. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
As shown in fig. 1, according to an embodiment of the present application, the present application provides a testing method, which may be applied to an electronic device, and the electronic device may be a testing server, including:
Step S101: and receiving a first notification related to the object to be detected, which is sent by a background server, wherein the first notification comprises attribute information of a user side.
The test method is an AB test method, and the background server is a server corresponding to the object to be tested and can respond to the operation in the object to be tested. The object to be tested can be any object to be tested, for example, an application to be tested, a functional interface to be tested of the application, a webpage to be tested and the like. The first notification is a notification sent after the background server receives a first request related to the object to be detected, which is sent by the user side. The user can use the object to be tested at the user terminal, and respond to the operation of the user, a first request aiming at the object to be tested can be sent to the test server, so that the first request related to the object to be tested, sent by the user terminal, is received, the first request comprises attribute information of the user terminal, and the background server can send the first notification to the test server based on the first request so as to inform the test server of carrying out branch matching on the user terminal.
Step S102: and obtaining a test configuration file of the object to be tested.
That is, after receiving the first notification, the test configuration file of the object to be tested can be obtained corresponding to the first notification. The test configuration file is pulled from the server cluster or from a background server under the condition that the test configuration file is not pulled from the server cluster, and the test configuration file comprises a plurality of branches of labels, and the versions of the objects to be tested corresponding to each branch are different. For example, the object to be tested is a webpage to be tested, different versions of the webpage to be tested are required, the colors of the page topics are different, for example, two branches are provided, the corresponding versions are the webpage to be tested of the red page topic and the webpage to be tested of the blue page topic, and the colors of the page topics of the two versions are different.
In this embodiment, a test configuration file is stored in a server cluster, and a test configuration file is also stored in a background server, where the test configuration file may be pulled from the server cluster first, if the test configuration file can be successfully pulled from the server cluster, the test configuration file is obtained as a basis for a subsequent processing procedure, and if the test configuration file cannot be pulled from the server cluster, for example, if the server cluster has a problem, the pull of the test configuration file fails, or the pull result is null, and at this time, the test configuration file may be pulled from the background server. The background server can be understood as a local server, and the server cluster can be understood as an external server cluster, that is, the test configuration file is pulled from the server first, if the test configuration file is pulled from the server cluster, the pulled test configuration file is directly used in the subsequent process, and if the test configuration file is not pulled from the server cluster and is pulled from the background server, so that the pulling efficiency can be improved, the stability of file pulling can be improved, and the stability of test can be improved.
After the attribute information of the user terminal is obtained, the user terminal needs to be divided, and the test configuration file has a plurality of branches, namely the user terminal needs to be divided into one branch of the branches according to the attribute information, different branches correspond to different versions, namely the user terminal divided into the different branches is the test terminal aiming at the version of the corresponding branch.
Step S103: and testing based on the test configuration file to obtain a test result.
And testing by using the test configuration file pulled from the server cluster or the test configuration file pulled from the background server under the condition that the test configuration file is not pulled from the server cluster, so as to obtain a test result aiming at the object to be tested.
In the test method of the embodiment of the application, in the process of acquiring the test configuration file, the test configuration file can be pulled from the server cluster first, if the test configuration file can be pulled from the server cluster, then the test configuration file can be subsequently tested by the test configuration file pulled from the server cluster, and the file pulling speed can be improved, if the test configuration file cannot be pulled from the server cluster, then the test configuration file can be pulled from the background server, and even if the test configuration file cannot be pulled from the server cluster, the file pulling stability can be improved, namely, the file pulling speed can be improved and the file pulling stability can be improved through the test method of the embodiment, and then the test based on the test configuration file can be subsequently tested, so that the test stability of the object to be tested can be improved.
As shown in fig. 2, in one embodiment, the step S103 of performing a test based on the test configuration file to obtain a test result includes:
step S1031: a second notification is sent to the background server for the version of the first branch of the object under test.
The first branch is a branch in which a tag in the branches is matched with attribute information of the user side, and the second notification is used for pushing a version corresponding to the first branch of the object to be tested to the user side by the background server according to the second notification.
After the test configuration file is obtained, the attribute information of the user side can be utilized to determine a first branch with the tag matched with the attribute information in a plurality of branches in the test configuration file, namely, the tag of the first branch is matched with the attribute information of the user side, and a second notification aiming at the version of the first branch of the object to be tested is sent to the background server so as to notify the background server to push the version corresponding to the first branch of the object to be tested to the user side. The background server receives the second notification and then pushes the version corresponding to the first branch of the object to be tested to the user side. Thus, the user on the user side is the test user of the version of the first branch.
Step S1032: and receiving the log information of the version of the corresponding first branch of the object to be tested, which is sent by the background server.
The user may use the version of the first branch of the object to be tested at the user end, in the use process, corresponding log information may be generated, in which log information may record use behaviors including but not limited to clicking, browsing, exiting and the like, the clicking time information may be understood as the time of clicking, the exiting time information may be understood as the time of exiting, and the browsing time information may be understood as the time of staying in the object to be tested of the version of the first branch. The user side can feed back the log information to the background server, and the background server can send the log information to the test server. That is, the log information sent by the background server to the test server is the log information received by the background server from the user side.
Step S1033: and determining a test result based on the log information.
After receiving the log information, the test result for the object to be tested can be determined according to the log information.
In this embodiment, in the process of obtaining the test configuration file, the test configuration file may be pulled from the server cluster first, if the test configuration file can be pulled from the server cluster, then the subsequent test may be performed by using the test configuration file pulled from the server cluster, so that the file pulling speed may be increased, if the test configuration file cannot be pulled from the server cluster, then the test configuration file may be pulled from the background server, even if the test configuration file cannot be pulled from the server cluster, the test configuration file may be pulled from the background server, so that the file pulling stability may be increased, that is, by using the test method of this embodiment, the file pulling speed may be increased, and meanwhile, the file pulling stability may be increased, then the background server may send a second notification for the version of the first branch of the object to be tested, which matches with the attribute information in the branches of the test configuration file, receive the log information of the corresponding first branch of the object to be tested, and determine the test result according to the log information, so that the test of the object to be tested is completed, and the test efficiency may be improved.
In one embodiment, the attribute information includes at least one of user identification information, device information, and an IP address. The user identification information may be understood as identification information of a user using the object to be measured in the user side, i.e. a user ID. The device information of the user side may be device identification information of the user side, for example, a device number, etc.
In this embodiment, the matched first branch may be determined from the multiple branches through at least one of the user identity information, the device information and the IP address of the user terminal, and then the background server sends a second notification to the background server, so that the background server pushes, to the user terminal, a version corresponding to the first branch of the object to be tested according to the second notification. Thus, the accuracy of the first branch of the matching can be improved, and the accuracy of the test is improved.
In one embodiment, before receiving the first notification related to the object to be measured sent by the background server, the method further includes: acquiring the content of a test configuration item; generating a test configuration file based on the content of the test configuration item; and issuing the test configuration file to the server cluster and the background server.
The content of the test configuration item can be information input by a configurator aiming at the test configuration item, and after the content of the test configuration item is obtained, the test configuration file can be generated based on the content of the test configuration item. And then, the test configuration file is sent to the server cluster for storage and is also sent to a background server for storage, so that the pull stability of the subsequent test configuration file is ensured.
In one embodiment, the configuration item includes at least one of a traffic layer identifier, a test validity period, identifiers of multiple versions of the object to be tested, a splitting manner, a test traffic proportion of the object to be tested, a user type, identity information of a whitelist user of each branch, and a traffic proportion of each branch.
The traffic layers are commonly used in AB tests, each traffic layer has a corresponding user, and the users of each traffic layer can be the same, and the traffic layer identifiers are used for distinguishing different traffic layers. The multiple versions of the object to be tested can be understood as a test valid version interval of the object to be tested, for example, the multiple versions of the object to be tested include 2 versions, namely, version 1 and version 2, respectively, and then the test is a test of version 1 and version 2 of the object to be tested.
The splitting manner may be understood as a splitting manner of a user (traffic), for example, may be a splitting manner based on a user identity of a user terminal, a splitting manner based on device information of the user terminal, or a splitting manner based on an IP address of the user terminal, where the splitting manner is preconfigured, and then in a process of determining the first branch according to attribute information, attribute information corresponding to the splitting manner may be obtained to determine the first branch.
The ratio of the test flow of the object to be tested can be understood to be the ratio of the number of users for testing the object to be tested to the total number of users (i.e. the total flow), for example, for the object to be tested a, the total flow is 1 ten thousand, and the ratio of the test flow is 20%, which means that 2 thousand users of the 1 ten thousand users are used for testing the object to be tested.
The user type may also be referred to as a small traffic type, and may be understood as a type of user used for testing, for example, a type that configures the user type to be the type that has the number of end 2 digits of the user identification information of xx, that is, the number of end 2 digits of the identification information of the user under the user type is xx.
The flow ratio of each branch of the object to be tested can be understood as the flow ratio of each branch of the plurality of branches of the object to be tested, and the flow ratio of the branches can be understood as the ratio of the number of users for testing the version of the branch of the object to be tested to the total number of users (i.e. the total flow), for example, for version 1 and version 2 of the object to be tested, the total flow is 1 ten thousand, the flow ratio of version 1 is 10%, which means that 1 thousand users of 1 ten thousand users are used for testing version 1, and the flow ratio of version 2 is 10%, which means that 1 thousand users of 1 ten thousand users are used for testing version 2. The label of the branch may be determined by the flow ratio of the branch, or the like.
In addition, the identity information of the corresponding white list user is configured for each branch, the white list user of the branch is expressed as the user participating in the version test of the branch, the white list user can be set for each branch, and the white list user can be used as the version test user under the branch without judging other conditions.
In this embodiment, the test configuration item is pre-configured, and the content of the test configuration item is used to generate a test configuration file, so as to provide test support for subsequent tests, and the test configuration file is issued to the server cluster and also issued to the background server, so that a guarantee is provided for improving the pull stability of the subsequent files.
In one embodiment, sending a second notification to the background server for a version of the first branch of the object under test includes: calculating a label of the user terminal based on attribute information of the user terminal; determining a first branch with the same label as the label of the user in a plurality of branches; a second notification is sent to the background server for the version of the first branch of the object under test.
The method for calculating the label of the user side is not limited in this embodiment, and for example, the attribute information may be processed by a hash method to obtain the label of the user side. After the labels of the user side are obtained, a first branch of which the labels are the same as the labels of the user side can be determined in the labels of the plurality of branches, and a second notification aiming at the version of the first branch of the object to be tested is sent to the background server.
In this embodiment, the label of the first branch is the same as the label of the user terminal obtained based on the attribute information of the user terminal, so that the accuracy of the determined first branch can be improved, thereby improving the test accuracy.
The procedure of the above test method will be described in detail with reference to an embodiment, and an AB test will be taken as an example.
First, as shown in fig. 3, the test profile generation phase.
According to AB test requirements, a test configuration item is configured in a test server (configuration background), wherein the configuration item can comprise a flow layer identifier, a test validity period, identifiers of multiple versions of the object to be tested, a distribution mode, test flow proportion of the object to be tested, user types, identity information of white list users (which can fall in specified branches and are convenient for service side testers to return functions) of each branch and flow proportion of each branch. After configuration is completed, the content of the obtained test configuration item is recorded in a database of the test server, an auditor audits the test configuration file, and after the auditor confirms that the test configuration file is correct, the test configuration file can be generated when the test is online or the attribute of the online test is modified.
Then, as shown in fig. 4, the test profile issue stage.
All operations of the experiment through the test server are recorded in the database, when the experiment is online or the attribute of the online experiment is modified, the content of the test configuration item is pulled from the database to generate a test configuration file, then the test configuration file can be synchronized into a redis node (an external server cluster) and a background server, and the test configuration file can be issued to the background server in a file fly mode. The test configuration file can be successfully distributed to the redis node in a second level, namely the test configuration file takes effect quickly, and the test configuration file can be successfully distributed to the background server in a minute level, so that the effective speed is slower than that of the redis node. If the issuing fails, the method can be retried until the issuing is successful.
Next, as shown in FIG. 5, the test profile pull phase.
Because the test configuration file in the redis node takes effect quickly, the test configuration file is pulled from the redis node at first, when the redis node has a problem or the pulled data is empty, the test configuration file is represented to be failed to pull, the test configuration file in a background server (local server) serving as a backup can play a role, and the test server can pull the test position file from the background server, so that the file pulling stability is ensured, and the test configuration file can be analyzed later and the processes of experiment shunting and the like are completed.
In the AB test method of the embodiment of the application, a test configuration file storage and pulling scheme combining static configuration with dynamic configuration is provided, so that real-time synchronization of the test configuration files is guaranteed, stability of issuing the test configuration files is improved, and high availability of a test server is guaranteed. As shown in fig. 6, the test system includes the following three modules: the system comprises an experiment configuration module, a shunt module and a data analysis module. The experiment configuration module is used for uniformly managing each AB test requirement, providing operations such as adding, deleting, checking and the like, and simultaneously comprising an authentication function. The shunting module is a core module of the test system and mainly performs real-time shunting operation according to the test configuration file, and comprises a generation algorithm of an experimental branch tag (label) and the like. The data analysis module receives the behavior log of the online user, records the behavior log in the hive storage medium, obtains a test result after the log is statistically analyzed by the Hadoop program, and performs graphical display on a statistical platform integrated in the management platform. As shown in FIG. 6, a variety of storage media are provided, such as mysql storage media, redis storage media (corresponding to a cluster server), background servers, and hive storage media. The test configuration file may be issued to the redis storage medium and stored in the backend server.
The user can operate at the user end (can be a mobile client end, a PC end and the like), the user flow is split through the test server, specifically, a test configuration file generated by configuration of the configuration module is pulled, flow screening is firstly carried out according to the test configuration file, experimental flow for experiments is obtained, then the experimental flow is judged, and split is carried out. The data analysis module in fig. 6 analyzes the log information fed back from the user side to obtain the AB test result, and performs graphical display through the statistical platform integrated in the management platform. In addition, the management platform can also realize the functions of county management and experiment management.
In the test method of the embodiment, the storage mode of the test configuration file comprises a local static storage mode and an external cluster dynamic storage mode, and the local static storage mode is used for transmitting the configuration file to the appointed directory of the background server. However, the test configuration file needs to be issued to the background server in a file fly mode, so that the labor cost is high, and the test configuration file takes effect slowly. The dynamic storage needs external server cluster support, the test configuration file can be recorded in a storage medium of a redis node, such as redis, mongodb, and pulled in rpc or restful api mode, and the like. In the test method of the embodiment of the application, the test configuration files are respectively issued to the background server and the external server cluster for storage, the dynamic configuration based on the external redis node is used as the main mode, and the static configuration of the background server is used as the auxiliary mode for file pulling, so that the problems that the test configuration files are slow to take effect, manual intervention is needed, the stability is low and the like are solved. In addition, aiming at the problem of limited access flow, user flow is logically layered, so that experimental orthogonality among different flow layers is realized, and meanwhile, the experiments of the same flow layer can realize mutual exclusion. The customization of experimental flow can be realized: according to the business characteristics of the object to be tested, the experiment can be put in the appointed position of the object to be tested. The white list function can be realized, namely the necessary effect of a certain experimental branch can be configured according to the user identity information, and the white list function is used for the online debugging function of the internal account. The full-flow data tracking function can be realized, each user hitting an experiment can carry a specific identifier, and the user tracking function can be realized by counting the specific identifier.
Referring to fig. 7, the present application provides a testing apparatus 700 according to an embodiment, the apparatus includes:
a first receiving module 701, configured to receive a first notification related to an object to be tested sent by a background server, where the first notification includes attribute information of a user side;
the first obtaining module 702 is configured to obtain a test configuration file of an object to be tested, where the test configuration file is pulled from a server cluster, or is pulled from a background server if the test configuration file is not pulled from the server cluster, and the test configuration file includes a plurality of branches of labels, and each branch corresponds to a different version of the object to be tested;
and the testing module 703 is configured to perform a test based on the test configuration file, so as to obtain a test result.
As shown in fig. 8, in one embodiment, the test module 703 includes:
a first sending module 7031, configured to send a second notification for a version of a first branch of the object to be tested to the background server, where the first branch is a branch in which a tag in multiple branches is matched with attribute information of the user side, and the second notification is used for pushing, by the background server, a version corresponding to the first branch of the object to be tested to the user side according to the second notification;
A second receiving module 7032, configured to receive log information sent by the background server for a version of the corresponding first branch of the object to be tested;
a determining module 7033, configured to determine a test result based on the log information.
In one embodiment, the attribute information includes at least one of user identification information, device information, and an IP address.
In one embodiment, the apparatus 700 further comprises:
the second acquisition module is used for acquiring the content of the test configuration item;
the generating module is used for generating a test configuration file based on the content of the test configuration item;
and the second sending module is used for sending the test configuration file to the server cluster and the background server.
In one embodiment, the configuration item includes at least one of a traffic layer identifier, a test validity period, identifiers of multiple versions of the object to be tested, a splitting manner, a test traffic proportion of the object to be tested, a user type, identity information of a whitelist user of each branch, and a traffic proportion of each branch.
In one embodiment, a first transmitting module includes:
the computing module is used for computing the label of the user terminal based on the attribute information of the user terminal;
the branch determining module is used for determining a first branch with the same label as that of the user side in a plurality of branches;
And the sending submodule is used for sending a second notification aiming at the version of the first branch of the object to be tested to the background server.
The test device of each embodiment is a device for implementing the test method of each embodiment, and the technical features correspond to each other, and the technical effects correspond to each other, which are not described herein.
According to embodiments of the present application, an electronic device and a readable storage medium are also provided.
As shown in fig. 9, a block diagram of an electronic device according to a test method of an embodiment of the present application is shown. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the application described and/or claimed herein.
As shown in fig. 9, the electronic device includes: one or more processors 901, memory 902, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The various components are interconnected using different buses and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions executing within the electronic device, including instructions stored in or on memory to display graphical information of the GUI on an external input/output device, such as a display device coupled to the interface. In other embodiments, multiple processors and/or multiple buses may be used, if desired, along with multiple memories and multiple memories. Also, multiple electronic devices may be connected, each providing a portion of the necessary operations (e.g., as a server array, a set of blade servers, or a multiprocessor system). In fig. 9, a processor 901 is taken as an example.
Memory 902 is a non-transitory computer-readable storage medium provided herein. Wherein the memory stores instructions executable by the at least one processor to cause the at least one processor to perform the test methods provided herein. The non-transitory computer readable storage medium of the present application stores computer instructions for causing a computer to perform the test methods provided herein.
The memory 902 is used as a non-transitory computer readable storage medium, and may be used to store non-transitory software programs, non-transitory computer executable programs, and modules, such as program instructions/modules (e.g., the first receiving module 701, the first obtaining module 702, and the testing module 703 shown in fig. 7) corresponding to the testing method in the embodiments of the present application. The processor 901 executes various functional applications of the server and data processing, i.e., implements the test method in the above-described method embodiments, by running non-transitory software programs, instructions, and modules stored in the memory 902.
The memory 902 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, at least one application program required for a function; the storage data area may store data created according to the use of the electronic device displayed by the keyboard, and the like. In addition, the memory 902 may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory 902 optionally includes memory remotely located relative to processor 901, which may be connected to the keyboard displayed electronic device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The electronic device of the test method may further include: an input device 903 and an output device 904. The processor 901, memory 902, input devices 903, and output devices 904 may be connected by a bus or other means, for example in fig. 9.
The input device 903 may receive input numeric or character information and generate key signal inputs related to user settings and function control of the electronic device displayed by the keyboard, such as a touch screen, a keypad, a mouse, a trackpad, a touchpad, a pointer stick, one or more mouse buttons, a trackball, a joystick, and the like. The output device 804 may include a display apparatus, auxiliary lighting devices (e.g., LEDs), and haptic feedback devices (e.g., vibration motors), among others. The display device may include, but is not limited to, a Liquid Crystal Display (LCD), a Light Emitting Diode (LED) display, and a plasma display. In some implementations, the display device may be a touch screen.
Various implementations of the systems and techniques described here can be realized in digital electronic circuitry, integrated circuitry, application specific ASIC (application specific integrated circuit), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
These computing programs (also referred to as programs, software applications, or code) include machine instructions for a programmable processor, and may be implemented in a procedural and/or object oriented programming language, and/or in assembly/machine language. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and/or device (e.g., magnetic discs, optical disks, memory, programmable Logic Devices (PLDs)) used to provide machine instructions and/or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal used to provide machine instructions and/or data to a programmable processor.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the internet.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.
According to the technical scheme of the embodiment of the application, in the process of acquiring the test configuration file, the test configuration file can be pulled from the server cluster first, if the test configuration file can be pulled from the server cluster, then the test is carried out by the test configuration file pulled from the server cluster, if the test configuration file cannot be pulled from the server cluster, then the test configuration file is pulled from the background server, even if the test configuration file cannot be pulled from the server cluster, the test configuration file can be pulled from the background server, the file pulling stability can be improved, the background server can be subsequently used for sending a second notification aiming at the version of the first branch matched with the attribute information in a plurality of branches of the test configuration file of the object to be tested, receiving the log information aiming at the version of the corresponding first branch of the object to be tested, which is sent by the background server, and determining the test result according to the log information, so that the test of the object to be tested is completed, and the file pulling stability is improved.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present application may be performed in parallel, sequentially, or in a different order, provided that the desired results of the technical solutions disclosed in the present application can be achieved, and are not limited herein.
The above embodiments do not limit the scope of the application. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present application are intended to be included within the scope of the present application.

Claims (12)

1. A method of testing, the method comprising:
receiving a first notification related to an object to be detected, which is sent by a background server, wherein the first notification comprises attribute information of a user side;
obtaining a test configuration file of the object to be tested, wherein the test configuration file is pulled from a server cluster or is pulled from the background server under the condition that the test configuration file is not pulled from the server cluster, the test configuration file comprises labels of a plurality of branches, and the versions of the object to be tested corresponding to each branch are different;
Testing is carried out based on the test configuration file, and a test result is obtained;
the step of testing based on the test configuration file to obtain a test result comprises the following steps:
sending a second notification aiming at the version of the first branch of the object to be tested to the background server, wherein the first branch is a branch of which the labels are matched with the attribute information of the user side in the branches, and the second notification is used for pushing the version corresponding to the first branch of the object to be tested to the user side by the background server according to the second notification;
receiving log information of a version of a corresponding first branch of the object to be detected, which is sent by the background server;
and determining a test result based on the log information.
2. The method of claim 1, wherein the attribute information comprises at least one of user identification information, device information, and an IP address.
3. The method according to claim 1, further comprising, before receiving the first notification related to the object to be measured sent by the background server:
acquiring the content of a test configuration item;
generating the test configuration file based on the content of the test configuration item;
And sending the test configuration file to the server cluster and the background server.
4. The method of claim 3, wherein the configuration item includes at least one of a traffic layer identification, a test validity period, an identification of multiple versions of the object to be tested, a split manner, a test traffic proportion of the object to be tested, a user type, identity information of a whitelisted user for each branch, and a traffic proportion for each branch.
5. The method of claim 4, wherein the sending the background server a second notification for the version of the first branch of the object under test comprises:
calculating a label of the user terminal based on the attribute information of the user terminal;
determining a first branch with the same label as the label of the user side in the multiple branches;
and sending a second notification for the version of the first branch of the object to be tested to the background server.
6. A test apparatus, the apparatus comprising:
the first receiving module is used for receiving a first notification related to the object to be detected, which is sent by the background server, wherein the first notification comprises attribute information of a user side;
The first acquisition module is used for acquiring a test configuration file of the object to be tested, wherein the test configuration file is pulled from a server cluster or is pulled from the background server under the condition that the test configuration file is not pulled from the server cluster, the test configuration file comprises labels of a plurality of branches, and the versions of the object to be tested corresponding to each branch are different;
the test module is used for testing based on the test configuration file to obtain a test result;
the test module comprises:
a first sending module, configured to send, to the background server, a second notification for a version of a first branch of the object to be tested, where the first branch is a branch in which a tag in the multiple branches matches attribute information of the user side, and the second notification is used for the background server to push, to the user side, the version corresponding to the first branch of the object to be tested according to the second notification;
the second receiving module is used for receiving the log information of the version of the corresponding first branch of the object to be detected, which is sent by the background server;
and the determining module is used for determining a test result based on the log information.
7. The apparatus of claim 6, wherein the attribute information comprises at least one of user identification information, device information, and an IP address.
8. The apparatus as recited in claim 6, further comprising:
the second acquisition module is used for acquiring the content of the test configuration item;
the generation module is used for generating the test configuration file based on the content of the test configuration item;
and the second sending module is used for sending the test configuration file to the server cluster and the background server.
9. The apparatus of claim 8, wherein the configuration item comprises at least one of a traffic layer identification, a test expiration date, an identification of multiple versions of the object under test, a split manner, a test traffic formulation of the object under test, a user type, identity information of whitelisted users for each branch, and a traffic formulation for each branch.
10. The apparatus of claim 9, wherein the first transmitting module comprises:
the calculating module is used for calculating the label of the user terminal based on the attribute information of the user terminal;
the branch determining module is used for determining a first branch with the same label as the label of the user side in the branches;
And the sending submodule is used for sending a second notification aiming at the version of the first branch of the object to be tested to the background server.
11. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein, the liquid crystal display device comprises a liquid crystal display device,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-5.
12. A non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the method of any one of claims 1-5.
CN202010451706.5A 2020-05-25 2020-05-25 Test method and device and electronic equipment Active CN111639027B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010451706.5A CN111639027B (en) 2020-05-25 2020-05-25 Test method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010451706.5A CN111639027B (en) 2020-05-25 2020-05-25 Test method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN111639027A CN111639027A (en) 2020-09-08
CN111639027B true CN111639027B (en) 2023-06-02

Family

ID=72332895

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010451706.5A Active CN111639027B (en) 2020-05-25 2020-05-25 Test method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN111639027B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112182581B (en) * 2020-09-24 2023-10-13 百度在线网络技术(北京)有限公司 Application testing method, device, application testing equipment and storage medium
CN112688831B (en) * 2020-12-23 2022-03-25 北京字节跳动网络技术有限公司 Joint debugging test method and device, electronic equipment and computer readable storage medium
CN112817849A (en) * 2021-01-28 2021-05-18 北京达佳互联信息技术有限公司 Test data processing method, device, equipment and storage medium
CN113064818B (en) * 2021-03-26 2022-12-27 深圳依时货拉拉科技有限公司 Method, apparatus and computer-readable storage medium for analyzing A/B experiment data
CN114047941B (en) * 2022-01-12 2022-04-26 飞狐信息技术(天津)有限公司 Configuration upgrading method and device for redis service nodes
CN114760504A (en) * 2022-04-18 2022-07-15 北京金山云网络技术有限公司 Live broadcast server testing method and device, storage medium and electronic equipment

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109101381A (en) * 2018-08-02 2018-12-28 Oppo(重庆)智能科技有限公司 Configuration file update method, system, electronic equipment and storage medium

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103019938B (en) * 2012-12-26 2016-12-28 北京搜狐新媒体信息技术有限公司 A kind of method and device in the application of local test cloud platform
US9998354B2 (en) * 2013-09-24 2018-06-12 Netflix, Inc. Server selection for content distribution
CN105095081B (en) * 2015-08-06 2019-03-15 小米科技有限责任公司 The function test method and device of application program
CN108574720B (en) * 2017-05-09 2021-07-20 北京金山云网络技术有限公司 Service online method and device
CN108287694B (en) * 2017-08-08 2021-01-19 深圳壹账通智能科技有限公司 Application program construction method, system, computer device and storage medium
CN108021500A (en) * 2017-10-31 2018-05-11 阿里巴巴集团控股有限公司 A kind of test method of application, device and equipment
CN108491267B (en) * 2018-03-13 2022-02-08 百度在线网络技术(北京)有限公司 Method and apparatus for generating information
CN110413594A (en) * 2019-06-25 2019-11-05 苏州浪潮智能科技有限公司 A kind of more example method for testing pressure of Redis and device
CN110955449B (en) * 2019-11-18 2024-04-12 北京奇艺世纪科技有限公司 Gray scale release method and device for client

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109101381A (en) * 2018-08-02 2018-12-28 Oppo(重庆)智能科技有限公司 Configuration file update method, system, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN111639027A (en) 2020-09-08

Similar Documents

Publication Publication Date Title
CN111639027B (en) Test method and device and electronic equipment
US10387292B2 (en) Determining application test results using screenshot metadata
US10237295B2 (en) Automated event ID field analysis on heterogeneous logs
CN108153670B (en) Interface testing method and device and electronic equipment
US10175954B2 (en) Method of processing big data, including arranging icons in a workflow GUI by a user, checking process availability and syntax, converting the workflow into execution code, monitoring the workflow, and displaying associated information
WO2021023149A1 (en) Method and apparatus for dynamically returning message
CN111752843A (en) Method, device, electronic equipment and readable storage medium for determining influence surface
CN110619002A (en) Data processing method, device and storage medium
US10713070B2 (en) Systems and methods for capturing and visualizing user interactions across devices
US11216482B2 (en) Systems and methods for access to multi-tenant heterogeneous databases
CN111913884A (en) Distributed test method, device, equipment, system and readable storage medium
CN112115113B (en) Data storage system, method, device, equipment and storage medium
CN111913998A (en) Data processing method, device, equipment and storage medium
CN112559522A (en) Data storage method and device, query method, electronic device and readable medium
CN111444077A (en) Method and device for generating flow node test data
WO2023169193A1 (en) Method and device for generating smart contract
CN112069137A (en) Method and device for generating information, electronic equipment and computer readable storage medium
CN111767149A (en) Scheduling method, device, equipment and storage equipment
US20220164377A1 (en) Method and apparatus for distributing content across platforms, device and storage medium
CN111694686B (en) Processing method and device for abnormal service, electronic equipment and storage medium
CN111767444B (en) Page feature construction method, device, equipment and storage medium
CN111639032B (en) Method and apparatus for testing applications
CN111459887B (en) Resource screening method and device, electronic equipment and storage medium
JP7293544B2 (en) Q&A system update processing method and device
CN113434432B (en) Performance test method, device, equipment and medium for recommendation platform

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant