CN113010405A - Application program testing method and device - Google Patents

Application program testing method and device Download PDF

Info

Publication number
CN113010405A
CN113010405A CN201911329091.2A CN201911329091A CN113010405A CN 113010405 A CN113010405 A CN 113010405A CN 201911329091 A CN201911329091 A CN 201911329091A CN 113010405 A CN113010405 A CN 113010405A
Authority
CN
China
Prior art keywords
test
version
cluster
testing
application program
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.)
Pending
Application number
CN201911329091.2A
Other languages
Chinese (zh)
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 Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information 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 Jingdong Century Trading Co Ltd, Beijing Wodong Tianjun Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201911329091.2A priority Critical patent/CN113010405A/en
Publication of CN113010405A publication Critical patent/CN113010405A/en
Pending legal-status Critical Current

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/3664Environments for testing or debugging software
    • 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
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

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

Abstract

The invention discloses a method and a device for testing an application program, and relates to the technical field of computers. One embodiment of the method comprises: the version number of the version to be tested of the application program is made according to the test plan and the test function; deploying a test cluster according to the category of the test function, wherein the test cluster comprises a formal cluster and a gray scale cluster; and determining the target user corresponding to each version number through the shunting configuration, so that the target user accesses the corresponding test cluster according to the version number indicated by the shunting configuration to test the corresponding function. The implementation method simplifies the test flow, improves the test flexibility and reduces the test cost.

Description

Application program testing method and device
Technical Field
The invention relates to the technical field of computers, in particular to a method and a device for testing an application program.
Background
The version test of the application program can help a research team to find problems through quick test and correct the problems in time before the problems are pushed to users in a large scale, and the generation of a lot of risks is reduced to a great extent. The version test not only meets the requirement of a part of people on preemptive experience, but also can develop various problems which are not easy to find by a research and development team, and can collect real user experience, which is very helpful for optimizing brand-new system content.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art:
1. a plurality of cluster environments need to be deployed, so that the simultaneous testing of a plurality of versions cannot be well supported, and the testing cost is high;
2. for the test based on the version function characteristics, the test system is too complex, and needs to support multiple version branches for testing through hard coding, the shunting logic of the test is coupled in the service, the flexibility is low, and corresponding test codes and shunting codes need to be removed after the test is completed.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for testing an application program, which can simplify a testing process, improve testing flexibility, and reduce testing cost.
In order to achieve the above object, according to a first aspect of the embodiments of the present invention, there is provided an application program testing method, including:
the version number of the version to be tested of the application program is made according to the test plan and the test function;
deploying a test cluster according to the category of the test function, wherein the test cluster comprises a formal cluster and a gray scale cluster;
and determining the target user corresponding to each version number through the shunting configuration, so that the target user accesses the corresponding test cluster according to the version number indicated by the shunting configuration to test the corresponding function.
Further, the test plan indicates the manner in which the functions are combined.
Further, the categories of the test functions include a formal function and a grayscale function.
Further, the step of enabling the target user to access the corresponding test cluster according to the version number indicated by the split configuration includes: and receiving a test request initiated by a target user through the access layer, calling a test cluster interface corresponding to the test function in the version number corresponding to the target user, and accessing the test cluster corresponding to the corresponding test function.
Further, after the step of receiving the test request initiated by the target user through the access layer, the method for testing the application program further includes: and forwarding the test request to a remote call route through a reverse proxy through an access layer, and calling a corresponding test cluster interface through the remote call route.
Further, before the step of deploying the test cluster, the method for testing the application program further includes: and deploying a static environment according to all versions to be tested, and indicating a corresponding version directory for the version number corresponding to each version to be tested.
Further, in the case that the service interface type to be tested is a front-end service interface, the method for testing the application program further includes: and accessing the static resource through the access layer and the version number, and testing corresponding functions according to the version path indicated by the version directory.
According to a second aspect of the embodiments of the present invention, there is provided an apparatus for testing an application program, including:
the version number making module is used for making the version number of the version to be tested of the application program according to the test plan and the test function;
the test cluster deployment module is used for deploying test clusters according to the types of the test functions, wherein the test clusters comprise formal clusters and gray scale clusters;
and the test module is used for determining the target users corresponding to the version numbers through the shunting configuration, so that the target users access the corresponding test clusters according to the version numbers indicated by the shunting configuration to test the corresponding functions.
According to a third aspect of the embodiments of the present invention, there is provided a terminal apparatus including:
one or more processors;
a storage device for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the method for testing any one of the applications as described above.
According to a fourth aspect of embodiments of the present invention, there is provided a computer-readable medium, on which a computer program is stored, which when executed by a processor, implements a method of testing an application program as any one of the above.
One embodiment of the above invention has the following advantages or benefits: the version number of the version to be tested of the application program is made according to the test plan and the test function; deploying a test cluster according to the category of the test function, wherein the test cluster comprises a formal cluster and a gray scale cluster; the target users corresponding to the version numbers are determined through the shunt configuration, so that the target users access the corresponding test clusters according to the version numbers indicated by the shunt configuration and perform the technical means of testing corresponding functions, the technical problems that a plurality of cluster environments need to be deployed in the prior art, the test cost is high, the test flow is complex and the flexibility is low are solved, the test flow is simplified, the test flexibility is improved, and the test cost is reduced are achieved.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
fig. 1 is a schematic diagram of a main flow of a test method of an application program according to a first embodiment of the present invention;
FIG. 2a is a schematic diagram of a main flow of a testing method for an application according to a second embodiment of the present invention;
FIG. 2b is a block diagram of a testing system for an application program to which the method for testing the application program of FIG. 2a is applied;
FIG. 3 is a schematic diagram of the main modules of a testing apparatus for an application according to an embodiment of the present invention;
FIG. 4 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
fig. 5 is a schematic block diagram of a computer system suitable for use in implementing a terminal device or server of an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those 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 invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 1 is a schematic diagram of a main flow of a test method of an application program according to a first embodiment of the present invention; as shown in fig. 1, the method for testing an application program provided in the embodiment of the present invention mainly includes:
and step S101, setting the version number of the version to be tested of the application program according to the test plan and the test function.
According to the embodiment of the invention, the version to be tested of the application program corresponding to the version number comprises a formal version and a plurality of grayscale versions, wherein the formal version comprises full-scale functions (or features), and the grayscale versions comprise one or more functions (a plurality of the functions are more than or equal to two) to be compared and tested with the full-scale functions.
Specifically, according to an embodiment of the present invention, the test plan indicates a combination of test functions. The test plan may be set according to the actual conditions of the product (e.g., application, web page, etc.). The test plan also indicates which test functions need to be changed for the grayscale test.
And S102, deploying a test cluster according to the type of the test function, wherein the test cluster comprises a formal cluster and a gray cluster.
Through the arrangement, only two test clusters need to be deployed, and a subsequent multi-version parallel test experiment can be realized. The complexity of subsequent testing is reduced, and meanwhile, the testing cost is reduced due to the fact that cluster environments need to be maintained.
The test cluster is particularly suitable for testing through a back-end service interface.
According to the embodiment of the invention, the categories of the test functions comprise formal functions and gray-scale functions. And the formal function is arranged in the formal cluster, and the gray scale function is arranged in the gray scale cluster.
According to the embodiment of the present invention, before the step of deploying the test cluster, the test method of the application further includes: and deploying a static environment according to all versions to be tested, and indicating a corresponding version directory for the version number corresponding to each version to be tested.
The deployment of the static resources does not need to distinguish cluster environments, and all front-end service interfaces (Web ends, which refer to Web page ends of the Internet) can access all versions to be tested in the static resources so as to test corresponding functions.
Further, according to the embodiment of the present invention, in a case that the service interface type to be tested is a front-end service interface, the method for testing the application program further includes: and accessing the static resource through the access layer and the version number, and testing corresponding functions according to the version path indicated by the version directory.
For the front-end service interface, static resources can be directly accessed to complete the test of corresponding functions, the test flow is further simplified, and the test cost is reduced. The foregoing is only a case of the embodiment of the present invention, and on the other hand, the front-end service interface may also access the test cluster through the subsequent steps to perform the test of the corresponding function.
Step S103, determining the target user corresponding to each version number through the shunting configuration, so that the target user accesses the corresponding test cluster according to the version number indicated by the shunting configuration to test the corresponding function.
And the shunting configuration is calculated by a shunting matching algorithm to obtain target users corresponding to each version number. According to an embodiment of the present invention, the split matching algorithm may be: and matching corresponding version numbers according to the user ID (Identity document), the user type, the user group category and the like in a shunting manner, and obtaining target users corresponding to the version numbers according to proportional Hash (Hash) calculation of information such as the user ID and the like.
The method comprises the steps that a corresponding version number is assigned to a target user through shunting configuration, namely the target user is associated with the version number, when the user performs version test, a shunting configuration server accesses a corresponding test cluster according to a test function in the version number, accesses a formal cluster according to a formal function in a version to be tested, and accesses a gray scale cluster according to a gray scale function in the version to be tested.
Further, according to the embodiment of the present invention, the step of enabling the target user to access the corresponding test cluster according to the version number indicated by the offload configuration includes: and receiving a test request initiated by a target user through the access layer, calling a test cluster interface corresponding to the test function in the version number corresponding to the target user, and accessing the test cluster corresponding to the corresponding test function.
Specifically, after the step of receiving, by the access layer, a test request initiated by a target user, the method for testing an application further includes: and forwarding the test request to a remote call route through a reverse proxy through an access layer, and calling a corresponding test cluster interface through the remote call route.
Through the arrangement, the realization of the shunting route is realized by adopting the reverse proxy of the access layer and combining the remote call route in a cooperative manner, and the parallel testing of a plurality of versions is promoted.
According to the technical scheme of the embodiment of the invention, the version number of the version to be tested of the application program is set according to the test plan and the test function; deploying a test cluster according to the category of the test function, wherein the test cluster comprises a formal cluster and a gray scale cluster; the target users corresponding to the version numbers are determined through the shunt configuration, so that the target users access the corresponding test clusters according to the version numbers indicated by the shunt configuration and perform the technical means of testing corresponding functions, the technical problems that a plurality of cluster environments need to be deployed in the prior art, the test cost is high, the test flow is complex and the flexibility is low are solved, the test flow is simplified, the test flexibility is improved, and the test cost is reduced are achieved.
FIG. 2a is a schematic diagram of a main flow of a testing method for an application according to a second embodiment of the present invention; as shown in fig. 2a, the method for testing an application program according to the embodiment of the present invention mainly includes:
step S201, a version number of a version to be tested of the application program is established according to the test plan and the test function.
The version to be tested of the application program corresponding to the version number comprises a formal version and a plurality of gray-scale versions, wherein the formal version comprises full functions, and the gray-scale versions comprise one or more functions (a plurality of the functions are more than or equal to two) to be compared with the full functions.
Specifically, according to an embodiment of the present invention, the test plan indicates a combination of test functions. The test plan can be set according to actual conditions.
Step S202, a static environment is deployed according to all versions to be tested, and a corresponding version directory is indicated for the version number corresponding to each version to be tested.
The deployment of the static resources does not need to distinguish cluster environments, and all front-end service interfaces (Web ends) can access all versions to be tested in the static resources so as to test corresponding functions.
According to the embodiment of the invention, the static resource dynamically generates the version directory in a packaging mode through a packager (such as webpack), and the version directory supports access according to the version path corresponding to the version number.
Step S203, deploying a test cluster according to the type of the test function, wherein the test cluster comprises a formal cluster and a gray cluster.
Through the arrangement, two test clusters are deployed, and a subsequent multi-version parallel test experiment can be realized. The complexity of subsequent testing is reduced, and meanwhile, the testing cost is reduced due to the fact that cluster environments need to be maintained.
According to the embodiment of the invention, the categories of the test functions comprise formal functions and gray-scale functions. And the formal function is arranged in the formal cluster, and the gray scale function is arranged in the gray scale cluster. The same test function only supports one change in the gray scale cluster, and multiple test function changes may be included in the gray scale environment.
And step S204, determining target users corresponding to the version numbers through shunting configuration.
And the target user is associated with the version number through the shunting configuration, so that the subsequent testing process is facilitated. The parallel testing of a plurality of application program versions is realized through the shunting configuration, and the version testing efficiency is improved.
And the shunting configuration is calculated by a shunting matching algorithm to obtain a target user corresponding to the version number. According to an embodiment of the present invention, the split matching algorithm may be: and matching corresponding version numbers according to the user ID, the user type, the user group and the like in a shunting manner, and calculating according to the information such as the user ID and the like in a Hash (Hash) ratio to obtain a target user corresponding to the version number.
Step S205, determine whether the service interface type to be tested is the front-end service interface or the back-end service interface. If yes, go to step S206; if yes, go to step S207.
For the front-end test interface, namely, the version characteristics are tested through the service interface of the Web end, the version to be tested in the static resource can be directly accessed through the access layer to carry out corresponding version test, so that the test flow is simplified, and the test cost is reduced. And for the back-end test interface, the remote call route is required to be accessed through the access layer reverse proxy, and then the corresponding test function is searched in the corresponding test cluster through the version number corresponding to the target user, so as to test the corresponding function. As shown in fig. 2b,/static/XXX indicates that the target user initiates a test request from the Web end (front end service interface), such as HTML page/JS file/CSS style, etc.); the/api/XXX indicates that the user initiates a test request from the back-end service interface, which is provided by an application server, such as Tomcat (an open source Web application server), etc.
And step S206, accessing the static resource through the access layer and the version number, and testing corresponding functions according to the version path indicated by the version directory.
Specifically, according to the embodiment of the present invention, the target user may perform a corresponding function test on the version number corresponding to the version directory by using the nlinx + Lua (where nlinx is an access layer, and Lua is a lightweight and embeddable scripting language, and the Lua is embedded in the nlinx, so that the Lua can be used to write a script, and thus the Lua can be used to write an application script, which is deployed to the nlinx to run, that is, the nlinx becomes a Web container) as the access layer to access the static resource, according to the indication of the version path corresponding to the version directory.
The service provided by the access layer Nginx comprises two functions, namely, directly accessing static resources (aiming at a test request initiated by a target user through a front-end service interface (Web end)); secondly, the application server is accessed through the reverse proxy, the back-end request (the test request initiated by the target user through the back-end service interface) is forwarded to the remote call route, and the test cluster interface is called through the remote call route to carry out corresponding access.
Step S207, the test request received from the target user is forwarded to the remote invocation route through the reverse proxy through the access stratum.
The test request of the target user indicates the version number to be tested, and the combination of the test features in the version number is forwarded to the RPC (Remote Procedure Call) by the access layer in a reverse proxy mode. Similarly, the method described above can also be applied by using other RPC-implemented call test cluster interfaces to function as dynamic routing.
And S208, calling a test cluster interface corresponding to the test feature in the version number corresponding to the target user through the remote calling route, accessing a test cluster corresponding to the corresponding test function, and testing the corresponding function.
As shown in fig. 2b, for version number V20190X01, there are three test functions therein, where f1 is a formal function, located in the formal cluster; f2 and F3 are grayscale functions, located in grayscale clusters. For a target user corresponding to the version number V20190X01, when the target user wants to perform version testing, the testing f1 function only needs to remotely call f1 to route to a formal cluster to access the formal function f1 to perform corresponding testing; test F2/F3 is a corresponding test according to remote invocation F2/F3 routing to access the gray function F2/F3 in the gray cluster.
According to the technical scheme of the embodiment of the invention, the version number of the version to be tested of the application program is set according to the test plan and the test function; deploying a test cluster according to the category of the test function, wherein the test cluster comprises a formal cluster and a gray scale cluster; the target users corresponding to the version numbers are determined through the shunt configuration, so that the target users access the corresponding test clusters according to the version numbers indicated by the shunt configuration and perform the technical means of testing corresponding functions, the technical problems that a plurality of cluster environments need to be deployed in the prior art, the test cost is high, the test flow is complex and the flexibility is low are solved, the test flow is simplified, the test flexibility is improved, and the test cost is reduced are achieved.
FIG. 3 is a schematic diagram of the main modules of a testing apparatus for an application according to an embodiment of the present invention; as shown in fig. 3, the testing apparatus 300 for an application according to an embodiment of the present invention mainly includes:
and a version number making module 301, configured to make a version number of the version to be tested of the application program according to the test plan and the test function.
According to the embodiment of the invention, the version to be tested of the application program corresponding to the version number comprises a formal version and a plurality of grayscale versions, wherein the formal version comprises full-scale functions (or features), and the grayscale versions comprise one or more functions (a plurality of the functions are more than or equal to two) to be compared and tested with the full-scale functions.
Specifically, according to an embodiment of the present invention, the test plan indicates a combination of test functions. The test plan may be set according to the actual conditions of the product (e.g., application, web page, etc.). The test plan also indicates which test functions need to be changed for the grayscale test.
The test cluster deployment module 302 is configured to deploy a test cluster according to the category of the test function, where the test cluster includes a formal cluster and a gray scale cluster.
Through the arrangement, only two test clusters need to be deployed, and a subsequent multi-version parallel test experiment can be realized. The complexity of subsequent testing is reduced, and meanwhile, the testing cost is reduced due to the fact that cluster environments need to be maintained.
The test cluster is particularly suitable for testing through a back-end service interface.
According to the embodiment of the invention, the categories of the test functions comprise formal functions and gray-scale functions. And the formal function is arranged in the formal cluster, and the gray scale function is arranged in the gray scale cluster.
According to the embodiment of the present invention, the testing apparatus 300 of the application further includes a static environment deployment module, before the step of deploying the testing cluster, the static environment deployment module is configured to: and deploying a static environment according to all versions to be tested, and indicating a corresponding version directory for the version number corresponding to each version to be tested.
The deployment of the static resources does not need to distinguish cluster environments, and all front-end service interfaces (Web ends) can access all versions to be tested in the static resources so as to test corresponding functions.
Further, according to the embodiment of the present invention, in the case that the service interface type to be tested is a front-end service interface, the testing apparatus 300 of the application program further includes a static resource testing module, configured to access the static resource through the access layer and the version number, and perform a test on a corresponding function according to the version path indicated by the version directory.
For the front-end service interface, static resources can be directly accessed to complete the test of corresponding functions, the test flow is further simplified, and the test cost is reduced. The foregoing is only a case of the embodiment of the present invention, and on the other hand, the front-end service interface may also access the test cluster through the subsequent steps to perform the test of the corresponding function.
The testing module 303 is configured to determine a target user corresponding to each version number through the shunting configuration, so that the target user accesses a corresponding testing cluster according to the version number indicated by the shunting configuration to perform a test on a corresponding function.
And the shunting configuration is calculated by a shunting matching algorithm to obtain target users corresponding to each version number. According to an embodiment of the present invention, the split matching algorithm may be: and matching corresponding version numbers according to the user ID, the user type, the user group and the like in a shunting manner, and obtaining target users corresponding to the version numbers according to proportional Hash (Hash) calculation of information such as the user ID and the like.
The method comprises the steps that a corresponding version number is assigned to a target user through shunting configuration, namely the target user is associated with the version number, when the user performs version test, a shunting configuration server accesses a corresponding test cluster according to a test function in the version number, accesses a formal cluster according to a formal function in a version to be tested, and accesses a gray scale cluster according to a gray scale function in the version to be tested.
Further, according to an embodiment of the present invention, the test module 303 is further configured to: and receiving a test request initiated by a target user through the access layer, calling a test cluster interface corresponding to the test function in the version number corresponding to the target user, and accessing the test cluster corresponding to the corresponding test function.
Specifically, after the step of receiving the test request of the target user by the access layer, the test module 303 is further configured to: and forwarding the test request to a remote call route through a reverse proxy through an access layer, and calling a corresponding test cluster interface through the remote call route.
Through the arrangement, the realization of the shunting route is realized by adopting the reverse proxy of the access layer and combining the remote call route in a cooperative manner, and the parallel testing of a plurality of versions is promoted.
According to the technical scheme of the embodiment of the invention, the version number of the version to be tested of the application program is set according to the test plan and the test function; deploying a test cluster according to the category of the test function, wherein the test cluster comprises a formal cluster and a gray scale cluster; the target users corresponding to the version numbers are determined through the shunt configuration, so that the target users access the corresponding test clusters according to the version numbers indicated by the shunt configuration and perform the technical means of testing corresponding functions, the technical problems that a plurality of cluster environments need to be deployed in the prior art, the test cost is high, the test flow is complex and the flexibility is low are solved, the test flow is simplified, the test flexibility is improved, and the test cost is reduced are achieved.
Fig. 4 shows an exemplary system architecture 400 of a test method of an application or a test apparatus of an application to which an embodiment of the present invention can be applied.
As shown in fig. 4, the system architecture 400 may include terminal devices 401, 402, 403, a network 404, and a server 405 (this architecture is merely an example, and the components included in a particular architecture may be adapted according to application specific circumstances). The network 404 serves as a medium for providing communication links between the terminal devices 401, 402, 403 and the server 405. Network 404 may include various types of connections, such as wire, wireless communication links, or fiber optic cables, to name a few.
A user may use terminal devices 401, 402, 403 to interact with a server 405 over a network 404 to receive or send messages or the like. The terminal devices 401, 402, 403 may have installed thereon various communication client applications, such as shopping-like applications, web browser applications, search-like applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only).
The terminal devices 401, 402, 403 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 405 may be a server providing various services, such as a background management server (for example only) providing support for shopping websites browsed by users using the terminal devices 401, 402, 403. The background management server may analyze and perform other processing on the received data such as the test plan and the test function, and feed back a processing result (e.g., a version number, a test cluster — just an example) to the terminal device.
It should be noted that the testing method for the application program provided by the embodiment of the present invention is generally executed by the server 405, and accordingly, the testing device for the application program is generally disposed in the server 405.
It should be understood that the number of terminal devices, networks, and servers in fig. 4 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 5, shown is a block diagram of a computer system 500 suitable for use with a terminal device implementing an embodiment of the present invention. The terminal device shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 5, the computer system 500 includes a Central Processing Unit (CPU)501 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)502 or a program loaded from a storage section 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data necessary for the operation of the system 500 are also stored. The CPU 501, ROM 502, and RAM 503 are connected to each other via a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
The following components are connected to the I/O interface 505: an input portion 506 including a keyboard, a mouse, and the like; an output portion 507 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 508 including a hard disk and the like; and a communication section 509 including a network interface card such as a LAN card, a modem, or the like. The communication section 509 performs communication processing via a network such as the internet. The driver 510 is also connected to the I/O interface 505 as necessary. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 510 as necessary, so that a computer program read out therefrom is mounted into the storage section 508 as necessary.
In particular, according to the embodiments 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 through the communication section 509, and/or installed from the removable medium 511. The computer program performs the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 501.
It should be noted that the computer readable medium shown in the present invention can 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 the present invention, 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 the present invention, however, a computer readable signal medium may include 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: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
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 invention. 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 or flowchart illustration, and combinations of blocks in the block diagrams 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 modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor comprises a version number making module, a test cluster deployment module and a test module. Where the names of these modules do not in some cases constitute a limitation of the module itself, for example, the versioning module may also be described as a "module for formulating the version number of the version to be tested of an application program according to a test plan and test characteristics".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise: the version number of the version to be tested of the application program is made according to the test plan and the test function; deploying a test cluster according to the category of the test function, wherein the test cluster comprises a formal cluster and a gray scale cluster; and determining the target user corresponding to each version number through the shunting configuration, so that the target user accesses the corresponding test cluster according to the version number indicated by the shunting configuration to test the corresponding function.
According to the technical scheme of the embodiment of the invention, the version number of the version to be tested of the application program is set according to the test plan and the test function; deploying a test cluster according to the category of the test function, wherein the test cluster comprises a formal cluster and a gray scale cluster; the target users corresponding to the version numbers are determined through the shunt configuration, so that the target users access the corresponding test clusters according to the version numbers indicated by the shunt configuration and perform the technical means of testing corresponding functions, the technical problems that a plurality of cluster environments need to be deployed in the prior art, the test cost is high, the test flow is complex and the flexibility is low are solved, the test flow is simplified, the test flexibility is improved, and the test cost is reduced are achieved.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A method for testing an application program, comprising:
the version number of the version to be tested of the application program is made according to the test plan and the test function;
deploying a test cluster according to the category of the test function, wherein the test cluster comprises a formal cluster and a gray scale cluster;
and determining target users corresponding to the version numbers through the shunting configuration, so that the target users access the corresponding test clusters according to the version numbers indicated by the shunting configuration to test corresponding functions.
2. The method for testing an application according to claim 1, wherein the test plan indicates a combination of test functions.
3. The method for testing an application program according to claim 1, wherein the categories of the test functions include a formal function and a grayscale function.
4. The method for testing an application program according to claim 1, wherein the step of enabling the target user to access the corresponding test cluster according to the version number indicated by the offloading configuration includes: and receiving the test request initiated by the target user through an access layer, calling a test cluster interface corresponding to the test function in the version number corresponding to the target user, and accessing the test cluster corresponding to the corresponding test function.
5. The method for testing an application of claim 4, wherein after the step of receiving the test request initiated by the target user through the access layer, the method for testing an application further comprises: and forwarding the test request to a remote call route through a reverse proxy through the access layer, and calling a corresponding test cluster interface through the remote call route.
6. The method for testing an application program according to claim 1, wherein before the step of deploying a test cluster, the method for testing an application program further comprises: and deploying a static environment according to all versions to be tested, and indicating a corresponding version directory for the version number corresponding to each version to be tested.
7. The method for testing an application program according to claim 6, wherein in the case that the type of the service interface to be tested is a front-end service interface, the method further comprises: and accessing the static resource through an access layer and the version number, and testing corresponding functions according to the version path indicated by the version directory.
8. An apparatus for testing an application, comprising:
the version number making module is used for making the version number of the version to be tested of the application program according to the test plan and the test function;
the test cluster deployment module is used for deploying test clusters according to the types of the test functions, wherein the test clusters comprise formal clusters and gray clusters;
and the test module is used for determining target users corresponding to the version numbers through the shunting configuration, so that the target users access the corresponding test clusters according to the version numbers indicated by the shunting configuration to test corresponding functions.
9. A terminal device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-7.
10. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-7.
CN201911329091.2A 2019-12-20 2019-12-20 Application program testing method and device Pending CN113010405A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911329091.2A CN113010405A (en) 2019-12-20 2019-12-20 Application program testing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911329091.2A CN113010405A (en) 2019-12-20 2019-12-20 Application program testing method and device

Publications (1)

Publication Number Publication Date
CN113010405A true CN113010405A (en) 2021-06-22

Family

ID=76381839

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911329091.2A Pending CN113010405A (en) 2019-12-20 2019-12-20 Application program testing method and device

Country Status (1)

Country Link
CN (1) CN113010405A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113568837A (en) * 2021-07-30 2021-10-29 网易(杭州)网络有限公司 Application program testing method and device, electronic equipment and storage medium
CN114390105A (en) * 2022-03-01 2022-04-22 阿里巴巴(中国)有限公司 Enterprise user distribution method and device based on test
CN114615135A (en) * 2022-02-18 2022-06-10 佐朋数科(深圳)信息技术有限责任公司 Front-end gray level publishing method, system and storage medium
CN116633812A (en) * 2023-05-15 2023-08-22 之江实验室 Multi-version synchronous test method and system based on nginx intelligent fault-tolerant routing

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170048338A1 (en) * 2015-08-13 2017-02-16 Molbase (Shanghai) Biotechnology Co., Ltd. Online testing system and method thereof
US20180293152A1 (en) * 2017-04-07 2018-10-11 Microsoft Technology Licensing, Llc Partitioning and orchestrating infrastructure software deployments for safety and agility across diverse configurations and hardware types
CN109873731A (en) * 2017-12-05 2019-06-11 北京京东尚科信息技术有限公司 Test method, device and system
CN109918308A (en) * 2019-03-13 2019-06-21 网易(杭州)网络有限公司 Test method and server based on crowdsourcing, storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170048338A1 (en) * 2015-08-13 2017-02-16 Molbase (Shanghai) Biotechnology Co., Ltd. Online testing system and method thereof
US20180293152A1 (en) * 2017-04-07 2018-10-11 Microsoft Technology Licensing, Llc Partitioning and orchestrating infrastructure software deployments for safety and agility across diverse configurations and hardware types
CN109873731A (en) * 2017-12-05 2019-06-11 北京京东尚科信息技术有限公司 Test method, device and system
CN109918308A (en) * 2019-03-13 2019-06-21 网易(杭州)网络有限公司 Test method and server based on crowdsourcing, storage medium

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113568837A (en) * 2021-07-30 2021-10-29 网易(杭州)网络有限公司 Application program testing method and device, electronic equipment and storage medium
CN114615135A (en) * 2022-02-18 2022-06-10 佐朋数科(深圳)信息技术有限责任公司 Front-end gray level publishing method, system and storage medium
CN114615135B (en) * 2022-02-18 2024-03-22 佐朋数科(深圳)信息技术有限责任公司 Front-end gray level publishing method, system and storage medium
CN114390105A (en) * 2022-03-01 2022-04-22 阿里巴巴(中国)有限公司 Enterprise user distribution method and device based on test
CN116633812A (en) * 2023-05-15 2023-08-22 之江实验室 Multi-version synchronous test method and system based on nginx intelligent fault-tolerant routing
CN116633812B (en) * 2023-05-15 2023-12-22 之江实验室 Multi-version synchronous test method and system based on nginx intelligent fault-tolerant routing

Similar Documents

Publication Publication Date Title
CN113010405A (en) Application program testing method and device
CN108846753B (en) Method and apparatus for processing data
CN107302597B (en) Message file pushing method and device
CN109062563B (en) Method and device for generating page
CN110391938B (en) Method and apparatus for deploying services
US20170109371A1 (en) Method and Apparatus for Processing File in a Distributed System
CN112527649A (en) Test case generation method and device
CN110858172A (en) Automatic test code generation method and device
CN110706093A (en) Accounting processing method and device
CN110830374A (en) Method and device for gray level release based on SDK
CN111460129A (en) Method and device for generating identification, electronic equipment and storage medium
CN109062560B (en) Method and apparatus for generating information
CN111444077A (en) Method and device for generating flow node test data
CN111309304B (en) Method, device, medium and electronic equipment for generating IDL file
CN110705271B (en) System and method for providing natural language processing service
CN111597107A (en) Information output method and device and electronic equipment
CN112559024A (en) Method and device for generating transaction code change list
CN111382953A (en) Dynamic process generation method and device
CN110851194A (en) Method and device for acquiring code for realizing new interface
CN112860447B (en) Interaction method and system between different applications
CN111131354B (en) Method and apparatus for generating information
CN110647623B (en) Method and device for updating information
CN111984616A (en) Method, device and system for updating shared file
CN113779018A (en) Data processing method and device
CN111400623A (en) Method and apparatus for searching information

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