CN111258917A - Software testing system, method and device, computer readable storage medium - Google Patents

Software testing system, method and device, computer readable storage medium Download PDF

Info

Publication number
CN111258917A
CN111258917A CN202010269233.7A CN202010269233A CN111258917A CN 111258917 A CN111258917 A CN 111258917A CN 202010269233 A CN202010269233 A CN 202010269233A CN 111258917 A CN111258917 A CN 111258917A
Authority
CN
China
Prior art keywords
test
module
request
testing
memory
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
CN202010269233.7A
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 ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network 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 ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN202010269233.7A priority Critical patent/CN111258917A/en
Publication of CN111258917A publication Critical patent/CN111258917A/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/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Abstract

The disclosed embodiment provides a software testing system, a method and a device, and a computer readable storage medium, wherein the software testing system comprises a public testing environment and a plurality of development environments, the public testing environment comprises a plurality of first testing modules, an agent module is arranged in front of each first testing module, and each development environment comprises one or more second testing modules; the agent module is configured to: receiving a test request, wherein the test request carries a test mark; and calling the first test module or the second test module according to the test mark. Therefore, the technical scheme provided by the embodiment of the disclosure improves the stability of the test environment and improves the software test efficiency and development efficiency.

Description

Software testing system, method and device, computer readable storage medium
Technical Field
The disclosed embodiments relate to the field of computer technologies, and in particular, to a software testing system, a software testing method, a software testing device, and a computer-readable storage medium.
Background
In the early development of computers, software generally adopts a single architecture, that is, all business processing logic of the software is realized in a set of processes. The single-body architecture software is simple and easy to maintain, but is difficult to adapt to more and more complex business requirements. In order to support faster iteration in business, software is developed towards microservices, that is, a single architecture is split into independent microservices modules, and each microservices module is managed, maintained or tested.
When testing software, various methods are used for testing software of a traditional single framework. However, the software of the microservice architecture also faces many challenges, such as monitoring, service discovery, inter-service dependencies, configuration management, testing and debugging, and the like.
In the micro-service architecture, when testing software, the software is generally implemented in a common test environment. In this case, if a plurality of persons simultaneously develop and test a micro-service module, the development and test can be performed only by waiting for the availability of the micro-service test environment, which not only easily causes the instability of the test environment, but also greatly affects the test efficiency and the development efficiency of the whole software.
Disclosure of Invention
The embodiment of the disclosure provides a software testing system, a software testing method, a software testing device and a computer readable storage medium, so as to improve the stability of a testing environment and improve the software testing efficiency and the software development efficiency.
In a first aspect, an embodiment of the present disclosure provides a software testing system, including a common testing environment and multiple development environments, where the common testing environment includes multiple first testing modules, an agent module is arranged in front of each first testing module, and each development environment includes one or more second testing modules; the agent module is configured to:
receiving a test request, wherein the test request carries a test mark;
and calling the first test module or the second test module according to the test mark.
In a second aspect, an embodiment of the present disclosure provides a software testing method, which is applied to a software testing system including a common testing environment and multiple development environments, where the common testing environment includes multiple first testing modules, and an agent module is arranged in front of each first testing module; each of the development environments comprises one or more second test modules; the method is applied to the proxy module, and comprises the following steps:
receiving a test request, wherein the test request carries a test mark;
and calling the first test module or the second test module according to the test mark.
In a third aspect, an embodiment of the present disclosure provides a software testing apparatus, including: the device comprises a receiving unit, a judging unit and a judging unit, wherein the receiving unit is used for receiving a test request which carries a test mark;
and the processing unit is used for calling the first test module or the second test module according to the test mark.
In a fourth aspect, an embodiment of the present disclosure provides a software testing apparatus, including: at least one processor and memory;
the memory stores computer-executable instructions;
the at least one processor executes the computer-executable instructions stored by the memory to cause the at least one processor to perform the software testing method as set forth above in the second aspect and in various possible designs of the second aspect.
In a fifth aspect, the embodiments of the present disclosure provide a computer-readable storage medium, in which computer-executable instructions are stored, and when a processor executes the computer-executable instructions, the software testing method according to the second aspect and various possible designs of the second aspect is implemented.
The embodiment provides a software testing system, a method and a device, and a computer readable storage medium, wherein the software testing system comprises a common testing environment and a plurality of development environments, the common testing environment comprises a plurality of first testing modules and agent modules thereof, and the development environments can be used for development and use of developers and comprise one or a plurality of second testing modules, so that when software testing is carried out, the agent modules can call the first testing modules or the second testing modules according to testing marks carried in testing requests when the agent modules receive the testing requests to realize the software testing. In the software testing system, each developer develops and processes each testing module in respective development environment to obtain a second testing environment, so that parallel development can be realized, the stability of a public testing environment is improved, and the software testing efficiency and the software development efficiency are improved.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present disclosure, and for those skilled in the art, other drawings can be obtained according to the drawings without inventive exercise.
FIG. 1 is a schematic diagram of a software testing system according to an embodiment of the present disclosure;
fig. 2 is a schematic flow chart of a software testing method according to an embodiment of the present disclosure;
FIG. 3 is a schematic flow chart of another software testing method provided by the embodiments of the present disclosure;
FIG. 4 is a schematic diagram of another software testing system provided by an embodiment of the present disclosure;
fig. 5 is a block diagram of a software testing apparatus according to an embodiment of the present disclosure;
fig. 6 is a schematic hardware structure diagram of a software testing apparatus according to an embodiment of the present disclosure.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present disclosure more clear, the technical solutions of the embodiments of the present disclosure will be described clearly and completely with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are some, but not all embodiments of the present disclosure. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure.
Referring to fig. 1, fig. 1 is a schematic diagram of a software testing system applied in the embodiment of the present disclosure. As shown in FIG. 1, the software testing system 100 includes a common testing environment 110 and a plurality of development environments 120.
In one aspect, in the common test environment 110, a plurality of first test modules 111 are included, and an agent module 112(Proxy) is disposed before each first test module 111. As shown in fig. 1, 5 first test modules 111 of M-A, M-B, M-C, M-D, M-E are shown, and a proxy module, denoted for ease of illustration as proxy modules a, b, c, d, E, is provided before each first test module 111. It should be understood that the number of the first testing modules 111 and the agent modules 112 is equal, and the two modules correspond to each other; while the specific number of the first test modules 111 is not particularly limited in the embodiments of the present disclosure, 5 first test modules 111 shown in fig. 1 are exemplary embodiments, and the scope of the embodiments of the present disclosure is not limited. The roles and processing mechanisms of the agent module 112 and the first testing module 111 are described in detail later.
On the other hand, the software testing system includes a plurality of development environments 120, and each development environment 120 may correspond to a developer (or user, hereinafter simply referred to as user). Illustratively, in the software development system shown in fig. 1, 3 development environments 120 are shown, each development environment 120 corresponding to a respective user. By way of example, fig. 1 specifically shows a development environment of xiaoming (user 1), a development environment of xiaodong (user 2), and a development environment of xiaohong (user 3). It should be understood that the embodiments of the present disclosure are not particularly limited with respect to the number of development environments.
Based on the aforementioned design of the software testing system, each user can develop and test the testing module in a respective development environment. In the embodiment of the present disclosure, the test module in the development environment is referred to as a second test module 121. In other words, the second test module 121 is a test module that the user develops or designs by himself in the development environment. In an actual implementation scenario, the second testing module 121 may be obtained after the user develops and processes the first testing module 111, or the second testing module 121 may also be obtained after the user further develops and processes the second testing module 122, or the second testing module 121 may also be originally written by the user, which is not particularly limited in this disclosure.
In addition, the embodiments of the present disclosure do not particularly limit the number of second test modules included in the development environment. Specifically, in any one development environment, the number of the second test modules may be one or more. As shown in FIG. 1, in a minired development environment, only one second test module (denoted as M-C-minired in FIG. 1) is included; in the Xiaoming development environment, two second test modules are included, namely M-B-Xiaoming and M-D-Xiaoming.
In the foregoing software testing system, the data processing mode (testing mode) in the testing module (including the first testing module and the second testing module) may be written and configured by a user, which is not particularly limited in the embodiment of the present disclosure.
The agent module is used for associating with each test module, and the agent module can be used for determining a traffic forwarding path and further forwarding the traffic to the corresponding test module. Three possible traffic forwarding paths are shown in fig. 1.
Wherein the first traffic forwarding path is shown by line 11 in fig. 1. The first traffic forwarding path only flows in a common test environment, and as shown in fig. 1, traffic forwarding and software testing are implemented in the order of M-a → M-B → M-C → M-D → M-E.
In an actual implementation scenario, the first traffic forwarding path may be used as a basic traffic forwarding path of the software testing system, and a user may perform personalized design or development on each micro service module in the first traffic forwarding path. Illustratively, reference may be made to traffic forwarding paths shown by lines 12 and 13.
In addition, it should be noted that the first traffic forwarding path in the common test environment may be in a parallel processing relationship. The serial traffic forwarding path shown in fig. 1 is only an exemplary embodiment, and is not intended to limit the scope of the present solution. For example, in one possible embodiment, the first test module M-B and the first test module M-C may be forwarded in parallel between the first test module M-A and the first test module M-D. This is not exhaustive.
In embodiments of the present disclosure, the traffic forwarding path may relate to a development environment of one or more users.
As shown in fig. 1, line 12 illustrates a second traffic forwarding path involving the first test module and a second test module in a development environment. Specifically, the second test module M-C-minired in the development environment of minired is used to replace M-C (the first test module) in the original first traffic forwarding path. At this time, the second traffic forwarding path is: M-A → M-B → M-C-Xiaohong → M-D → M-E.
As shown in fig. 1, line 13 illustrates a third traffic forwarding path involving the first test module and a second test module in the plurality of development environments. As shown in fig. 1, the third traffic forwarding path replaces M-B in the original first traffic forwarding path with a second test module M-B-xiaoming in the xiaoming development environment; replacing the M-C in the original first traffic forwarding path by a second testing module M-C-small east in the development environment of the small east; and replacing the M-D in the original first traffic forwarding path by a second test module M-D-Xiaoming in the Xiaoming development environment. At this time, the third traffic forwarding path is: M-A → M-B-Xiaoming → M-C-Xiaodong → M-D-Xiaoming → M-E.
In the embodiment of the present disclosure, the traffic forwarding path may be preset by a developer or configured before a software test is performed, and in a specific implementation, the traffic forwarding path may be pre-stored in a memory, and data in the memory may be acquired by the agent module.
In an exemplary embodiment, the memory is a high-availability sub-deployment memory ETCD. In this manner, the proxy module may poll the memory and retrieve traffic forwarding paths stored in the memory.
Alternatively, in another exemplary embodiment, the memory may be an internal memory of the agent module. The traffic forwarding paths stored in the built-in memories of the plurality of proxy modules are the same. At this time, the proxy module may obtain the traffic forwarding path stored in the memory by directly reading or calling.
Alternatively, in another exemplary embodiment, the proxy module may communicate with the memory, and thus the proxy module may obtain the traffic forwarding path stored in the memory by sending a path obtaining request to the memory and receiving feedback from the memory.
It should be noted that, in the foregoing embodiment, one or more traffic forwarding paths may be stored in the memory. It should be understood that when the memory stores one traffic forwarding path, for example, the memory stores only the aforementioned third traffic forwarding path, the agent module implements the software test according to the third traffic forwarding path.
When multiple traffic forwarding paths are involved, then the agent module needs to determine the traffic forwarding path for the current test task (or current test request). This may be accomplished by a test flag carried in the test request.
At this time, reference may be made to the software testing method shown in fig. 2, where the method is executed in the agent module, and specifically includes the following steps:
s202, receiving a test request, wherein the test request carries a test mark.
The software testing method provided by the embodiment of the present disclosure may be applied to any one of the agent modules (e.g., agent module a to agent module e) shown in fig. 1, and at this time, the test request received by the agent module may come from a user or a previous test module. And the last test module is a last first test module or a last second test module.
Take the system shown in fig. 1 as an example. Agent module a may receive a test request from a user (determined based on collected operational information). And the agent module b may receive the forwarded test request from the first test module M-a. For the third traffic forwarding path indicated by the line 13, the test request received by the agent module c is forwarded after being processed by the second test module M-B-xiaoming.
It should be noted that the test request processed by the test module may be different from the test request from the user. For example, the test request received by the agent module a may be a test instruction issued by a user, and the test request received by the agent module b may be processing daA output by the first test module M-a after processing the test instruction.
S204, calling the first test module or the second test module according to the test mark.
As described above, in the embodiment of the present disclosure, the test flag is used to indicate a traffic forwarding path. In other words, the test flag may uniquely indicate one traffic forwarding path.
In one possible embodiment of the present disclosure, the traffic forwarding path or its expression may also be used directly as a test flag. Illustratively, the aforementioned second traffic forwarding path may be abbreviated as the following expression: a-B-C red-D-E, then the expression may be carried in the test request, at which point the expression serves as the test token. At this time, when executing S204, the proxy module may directly obtain the target path based on the test flag, and further, invoke the corresponding test module at the current node.
In another possible embodiment of the present disclosure, based on the test flag carried in the test request, when the agent module performs this step, it may implement the following steps in a manner shown in fig. 3:
s2042, in the preset flow forwarding path, obtaining a target path corresponding to the test mark.
As described above, the proxy module may obtain the traffic forwarding path stored in the memory by polling, reading, calling, or communicating.
In a specific implementation scenario, the agent module may obtain all preset traffic forwarding paths stored therein, and further determine a target path based on an indication relationship between the test flag and the traffic forwarding path. Alternatively, the agent module may also send a path acquisition request carrying the test flag to the memory and receive a target path from the memory (or its associated processor or transceiver) feedback.
The test flag is specifically used to indicate which traffic forwarding path (indicating relationship between the two), and may be preset in the proxy module in advance or stored in the memory in advance.
S2044, based on the target path, calling the first test module or the second test module.
Based on the determined target path, when the step is executed, the agent module only needs to call the test module corresponding to the current node.
Still taking the system shown in fig. 1 as an example, if the target path is the third traffic forwarding path. At this time, if the current proxy module c is used, the next test module corresponding to the current node of the target path is the second test module M-B-east, and the proxy module c calls the second test module M-B-east and forwards the current test traffic to the second test module M-B-east. If the current agent module D is used, the next testing module corresponding to the current node of the target path is the second testing module M-B-Xiaoming, the agent module D calls the second testing module M-D-Xiaoming and forwards the current testing flow to the second testing module M-D-Xiaoming. And if the current agent module E is the agent module E, the next test module corresponding to the current node of the target path is the first test module M-E, and the agent module E calls the first test module M-E and forwards the current test flow to the first test module M-E.
In an embodiment of the present disclosure, the test mark may include: color marks, character marks, field marks. The color may be a single color or a mixture of a plurality of colors (for example, a gradient color), and is not particularly limited. Characters may include, but are not limited to: one or more combinations of foreign language letters, words, Chinese characters, punctuation marks, emoticons, and numerical symbols.
In one embodiment of the present disclosure, a test flag may be carried in an added field (which may be denoted as X-FEATURE) of the test request. Specifically, the newly added field may also be located at the head of the test request; alternatively, the new field may be located in any specified field in the test request. For example, an existing field may be specified, an additional field may be added to the specified field, and the content carried by the additional field may be used to implement the function of the test flag.
Hereinafter, the test marks will be exemplified.
In an exemplary embodiment, the marking of the target path may be achieved by testing the color of the test data traffic of the request. For example, if red corresponds to a first traffic forwarding path, green corresponds to a second traffic forwarding path, and yellow corresponds to a third traffic forwarding path; the agent module may then determine the target path based on the color of the test data traffic.
In an exemplary embodiment, a new field related to color may be added to the test request, and the target path may be determined according to the color indication in the field. Still taking the foregoing corresponding relationship as an example, if the newly added field is red, the target path indicated by the test flag is the first traffic forwarding path.
In an exemplary embodiment, a newly added field X-FEATURE may be further added to the test request, and at this time, if a character carried in the X-FEATURE is 1, the test identifier indicates that the first traffic forwarding path is a target path; and if the character carried in the X-FEATURE is 2, the test identifier indicates that the second traffic forwarding path is the target path.
In an exemplary embodiment, the indication of the target path may also be implemented by testing whether the request carries an added field X-FEATURE. For example, if the test request carries a newly added field X-FEATURE, the test identifier indicates that the second traffic forwarding path is a target path; and if the test request does not carry the newly-added field X-FEATURE, the test identifier indicates that the first traffic forwarding path is the target path.
It should be noted that the test flag may be added manually by the user, or may be added automatically by an agent module (e.g., the first agent module a in fig. 1). For example, if the user specifies the second traffic forwarding path in the test instruction, the agent module may actively add a test flag corresponding to the second traffic forwarding path to the test request when receiving the test request. For example, the test request may be dyed corresponding to the test data traffic to implement marking of the test request.
In addition, in the embodiment of the present disclosure, the test request received by the proxy module may be an HTTP protocol request or a third protocol request.
Specifically, the position of the test mark in the test request may be different based on the type of the test request. For example, when the test request is an HTTP protocol request, the test flag may be located at the head of the HTTP protocol request; for example, a field X-FEATURE is added to the header of the HTTP protocol request (test request) and the target path is indicated. When the test request is a third protocol request, the test flag may be located on a specified field of the third protocol request; for example, if the tail field of the third protocol request (test request) is a specified field, a field X-FEATURE may be added in the tail field of the third protocol request, and the target path may be indicated accordingly.
In addition, based on different protocol types of the test request, the proxy module can be also divided into an HTTP proxy module and a third proxy module. It should be understood that the HTTP proxy module is used to process services of the HTTP protocol, and the third proxy module is used to process services of the third protocol. In a specific implementation scenario, the HTTP proxy module (or the Thrfit proxy module) may periodically poll the ETCD to obtain a forwarding rule (a preset traffic forwarding path and/or an indication relationship between a test identifier and the traffic forwarding path), and implement all requests of each test module (micro service module) (the embodiment of the present disclosure mainly relates to a test request), and implement traffic forwarding accordingly.
Illustratively, the HTTP proxy module may be implemented with an open source openreserve server. OpenResty (also called ngx _ OpenResty) is a telescopic Web platform (Web application server) based on NGINX, OpenResty can quickly construct an ultrahigh-performance Web application system capable of performing concurrent connection response of more than 10K, and the stability of a software test system is improved.
In addition, it should be further understood that the software testing system may further include other modules or processing units, which are not particularly limited by the embodiments of the present disclosure.
By way of example, fig. 4 illustrates another software testing system provided by an embodiment of the present disclosure. In addition to the development environment and the modules in the public test environment, the software test system further includes a load balancing module (Nginx, denoted as N in fig. 4), an Application Programming Interface (API, denoted as Interface in fig. 4), a memory (etcd), and a communication protocol Server (WebSocket Server, denoted as a communication Server in fig. 4). Nginx is used to achieve load balancing among the modules.
In a possible embodiment, upstream from nginnx, multiple HTTP servers (servers) may be further provided, and an openty server (as an HTTP proxy) is installed before each HTTP server to implement forwarding of an HTTP request.
In another possible embodiment, upstream from nginnx, multiple HTTP servers (servers) may be further provided, and an Openresty server (as an HTTP proxy) is installed before each HTTP server to implement forwarding of an HTTP request. And a Thrift agent can be installed upstream of the HTTP server to realize the forwarding of the Thrift request.
In the software testing system shown in fig. 4 and any variation thereof, in the public testing environment, an agent module (thread proxy) is provided before each first testing module (thread server, denoted as SVC in fig. 4), and the agent module implements traffic forwarding according to the manner shown in any of the foregoing embodiments, that is, calls the first testing module in the public testing environment or calls the second testing module in the development environment. And will not be described in detail.
In summary, in the embodiment of the present disclosure, the software testing system includes a common testing environment and a plurality of development environments, the common testing environment includes a plurality of first testing modules and agent modules thereof, and the development environments can be used for development and use by developers, and include one or more second testing modules, so that when a software test is performed, and the agent modules receive a testing request, the agent modules can call the first testing modules or the second testing modules according to testing marks carried in the testing request to implement the software test. In the software testing system, each developer develops and processes each testing module in respective development environment to obtain a second testing environment, so that parallel development can be realized, the stability of a public testing environment is improved, and the software testing efficiency and the software development efficiency are improved.
Fig. 5 is a block diagram of a software testing apparatus (agent module) according to an embodiment of the present disclosure. For ease of illustration, only portions that are relevant to embodiments of the present disclosure are shown. Referring to fig. 5, the software testing apparatus 500 includes: a receiving unit 52 and a processing unit 54.
The receiving unit 52 is configured to receive a test request, where the test request carries a test flag; and the processing unit 54 is configured to invoke the first test module or the second test module according to the test flag.
In an embodiment of the present disclosure, the processing module 54 is specifically configured to: acquiring a target path corresponding to the test mark in a preset flow forwarding path; based on the target path, calling the first test module or the second test module.
In an embodiment of the present disclosure, the processing module 54 is further configured to: and polling a memory and acquiring the traffic forwarding path stored in the memory.
In one embodiment of the present disclosure, the memory is a highly available sub-deployment memory, ETCD.
In one embodiment of the present disclosure, the test request is from a user or a previous test module; the last test module is a last first test module or a last second test module.
In one embodiment of the present disclosure, the test mark includes: color marks, character marks, field marks.
In one embodiment of the present disclosure, the test flag is carried in an added field of the test request; the newly added field is positioned at the head of the test request; or, a specified field located in the test request.
In one embodiment of the present disclosure, the test request is an HTTP protocol request or a third protocol request.
The software testing apparatus provided in this embodiment may be used to execute the technical solution executed by the proxy module in the foregoing method embodiments, and the implementation principle and technical effect are similar, which are not described herein again.
Referring to fig. 6, a schematic structural diagram of a software testing apparatus 600 suitable for implementing the embodiment of the present disclosure is shown, where the software testing apparatus 600 may be a terminal device or a server. Among them, the terminal Device may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a Digital broadcast receiver, a Personal Digital Assistant (PDA), a tablet computer (PAD), a Portable Multimedia Player (PMP), a car terminal (e.g., car navigation terminal), etc., and a fixed terminal such as a Digital TV, a desktop computer, etc. The software testing apparatus 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, the software testing apparatus 600 may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 601, which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 602 or a program loaded from a storage device 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the software testing apparatus 600 are also stored. The processing device 601, the ROM602, and the RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
Generally, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 608 including, for example, tape, hard disk, etc.; and a communication device 606. The communication means 606 may allow the software testing apparatus 600 to communicate wirelessly or by wire with other devices to exchange data. While FIG. 6 illustrates a software testing apparatus 600 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
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 device 606, or installed from the storage device 608, or 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 the embodiments of the present disclosure.
It should be noted that the computer readable medium in the present disclosure 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 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 contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either 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 included in the software testing apparatus; or may exist separately and not be assembled into the software testing apparatus.
The computer readable medium carries one or more programs which, when executed by the software testing apparatus, cause the software testing apparatus to perform the methods illustrated in the embodiments described above.
Computer program code for carrying out operations for aspects 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 program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of Network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
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. Where the name of a unit does not in some cases constitute a limitation of the unit itself, for example, the first retrieving unit may also be described as a "unit for retrieving at least two internet protocol addresses".
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on 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 a first aspect, according to one or more embodiments of the present disclosure, there is provided a software testing system, including: the system comprises a common test environment and a plurality of development environments, wherein the common test environment comprises a plurality of first test modules, an agent module is arranged in front of each first test module, and each development environment comprises one or more second test modules; the agent module is configured to:
receiving a test request, wherein the test request carries a test mark;
and calling the first test module or the second test module according to the test mark.
According to one or more embodiments of the present disclosure, the agent module is specifically configured to:
acquiring a target path corresponding to the test mark in a preset flow forwarding path;
based on the target path, calling the first test module or the second test module.
According to one or more embodiments of the present disclosure, the proxy module is further configured to:
and polling a memory and acquiring the traffic forwarding path stored in the memory.
According to one or more embodiments of the present disclosure, the memory is a highly available sub-deployment memory, ETCD.
According to one or more embodiments of the present disclosure, the test request is from a user or a last test module;
the last test module is a last first test module or a last second test module.
According to one or more embodiments of the present disclosure, the test mark includes: color marks, character marks, field marks.
According to one or more embodiments of the present disclosure, the test flag is carried in an added field of the test request;
the newly added field is positioned at the head of the test request; or, a specified field located in the test request.
According to one or more embodiments of the present disclosure, the test request is an HTTP protocol request or a third protocol request.
In a second aspect, according to one or more embodiments of the present disclosure, a software testing method is provided, which is applied to a software testing system including a common testing environment and a plurality of development environments, where the common testing environment includes a plurality of first testing modules, and an agent module is arranged in front of each first testing module; each of the development environments comprises one or more second test modules; the method is applied to the proxy module, and comprises the following steps:
receiving a test request, wherein the test request carries a test mark;
and calling the first test module or the second test module according to the test mark.
According to one or more embodiments of the present disclosure, the calling the first test module or the second test module according to the test flag includes:
acquiring a target path corresponding to the test mark in a preset flow forwarding path;
based on the target path, calling the first test module or the second test module.
According to one or more embodiments of the present disclosure, the method further comprises:
and polling a memory and acquiring the traffic forwarding path stored in the memory.
According to one or more embodiments of the present disclosure, the memory is a highly available sub-deployment memory, ETCD.
According to one or more embodiments of the present disclosure, the test request is from a user or a last test module;
the last test module is a last first test module or a last second test module.
According to one or more embodiments of the present disclosure, the test mark includes: color marks, character marks, field marks.
According to one or more embodiments of the present disclosure, the test flag is carried in an added field of the test request;
the newly added field is positioned at the head of the test request; or, a specified field located in the test request.
According to one or more embodiments of the present disclosure, the test request is an HTTP protocol request or a third protocol request.
In a third aspect, according to one or more embodiments of the present disclosure, there is provided a software testing apparatus including:
the device comprises a receiving unit, a judging unit and a judging unit, wherein the receiving unit is used for receiving a test request which carries a test mark;
and the processing unit is used for calling the first test module or the second test module according to the test mark.
According to one or more embodiments of the present disclosure, the processing module is specifically configured to: acquiring a target path corresponding to the test mark in a preset flow forwarding path; based on the target path, calling the first test module or the second test module.
According to one or more embodiments of the present disclosure, the processing module is further configured to: and polling a memory and acquiring the traffic forwarding path stored in the memory.
According to one or more embodiments of the present disclosure, the memory is a highly available sub-deployment memory, ETCD.
According to one or more embodiments of the present disclosure, the test request is from a user or a last test module; the last test module is a last first test module or a last second test module.
According to one or more embodiments of the present disclosure, the test mark includes: color marks, character marks, field marks.
According to one or more embodiments of the present disclosure, the test flag is carried in an added field of the test request; the newly added field is positioned at the head of the test request; or, a specified field located in the test request.
According to one or more embodiments of the present disclosure, the test request is an HTTP protocol request or a third protocol request.
In a fourth aspect, according to one or more embodiments of the present disclosure, there is provided a software testing apparatus including: at least one processor and memory;
the memory stores computer-executable instructions;
the at least one processor executes the computer-executable instructions stored by the memory to cause the at least one processor to perform the software testing method as set forth above in the second aspect and in various possible designs of the second aspect.
In a fifth aspect, according to one or more embodiments of the present disclosure, a computer-readable storage medium is provided, in which computer-executable instructions are stored, and when the computer-executable instructions are executed by a processor, the software testing method according to the second aspect and various possible designs of the second aspect is implemented.
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 disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.

Claims (19)

1. A software testing system is characterized by comprising a public testing environment and a plurality of development environments, wherein the public testing environment comprises a plurality of first testing modules, an agent module is arranged in front of each first testing module, and each development environment comprises one or more second testing modules; the agent module is configured to:
receiving a test request, wherein the test request carries a test mark;
and calling the first test module or the second test module according to the test mark.
2. The system of claim 1, wherein the agent module is specifically configured to:
acquiring a target path corresponding to the test mark in a preset flow forwarding path;
based on the target path, calling the first test module or the second test module.
3. The system of claim 2, wherein the agent module is further configured to:
and polling a memory and acquiring the traffic forwarding path stored in the memory.
4. The system according to claim 3, wherein the memory is a high-availability sub-deployment memory, ETCD.
5. The system of any of claims 1-4, wherein the test request is from a user or a previous test module;
the last test module is a last first test module or a last second test module.
6. The system of any of claims 1-4, wherein the test indicia comprises: color marks, character marks, field marks.
7. The system according to any of claims 1-4, wherein the test flag is carried in an added field of the test request;
the newly added field is positioned at the head of the test request; or, a specified field located in the test request.
8. The system of any of claims 1-4, wherein the test request is an HTTP protocol request or a Thirft protocol request.
9. A software testing method is characterized in that the method is applied to a software testing system comprising a public testing environment and a plurality of development environments, wherein the public testing environment comprises a plurality of first testing modules, and an agent module is arranged in front of each first testing module; each of the development environments comprises one or more second test modules; the method is applied to the proxy module, and comprises the following steps:
receiving a test request, wherein the test request carries a test mark;
and calling the first test module or the second test module according to the test mark.
10. The method of claim 9, wherein said invoking the first test module or the second test module according to the test flag comprises:
acquiring a target path corresponding to the test mark in a preset flow forwarding path;
based on the target path, calling the first test module or the second test module.
11. The method of claim 10, further comprising:
and polling a memory and acquiring the traffic forwarding path stored in the memory.
12. The method according to claim 11, wherein the memory is a high-availability sub-deployment memory, ETCD.
13. The method of any of claims 9-12, wherein the test request is from a user or a previous test module;
the last test module is a last first test module or a last second test module.
14. The method of any of claims 9-12, wherein the test mark comprises: color marks, character marks, field marks.
15. The method according to any of claims 9-12, wherein the test flag is carried in an added field of the test request;
the newly added field is positioned at the head of the test request; or, a specified field located in the test request.
16. The method according to any of claims 9-12, wherein the test request is an HTTP protocol request or a Thirft protocol request.
17. A software testing apparatus, comprising:
the device comprises a receiving unit, a judging unit and a judging unit, wherein the receiving unit is used for receiving a test request which carries a test mark;
and the processing unit is used for calling the first test module or the second test module according to the test mark.
18. A software testing apparatus, comprising: at least one processor and memory;
the memory stores computer-executable instructions;
the at least one processor executing the computer-executable instructions stored by the memory causes the at least one processor to perform the software testing method of any of claims 9-16.
19. A computer-readable storage medium having computer-executable instructions stored thereon which, when executed by a processor, implement the software testing method of any one of claims 9-16.
CN202010269233.7A 2020-04-08 2020-04-08 Software testing system, method and device, computer readable storage medium Pending CN111258917A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010269233.7A CN111258917A (en) 2020-04-08 2020-04-08 Software testing system, method and device, computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010269233.7A CN111258917A (en) 2020-04-08 2020-04-08 Software testing system, method and device, computer readable storage medium

Publications (1)

Publication Number Publication Date
CN111258917A true CN111258917A (en) 2020-06-09

Family

ID=70953516

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010269233.7A Pending CN111258917A (en) 2020-04-08 2020-04-08 Software testing system, method and device, computer readable storage medium

Country Status (1)

Country Link
CN (1) CN111258917A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112714042A (en) * 2020-12-22 2021-04-27 北京字节跳动网络技术有限公司 Pressure testing method and device, electronic equipment and storage medium
CN114389969A (en) * 2022-01-12 2022-04-22 北京百度网讯科技有限公司 Client test method and device, electronic equipment and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050235263A1 (en) * 2004-04-19 2005-10-20 Bundy Laura M Apparatus, system and/or method for combining multiple tests to a single test in a multiple independent port test environment
CN105446865A (en) * 2014-07-09 2016-03-30 阿里巴巴集团控股有限公司 Test method and device under multi-environment
US20170060722A1 (en) * 2015-08-24 2017-03-02 International Business Machines Corporation Test of the execution of workloads in a computing system
US20170329696A1 (en) * 2015-12-04 2017-11-16 A9.Com, Inc. Techniques for real time server testing in a production environment
CN107404418A (en) * 2017-07-26 2017-11-28 百度在线网络技术(北京)有限公司 Internet product method of testing, device, equipment and storage medium
CN107979508A (en) * 2017-11-24 2018-05-01 深圳乐信软件技术有限公司 Micro services test method and device
JP2019016215A (en) * 2017-07-07 2019-01-31 横河電機株式会社 Control system, and common platform
CN110460497A (en) * 2019-08-20 2019-11-15 迈普通信技术股份有限公司 A kind of automated testing method, apparatus and system
CN110674047A (en) * 2019-09-26 2020-01-10 北京字节跳动网络技术有限公司 Software testing method and device and electronic equipment

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050235263A1 (en) * 2004-04-19 2005-10-20 Bundy Laura M Apparatus, system and/or method for combining multiple tests to a single test in a multiple independent port test environment
CN105446865A (en) * 2014-07-09 2016-03-30 阿里巴巴集团控股有限公司 Test method and device under multi-environment
US20170060722A1 (en) * 2015-08-24 2017-03-02 International Business Machines Corporation Test of the execution of workloads in a computing system
US20170329696A1 (en) * 2015-12-04 2017-11-16 A9.Com, Inc. Techniques for real time server testing in a production environment
JP2019016215A (en) * 2017-07-07 2019-01-31 横河電機株式会社 Control system, and common platform
CN107404418A (en) * 2017-07-26 2017-11-28 百度在线网络技术(北京)有限公司 Internet product method of testing, device, equipment and storage medium
CN107979508A (en) * 2017-11-24 2018-05-01 深圳乐信软件技术有限公司 Micro services test method and device
CN110460497A (en) * 2019-08-20 2019-11-15 迈普通信技术股份有限公司 A kind of automated testing method, apparatus and system
CN110674047A (en) * 2019-09-26 2020-01-10 北京字节跳动网络技术有限公司 Software testing method and device and electronic equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112714042A (en) * 2020-12-22 2021-04-27 北京字节跳动网络技术有限公司 Pressure testing method and device, electronic equipment and storage medium
CN114389969A (en) * 2022-01-12 2022-04-22 北京百度网讯科技有限公司 Client test method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN110753089B (en) Method, device, medium and electronic equipment for managing client
CN111555940B (en) Client test method and device, electronic equipment and computer readable storage medium
CN111679990A (en) Test data generation method and device, readable medium and electronic equipment
US20230273709A1 (en) Information display method and apparatus, electronic device, and computer readable storage medium
CN113835992A (en) Memory leak processing method and device, electronic equipment and computer storage medium
CN111258917A (en) Software testing system, method and device, computer readable storage medium
CN110619096A (en) Method and apparatus for synchronizing data
CN110489621B (en) Method, device, medium and electronic equipment for dynamically adjusting route
CN111324834B (en) Method, device, electronic equipment and computer readable medium for image-text mixed arrangement
CN111309304B (en) Method, device, medium and electronic equipment for generating IDL file
CN111857720A (en) Method and device for generating user interface state information, electronic equipment and medium
CN112714042B (en) Pressure testing method and device, electronic equipment and storage medium
CN111752644A (en) Interface simulation method, device, equipment and storage medium
CN112954056A (en) Monitoring data processing method and device, electronic equipment and storage medium
CN113628097A (en) Image special effect configuration method, image recognition method, image special effect configuration device and electronic equipment
CN111324405A (en) Character display method and device and electronic equipment
CN111124541A (en) Configuration file generation method, device, equipment and medium
CN110704050A (en) Module initialization method, device, electronic equipment and computer readable storage medium
CN111831942A (en) Method and device for displaying search results on page and electronic equipment
CN114417782A (en) Display method and device and electronic equipment
CN112306858A (en) Test method and device and electronic equipment
CN112286808A (en) Application program testing method and device, electronic equipment and medium
CN111596987A (en) Page display method and device and electronic equipment
CN111026504A (en) Processing method and device for configuring instruction for acquiring processor information in virtual machine, CPU chip, system on chip and computer
CN112306317A (en) Unread message notification method and device and electronic equipment

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