Detailed Description
The present disclosure is described in further detail below with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings.
It should be noted that, in the present disclosure, the embodiments and features of the embodiments may be combined with each other without conflict. The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
FIG. 1 illustrates an exemplary architecture 100 to which embodiments of the A/B testing method or A/B testing apparatus of the present disclosure may be applied.
As shown in fig. 1, the system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The terminal devices 101, 102, 103 interact with a server 105 via a network 104 to receive or send messages or the like. Various client applications may be installed on the terminal devices 101, 102, 103. Such as browser-type applications, search-type applications, instant messaging-type tools, and so forth.
The terminal apparatuses 101, 102, and 103 may be hardware or software. When the terminal devices 101, 102, 103 are hardware, they may be various electronic devices including, but not limited to, smart phones, tablet computers, e-book readers, laptop portable computers, desktop computers, and the like. When the terminal apparatuses 101, 102, 103 are software, they can be installed in the electronic apparatuses listed above. It may be implemented as multiple pieces of software or software modules (e.g., multiple pieces of software or software modules to provide distributed services) or as a single piece of software or software module. And is not particularly limited herein.
The server 105 may be a server providing various services, such as a back-end server testing client applications installed on the terminal devices 101, 102, 103. It should be noted that the a/B testing method provided by the embodiment of the present disclosure is generally executed by the server 105, and accordingly, the a/B testing apparatus is generally disposed in the server 105. At this time, the terminal apparatuses 101, 102, 103 and the network 104 may not exist.
It is further noted that the testing of the client application installed on the terminal device 101, 102, 103 may also be performed by the terminal device 101, 102, 103. At this time, the a/B test method may be executed by the terminal apparatuses 101, 102, 103, and accordingly, the a/B test apparatus may be provided in the terminal apparatuses 101, 102, 103. At this point, the exemplary system architecture 100 may not have the server 105 and the network 104.
The server 105 may be hardware or software. When the server 105 is hardware, it may be implemented as a distributed server cluster composed of a plurality of servers, or may be implemented as a single server. When the server 105 is software, it may be implemented as multiple pieces of software or software modules (e.g., multiple pieces of software or software modules used to provide distributed services), or as a single piece of software or software module. And is not particularly limited herein.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
With continued reference to FIG. 2, a flow 200 of one embodiment of an A/B testing method according to the present disclosure is shown. The A/B test method comprises the following steps:
step 201, determining a currently displayed page of a tab to be tested as a first page.
In this embodiment, a tab may correspond to an active page. Generally, the page corresponding to the tab can be displayed by clicking the tab. The tabs to be tested may be determined according to specific testing requirements. Wherein the page displayed by the tab to be tested can be controlled by the corresponding container view controller. Wherein the container view controller may manage content displayed in the container view controller. The container view controller may control the size and hierarchy of the displayed content.
By way of example, in some development environments, the container view controller includes a UINavigationController, a UITabBarController, a UISplitViewController, and so forth. It should be understood that this is by way of example only, and that in different development environments, the container view controller used may be different. For example, the container controller employed may be different for different operating systems, different development languages. The a/B test method provided by the present disclosure mainly uses the container controller to control the independent update of the page to be tested, and the method for implementing the container controller is not limited.
Step 202, in response to receiving a test request for instructing to replace the first page with the second page, controlling, by the container view controller, to replace the first page with the second page to complete the a/B test of the tab displayed page.
In this embodiment, the second page may be determined by setting a test requirement in advance by a technician, and then sending a test request according to the test requirement. The test request may be sent through various interaction modes preset by a technician (e.g., clicking a certain button, restarting an application, etc.).
The content, size and the like of the page displayed by the tab to be tested can be controlled by the corresponding container controller. Thus, the replacement of the first page with the second page may be controlled directly with the corresponding container controller. Therefore, the tester can detect the difference between the second page and the first page, and the A/B test of the page displayed by the tab to be tested can be realized
And the corresponding container controller controls the page displayed by the tab to be tested, so that when the page displayed by the tab to be tested is updated, other tabs are not affected. In the prior art, under the condition that a plurality of tabs respectively display different pages, that is, a large number of pages are displayed, it is usually determined by a large number of logic judgments according to a received test request, which pages are displayed after a page is updated and displayed. For example, it is necessary to determine which page is currently displayed, which page is currently displayed for the tab to be tested, whether each page is displayed, and the like. More tabs, i.e., the number of total pages, results in more and more logic being required. Each logic judgment is time-consuming, and the more and more complicated logic judgment not only increases the workload of developers and testers, but also is easy to make mistakes.
According to the method provided by the embodiment of the disclosure, the updating of the page corresponding to the tab to be tested is separated from other pages by using the container controller, so that when the page corresponding to the tab to be tested is updated, the page replacement can be directly performed by using the container controller, a large amount of logic judgment written in advance is not needed, other pages do not need to be processed, any influence on other pages is avoided, and the testing stability is ensured while the testing is accelerated.
With further reference to FIG. 3, a flow 300 of yet another embodiment of an A/B testing method is shown. The process 300 of the A/B testing method includes the following steps:
step 301, determining a currently displayed page of a tab to be tested as a first page, wherein the tab comprises at least two sub tabs.
In this embodiment, content from multiple view controllers may be merged into a single interface due to the container view controller. Thus, the tab to be tested may include at least two sub-tabs. Where each sub tab may correspond to an active page. That is, the page displayed by the tab is the page displayed by the sub tab currently in the activated state. Generally, the page corresponding to the sub tab can be displayed by clicking on the sub tab.
At this time, the container view controller corresponding to the tab to be tested may include at least two sub-controllers. Wherein, at least two sub tabs correspond to at least two sub controllers one by one. I.e. the page displayed by the corresponding sub tab can be controlled by the sub controller. And a container view controller corresponding to the tab to be tested may be used to manage at least two sub-controllers. For example, the container view controller corresponding to the tab to be tested may control the position of the page display, the page size, etc. displayed by the various sub-controllers embedded therein.
As an example, in some development environments, an addchaldvildviewowcontroller method may be utilized to add sub-controllers and a didmovetopartentviewcontroller may be utilized to remove sub-controllers. It should be understood that this is by way of example only, and that the relative approach of the container view controller used may vary in different development environments. For example, the associated methods of employing container controllers may differ for different operating systems, different development languages.
And step 302, in response to receiving a test request for indicating to replace the first page with the second page, controlling to replace the first page with the second page by using a sub controller corresponding to the sub tab where the first page is located so as to complete the A/B test of the page displayed by the tab.
In this embodiment, when a test request is received, the sub-controller corresponding to the sub-tab where the first page is located can directly control the replacement of the first page, and the influence on the pages corresponding to other sub-tabs is avoided, so that the test speed of the pages corresponding to the sub-tabs is increased, and the test stability is ensured.
In some optional implementations of the present embodiment, the at least two sub tabs may include a composite sub tab. Wherein a composite sub tab may be a sub tab that includes at least two sub tabs. At this time, the sub-controller corresponding to the composite sub-tab may include at least two sub-controllers, and the at least two sub-tabs included in the composite sub-tab correspond to the at least two sub-controllers included in the sub-controller corresponding to the composite sub-tab one to one.
Wherein, in some cases, the tabs may be nested in multiple levels, i.e., a sub-tab may also include at least two sub-tabs. Correspondingly, at least two sub-controllers can be embedded in the sub-controllers corresponding to the sub-tabs and respectively used for controlling different sub-tabs.
It should be appreciated that the nesting of tabs, and the nesting of corresponding controllers, may be arranged in conjunction with specific application scenarios and test requirements. For example, when a sub tab needs to display a plurality of pages and various styles of the pages therein need to be tested, it can be considered that the corresponding pages are controlled by nested sub controllers in a nested manner. Therefore, in the test process, the page is quickly updated by using the sub-controllers, and other pages cannot be influenced.
In some optional implementations of the embodiment, in response to receiving a test request for instructing to modify the content of the first page presentation, the sub-controller corresponding to the tab where the first page is located controls to modify the content of the first page presentation.
In this embodiment, the sub-controller corresponding to the sub-tab can control the hierarchical structure (for example, the navigation bar, the comment area, and the like are displayed), the size, and the like of the content displayed on the page corresponding to the sub-tab. Therefore, the sub-controllers corresponding to the sub-tabs can be utilized to control and modify the content of the page corresponding to the sub-tabs.
Alternatively, the portions of the page corresponding to the sub tabs may be set to be controlled by the corresponding sub controllers, respectively. At this time, the A/B test can be performed on each part of the page. For example, a page to which a sub tab corresponds is made up of at least two sub portions. The sub-controllers corresponding to the sub-tabs may include at least two sub-controllers, and the at least two sub-controllers respectively correspond to at least two sub-portions included in the page corresponding to the tabs.
At this time, similarly, when a part of the page corresponding to the sub tab is updated, the update of the content displayed by the part may be controlled by the sub controller corresponding to the part. Similarly, the method can avoid the influence on other parts of the page corresponding to the sub tabs, is not easy to make mistakes in the test process, and ensures the stability of the test.
With continued reference to fig. 4, fig. 4 is a schematic diagram 400 of an application scenario of the a/B testing method according to the present embodiment. In the application scenario of fig. 4, the bottom of the home page of the client application includes three tabs: "A", "B" and "C". Wherein the tab to be tested is tab "B". The contents of tab "B" display are controlled by a container view controller predefined by the technician.
Clicking on tab "B" can see that tab "B" includes connecting sub-tabs: "B1" and "B2". In which the first page 401 corresponding to sub tab "B1" is currently displayed. Wherein sub tab "B1" corresponds to a first sub controller of a container view controller predefined by a technician and sub tab "B2" corresponds to a second sub controller of the container view controller predefined by the technician. The container view controller may be used to manage and control the first sub-controller and the second sub-controller.
When the execution main body receives a command for instructing to perform an a/B test on a page corresponding to the sub tab "B1" and replace the first page 401 displayed by the sub tab "B1" with the second page 402, the first sub-controller may control to directly replace the first page 401 currently displayed by the sub tab "B1" with the second page 402, so as to update the page currently displayed by the sub tab "B1", so that a tester can complete an a/B test on the page displayed by the sub tab "B1".
The a/B test method described in this embodiment facilitates a/B test on each sub tab by setting up a sub controller to control the corresponding sub tab, respectively. Only the corresponding sub-controllers are needed to control the updating of the pages of the corresponding sub-tabs, and the pages of other sub-tabs are not affected. In addition, because each sub tab is updated independently, the updating method is convenient for developers and testers to work, and avoids mixing the updates of each sub tab together, thereby being easy to make mistakes in the testing process.
With further reference to fig. 5, as an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of an a/B testing apparatus, which corresponds to the embodiment of the method shown in fig. 2, and which may be applied in various electronic devices.
As shown in fig. 5, the a/B test apparatus 500 provided in the present embodiment includes a determination unit 501 and a test unit 502. Wherein the determining unit 501 is configured to determine a page currently displayed by a tab to be tested as a first page, wherein the page displayed by the tab to be tested is controlled by a corresponding container view controller; the test unit 502 is configured to control, with the container view controller, the replacement of the first page with the second page to complete the a/B test of the tab displayed page in response to receiving a test request indicating the replacement of the first page with the second page.
In the present embodiment, in the a/B test apparatus 500: the specific processing of the determining unit 501 and the testing unit 502 and the technical effects thereof can refer to the related descriptions of step 201 and step 202 in the corresponding embodiment of fig. 2, which are not repeated herein.
In some optional implementations of this embodiment, the tabs include at least two sub-tabs, and the container view controller includes at least two sub-controllers, and the at least two sub-tabs correspond to the at least two sub-controllers one-to-one; and the test unit 502 is further configured to: and controlling to replace the first page with a second page by utilizing a sub-controller corresponding to the sub-tab where the first page is located so as to finish the A/B test of the page displayed by the tab.
In some optional implementations of this embodiment, the at least two sub tabs comprise a composite sub tab, wherein the composite sub tab is a sub tab comprising at least two sub tabs; and the sub-controllers corresponding to the composite sub-tabs comprise at least two sub-controllers, and the at least two sub-tabs comprised by the composite sub-tabs correspond to the at least two sub-controllers comprised by the sub-controllers corresponding to the composite sub-tabs one to one.
In some optional implementations of the embodiment, the testing unit 502 is further configured to, in response to receiving a test request for instructing modification of the content of the first page presentation, control, by a sub-controller corresponding to the tab where the first page is located, to modify the content of the first page presentation.
In the apparatus provided by the foregoing embodiment of the present disclosure, a page currently displayed by a tab to be tested is determined as a first page by the determining unit 501, where the page displayed by the tab to be tested is controlled by a corresponding container view controller; the test unit 502 responds to a test request for indicating that the first page is replaced by the second page, and the container view controller is used for controlling the replacement of the first page by the second page so as to complete the A/B test on the page displayed by the tab, so that when the page corresponding to the tab to be tested is updated, the container controller is used for directly replacing the page without a large amount of logic judgment written in advance, processing other pages is not needed, and any influence on other pages is avoided, thereby accelerating the test and ensuring the stability of the test.
Referring now to FIG. 6, a schematic diagram of an electronic device (e.g., the server of FIG. 1) 600 suitable for use in implementing embodiments of the present disclosure is shown. The server shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 6, electronic device 600 may include a processing means (e.g., central processing unit, graphics processor, etc.) 601 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage means 608 into a Random Access Memory (RAM) 603. In the RAM603, various programs and data necessary for the operation of the electronic apparatus 600 are also stored. The processing device 601, the ROM 602, and the RAM603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
In general, input devices 606 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc., output devices 607 including, for example, a liquid crystal display (L CD), speaker, vibrator, etc., storage devices 608 including, for example, magnetic tape, hard disk, etc., and communication devices 609.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 609, or may be installed from the storage means 608, or may be installed from the ROM 602. The computer program, when executed by the processing device 601, performs the above-described functions defined in the methods of embodiments of the present disclosure.
It should be noted that the computer readable medium described in the embodiments of the present disclosure may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In embodiments of the disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In embodiments of the present disclosure, however, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The computer readable medium may be embodied in the server; or may exist separately and not be assembled into the server. The computer readable medium carries one or more programs which, when executed by the server, cause the server to: determining a current displayed page of a to-be-tested tab as a first page, wherein the displayed page of the to-be-tested tab is controlled by a corresponding container view controller; in response to receiving a test request indicating replacement of the first page with a second page, controlling, with the container view controller, the replacement of the first page with the second page to complete the A/B testing of the tab displayed page.
Computer program code for carrying out operations for embodiments of the present disclosure may be written in any combination of one or more programming languages, including AN object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. The described units may also be provided in a processor, and may be described as: a processor includes a determination unit and a test unit. Where the names of the cells do not in some cases constitute a definition of the cell itself, for example, the determination cell may also be described as a "cell determining the page currently displayed by the tab to be tested as the first page".
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention in the embodiments of the present disclosure is not limited to the specific combination of the above-mentioned features, but also encompasses other embodiments in which any combination of the above-mentioned features or their equivalents is made without departing from the inventive concept as defined above. For example, the above features and (but not limited to) technical features with similar functions disclosed in the embodiments of the present disclosure are mutually replaced to form the technical solution.