CN109376088B - Automatic test system and automatic test method - Google Patents

Automatic test system and automatic test method Download PDF

Info

Publication number
CN109376088B
CN109376088B CN201811241560.0A CN201811241560A CN109376088B CN 109376088 B CN109376088 B CN 109376088B CN 201811241560 A CN201811241560 A CN 201811241560A CN 109376088 B CN109376088 B CN 109376088B
Authority
CN
China
Prior art keywords
test
sdk
module
api
instruction
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811241560.0A
Other languages
Chinese (zh)
Other versions
CN109376088A (en
Inventor
权昊
颜金姑
庄接滨
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wangsu Science and Technology Co Ltd
Original Assignee
Wangsu Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wangsu Science and Technology Co Ltd filed Critical Wangsu Science and Technology Co Ltd
Priority to CN201811241560.0A priority Critical patent/CN109376088B/en
Publication of CN109376088A publication Critical patent/CN109376088A/en
Application granted granted Critical
Publication of CN109376088B publication Critical patent/CN109376088B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

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

Landscapes

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

Abstract

The invention discloses an automatic test system and an automatic test method. The system comprises a control module and an SDK test module. The control module may be configured to start the SDK test module for executing the SDK test instruction if it is determined that the received test instruction is the SDK test instruction, and further, the SDK test module may be configured to obtain a first SDK test case corresponding to the SDK test requirement, and call, from the second platform, an SDK test service corresponding to the first SDK test case based on an RPC communication protocol to perform an SDK test. Therefore, the SDK automatic test based on RPC communication can be realized, and the system can call the SDK test service from the second platform, in other words, the SDK test case and the corresponding SDK test service are mutually independent, so that the system can realize the rapid expansion of the test case and can greatly improve the maintenance speed.

Description

Automatic test system and automatic test method
Technical Field
The invention relates to the technical field of software testing, in particular to an automatic testing system and an automatic testing method.
Background
Software Development Kit (SDK) generally refers to a collection of Development tools used by a Software engineer to build application Software for a particular Software package, Software framework, hardware platform, operating system, etc. The function definition of the SDK is derived from the configuration file of the SDK, and the SDK configuration file can be generated, modified and issued by a configuration center of the SDK. The developer can develop the application program by adopting the SDK, so that the developer can quickly establish the application software, and the process of writing hardware codes and basic code frames is omitted. The SDK test is required to determine whether the SDK meets the requirements of the application software created by the developer. However, the prior art has not been able to implement the SDK automation test based on Remote Procedure Call (RPC) communication.
Based on this, there is a need for an automatic test system for implementing an SDK automatic test based on RPC communication.
Disclosure of Invention
The embodiment of the invention provides an automatic test system and an automatic test method, which are used for realizing SDK automatic test based on RPC communication.
The embodiment of the invention provides an automatic test system, which comprises a control module and an SDK test module;
the control module is used for receiving a test instruction sent by a first platform, and if the test instruction is determined to be an SDK test instruction, starting the SDK test module for executing the SDK test instruction;
the SDK testing module is used for obtaining a first SDK testing case corresponding to the SDK testing instruction and calling an SDK testing service corresponding to the first SDK testing case from a second platform based on an RPC communication protocol to carry out an SDK test.
By adopting the automatic testing system, the SDK automatic test based on RPC communication can be realized through the interaction between the SDK testing module in the system and the second platform; furthermore, the system can call the SDK test service from the second platform, in other words, the SDK test case and the corresponding SDK test service are independent from each other, so that the system can realize the rapid capacity expansion of the test case and can greatly improve the maintenance speed.
In a possible implementation manner, after performing the SDK test, the SDK test module is further configured to:
generating first SDK test data and sending the first SDK test data to the control module;
the control module is further configured to:
and receiving the first SDK test data, generating an SDK test report according to the first SDK test data, and sending the SDK test report to the first platform.
By adopting the automatic system, the interaction between the system and the first platform is convenient for viewing the SDK test report from the first platform, so that a user can realize the automatic test from the input of the test instruction to the reception of the test report only by the first platform, and the automatic test system is convenient and quick and is convenient for the user to operate.
In one possible implementation, the system further includes a User Interface (UI) testing module;
the control module is further configured to start the UI test module for executing the UI test instruction if it is determined that the test instruction is a UI test instruction;
the UI test module is used for acquiring a first UI test case corresponding to the UI test instruction, carrying out UI test according to the first UI test case, generating first UI test data and sending the first UI test data to the control module;
the control module is further configured to receive the first UI test data, generate a UI test report according to the first UI test data, and send the UI test report to the first platform.
By adopting the automatic test system, the UI automatic test can be realized through the UI test module in the system.
In a possible implementation manner, the system further includes an Application Programming Interface (API) testing module;
the control module is further configured to start the API testing module for executing the API testing instruction if it is determined that the testing instruction is an API testing instruction;
the API test module is used for acquiring a first API test case corresponding to the API test instruction, performing API test according to the first API test case, generating first API test data and sending the first API test data to the control module;
the control module is further configured to receive the first API test data, generate an API test report according to the first API test data, and send the API test report to the first platform.
By adopting the automatic test system, the API automatic test can be realized through the API test module in the system.
In a possible implementation manner, the system further includes a full scene Scenario testing module;
the control module is further configured to start the scoreario test module for executing the ALL test instruction if it is determined that the test instruction is a full stack ALL test instruction; the ALL test instruction is used for indicating to execute the SDK test instruction, the UI test instruction and the API test instruction;
the Scenario test module is used for determining the test sequence of each test module according to the ALL test instruction and determining whether to start the next test module according to the test sequence and the test data of the previous test module;
the Scenario test module is further configured to receive test data sent by each test module, generate ALL test data according to the test data of each test module, and send the ALL test data to the control platform;
the control module is further configured to receive the ALL test data, generate an ALL test report according to the ALL test data, and send the ALL test report to the first platform.
By adopting the automatic test system, the UI test module, the API test module and the SDK test module are respectively started through the Scenario test module in the system, so that the full-stack automatic test from WEB page configuration to API access to SDK function verification can be realized.
The embodiment of the invention provides an automatic test method, which is applied to an automatic test system, wherein the system comprises a control module and a Software Development Kit (SDK) test module; the method comprises the following steps:
the control module receives a test instruction sent by a first platform, and if the test instruction is determined to be an SDK test instruction, an SDK test module for executing the SDK test instruction is started;
the SDK testing module obtains a first SDK testing case corresponding to the SDK testing instruction, and calls an SDK testing service corresponding to the first SDK testing case from a second platform based on an RPC communication protocol to perform SDK testing.
In one possible implementation manner, after the SDK test module performs the SDK test, the method further includes:
the SDK testing module generates first SDK testing data and sends the first SDK testing data to the control module;
and the control module receives the first SDK test data, generates an SDK test report according to the first SDK test data, and sends the SDK test report to the first platform.
In one possible implementation, the system further includes a user interface UI test module; the method further comprises the following steps:
if the control module determines that the test instruction is a UI test instruction, starting a UI test module for executing the UI test instruction;
and the UI test module acquires a first UI test case corresponding to the UI test instruction and performs UI test according to the first UI test case.
In a possible implementation manner, after the UI test is performed according to the first UI test case, the method further includes:
the UI test module generates first UI test data and sends the first UI test data to the control module;
and the control module receives the first UI test data, generates a UI test report according to the first UI test data, and sends the UI test report to the first platform.
In one possible implementation, the system further includes an application programming interface, API, test module; the method further comprises the following steps:
if the control module determines that the test instruction is an API test instruction, starting an API test module for executing the API test instruction;
and the API test module acquires a first API test case corresponding to the API test instruction and performs API test according to the first API test case.
In one possible implementation manner, after performing API testing according to the first API test case, the method further includes:
the API test module generates first API test data and sends the first API test data to the control module;
and the control module receives the first API test data, generates an API test report according to the first API test data, and sends the API test report to the first platform.
In a possible implementation manner, the system further includes a full scene Scenario testing module; the method further comprises the following steps:
if the control module determines that the test instruction is a full stack ALL test instruction, starting a Scenario test module for executing the ALL test instruction; the ALL test instruction is used for executing the SDK test instruction, the UI test instruction and the API test instruction;
the Scenario test module determines the test sequence of each test module according to the ALL test instruction, and determines whether to start the next test module according to the test sequence and the test data of the previous test module; receiving the test data sent by each test module, generating ALL test data according to the test data of each test module, and sending the ALL test data to the control platform;
the control module receives the ALL test data, generates an ALL test report according to the ALL test data, and sends the ALL test report to the first platform.
In one possible implementation manner, the test sequence is UI test, API test, and SDK test;
the Scenario test module determines whether to start the next test module according to the test sequence and the test data of the previous test module; receiving the test data sent by each test module, generating ALL test data according to the test data of each test module, and sending the ALL test data to the control platform, including:
starting the UI test module; receiving second UI test data sent by the UI test module, and starting the API test module if the UI test is determined to be successful according to the second UI test data; receiving the second API test data sent by the API test module, and starting the SDK test module if the API test is determined to be successful according to the second API test data; and receiving the second SDK test data sent by the SDK test module, generating ALL test data according to the second UI test data, the second API test data and the second SDK test data, and sending the ALL test data to the control platform.
In a possible implementation manner, the first platform is used for receiving a test instruction input by a user and receiving a test report sent by the system;
the second platform stores a plurality of SDK test services in advance, and the SDK test services are loaded after the second platform is remotely started by the SDK test module.
The embodiment of the present application further provides an apparatus, which has a function of implementing the above-described automated testing method. The function can be realized by executing corresponding software through hardware, and in one possible design, the device comprises: a processor, a transceiver, a memory; the memory is used for storing computer execution instructions, the transceiver is used for realizing the communication between the device and other communication entities, the processor and the memory are connected through the bus, and when the device runs, the processor executes the computer execution instructions stored by the memory so as to enable the device to execute the automatic test method described above.
An embodiment of the present invention further provides a computer storage medium, where a software program is stored, and when the software program is read and executed by one or more processors, the software program implements the automated testing method described in the foregoing various possible implementation manners.
Embodiments of the present invention also provide a computer program product containing instructions, which when run on a computer, cause the computer to execute the automated testing method described in the above various possible implementations.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly introduced below.
FIG. 1 is a diagram of a system architecture suitable for use with an embodiment of the present invention;
FIG. 2 is a schematic structural diagram of an automated test system according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a system deployment using jenkins in an embodiment of the present invention;
fig. 4 is a schematic flow chart corresponding to an automated testing method according to another embodiment of the present invention;
fig. 5 is a second schematic flow chart corresponding to the automated testing method according to the embodiment of the present invention;
fig. 6 is a third schematic flow chart corresponding to the automated testing method according to the embodiment of the present invention;
fig. 7 is a fourth flowchart corresponding to the automatic testing method according to the embodiment of the present invention.
Detailed Description
The present application will be described in detail below with reference to the accompanying drawings, and the specific operation methods in the method embodiments can also be applied to the apparatus embodiments.
Fig. 1 illustrates a schematic diagram of a system architecture to which embodiments of the present invention are applicable. As shown in FIG. 1, a system 100 to which embodiments of the present invention are applicable may include an automated test system 200, a first platform 300, a second platform 400, a plurality of terminals (e.g., terminal 501, terminal 502, terminal 503 shown in FIG. 1), and a registry 600. The automated testing system 200 may be connected to the first platform 300, the second platform 400, and the registry 600 through a network; first platform 300 may also be connected to terminal 401, or may be connected to terminal 502, or may be connected to terminal 503; the second platform 400 may also be connected to the registry 600 via a network.
Further, the first platform 300 may be configured to receive a test instruction input by a user and receive a test report sent by the system, and specifically, the user may log in the first platform 300 through the terminal 501 (or the terminal 502, or the terminal 503) to input the test instruction, and log in the first platform 300 through the terminal 501 (or the terminal 502, or the terminal 503) to view the test report.
The second platform 400 may have a plurality of SDK test services pre-stored therein to facilitate the automated test system 200 to remotely invoke the SDK test services from the second platform 400. In a specific implementation process, the second platform 400 may send an address (e.g., a Uniform Resource Locator (URL) address) corresponding to each SDK test service to the registry 600, and the registry 600 may store each SDK test service and the corresponding address. Thus, when the automatic test system 200 needs to call the SDK test service in the second platform 400, the automatic test system 200 may first obtain the address of the corresponding SDK test service from the registry 600, and then may call the corresponding SDK test service according to the address of the SDK test service.
Based on the system architecture shown in fig. 1, as shown in fig. 2, a schematic structural diagram of an automated testing system according to an embodiment of the present invention is provided. The automated test system 200 may include a control module 201, an SDK test module 202, a UI test module 203, an API test module 204, and a full scene Scenario test module 205.
The control module 201 may be configured to receive a test instruction input by a user and sent by the first platform 300, and start a test module corresponding to the test instruction according to the test instruction input by the user. Further, according to the difference of the test instruction, the following four cases can be classified.
The first situation is as follows: the test instruction is an SDK test instruction.
First, the control module 201 may be configured to receive an SDK test instruction input by a user and sent by the first platform 300, and start the SDK test module 202 configured to execute the SDK test instruction; the SDK testing module 202 may be configured to obtain a first SDK test case corresponding to the SDK testing requirement from a preset database. The SDK testing module may simulate the function-related consumer, and perform an automated test by calling an SDK testing service (i.e., an SDK provider instance) in the second platform.
Specifically, the SDK test instruction may include an SDK test requirement, where the SDK test requirement may refer to a test requirement when the user performs an SDK test. For example, when the user performs the SDK test, the function a needs to be tested, and then the test on the function a can be regarded as the SDK test requirement.
Further, a preset database may store a plurality of SDK test cases, and each SDK test case may correspond to at least one function. As shown in table 1, an example of the correspondence between the SDK test case and the function is shown. Wherein, the SDK test case 1 corresponds to a function A; the SDK test case 2 corresponds to a function B; the SDK test case 3 corresponds to function B and function C.
Table 1: example of correspondence between SDK test cases and functions
SDK test case Function(s)
SDK test case 1 Function A
SDK test case 2 Function B
SDK test case 3 Function B and function C
For example, if the SDK test requirement is to test the function a, according to the content shown in table 1, the first SDK test case that the SDK test module 202 can obtain from the preset database is the SDK test case 1 shown in table 1.
Secondly, considering that the SDK test service corresponding to the SDK test case needs to be used to complete the SDK test, and the SDK test service is pre-stored in the second platform 400, in this embodiment of the present invention, the SDK test module 200 may call the SDK test service corresponding to the first test case from the second platform by using RPC communication to perform the SDK test.
Specifically, after the SDK testing module 202 is started by the control module 201, the second platform 400 may be remotely started, and a specific manner of remotely starting the second platform may adopt an existing starting method based on a handshake protocol, which is not described in detail herein. The second platform 400 may load a plurality of SDK test services stored in advance after being remotely started by the SDK test module 201. Furthermore, after determining the first SDK test case, the SDK test module 202 may invoke the SDK test service corresponding to the first test case from the second platform 400 based on the RPC communication protocol to perform the SDK test, where the specific invoking process is that the second platform 400 sends addresses of the multiple SDK test services to the registration center 600, the registration center 600 stores the multiple SDK test services and the address corresponding to each SDK test service, and after determining the first SDK test case, the SDK test module 202 obtains the address of the SDK test service corresponding to the first SDK test case from the registration center 600, and then may invoke the corresponding SDK test service according to the address to perform the test.
It should be noted that, the second platform 400 may load all SDK test services after being started; or after the test is started, a specific SDK test service may be loaded according to an instruction sent by the SDK test module 200, for example, the second platform 400 may only load the SDK test service corresponding to the first SDK test case, which is not limited specifically.
Finally, after the SDK testing module 202 performs the test, the SDK testing module may be further configured to generate first SDK testing data and send the first SDK testing data to the control module 201; the control module 201 may be further configured to receive the first SDK test data, generate an SDK test report according to the first SDK test data, and send the SDK test report to the first platform 300, so that the first platform 300 displays the SDK test report to the user. Therefore, the user can realize the automatic test from the input of the test instruction to the reception of the test report only by the first platform, and the test platform is convenient and quick and is convenient for the user to operate.
By adopting the automatic testing system, the SDK automatic test based on RPC communication can be realized through the interaction between the SDK testing module in the system and the second platform; furthermore, the system can call the SDK test service from the second platform, in other words, the SDK test case and the corresponding SDK test service are independent from each other, so that the system can realize the rapid capacity expansion of the test case and can greatly improve the maintenance speed.
Case two: the test instruction is a UI test instruction.
First, the control module 201 may be configured to receive a UI test instruction input by a user and sent by the first platform 300, and start the UI test module 203 for executing the UI test instruction; the UI test module 203 may be configured to obtain a first UI test case corresponding to the UI test requirement, and perform a UI test according to the first UI test case. The UI test module 203 can adopt a page object design mode, flexibly configure the web element positioning mode, and realize the automatic test of the web page in sdk configuration, namely when the web element is changed, only configuration attributes need to be modified, UI AUTO codes do not need to be modified, the maintainability of UI AUTO is increased, and therefore the maintenance cost is reduced.
Specifically, the UI test instruction may include a UI test requirement, where the UI test requirement may refer to a test requirement when the user performs a UI test. For example, when a user performs a UI test, the user needs to test the interface a, and then the test on the interface a can be regarded as a UI test requirement.
Further, as shown in table 2, an example of the correspondence between the UI test case and the interface is shown. Wherein, the UI test case 1 corresponds to an interface A; UI test case 2 corresponds to interface B; UI test case 3 corresponds to interface B and interface C. As can be seen from Table 2, each UI test case may correspond to at least one interface.
Table 2: example of correspondence between UI test cases and interfaces
UI test case Interface (I)
UI test case 1 Interface A
UI test case 2 Interface B
UI test case 3 Interface B and interface C
For example, if the UI test requirement is to test the interface a, according to the content shown in table 2, the first UI test case that the UI test module 203 can acquire is the UI test case 1 shown in table 2.
Then, after the UI test module 203 performs the UI test, it may be further configured to generate first UI test data and send the first UI test data to the control module 201; the control module 201 may be further configured to receive the first UI test data, generate a UI test report according to the first UI test data, and send the UI test report to the first platform 300, so that the first platform 300 presents the UI test report to the user.
By adopting the automatic test system, the UI automatic test can be realized through the UI test module in the system.
Case three: the test instruction is an API test instruction.
First, the control module 201 may be configured to receive an API test instruction input by a user and sent by the first platform 300, and start the API test module 204 for executing the API test instruction; the API testing module 204 may be configured to obtain a first API test case corresponding to the API testing requirement, and perform API testing according to the first API test case. The API URL and the specific request parameters can be written into the configuration file, so that the API TEST module 204 can automatically read the relevant information of the configuration file to perform automatic TEST, and the configuration file can be modified without modifying codes when a TEST service address changes or TEST parameters change, thereby realizing the configuration of the request parameters, improving the maintainability of the API AUTOTEST module and realizing the rapid expansion of TEST cases.
Specifically, the API test instruction may include an API test requirement, where the API test requirement may refer to a test requirement when a user performs an API test. For example, when a user performs an API test, it is necessary to test interface a, and then testing interface a can be regarded as an API test requirement.
Further, as shown in table 3, an example of the correspondence between the API test case and the interface is shown. Wherein, the API test case 1 corresponds to an interface A; the API test case 2 corresponds to an interface B; the API test case 3 corresponds to interface B and interface C. As can be seen from Table 3, each API test case may correspond to at least one interface.
Table 3: example of correspondence between API test case and interface
API test case Interface
API test case 1 Interface A
API test case 2 Interface B
API test case 3 Interface B and interface C
For example, if the API test requirement is to test the interface a, it can be known from the content shown in table 3 that the first API test case that the API test module 204 can obtain is the API test case 1 shown in table 3.
Then, after the API test module 204 performs the API test, it may further be configured to generate first API test data and send the first API test data to the control module 201; the control module 201 may be further configured to receive the first API test data, generate an API test report according to the first API test data, and send the API test report to the first platform 300, so that the first platform 300 presents the API test report to a user.
By adopting the automatic test system, the API automatic test can be realized through the API test module in the system.
Case four: the test instruction is a full stack (ALL) test instruction.
In the embodiment of the present invention, the ALL test instruction may refer to a full stack test instruction, that is, the ALL test instruction may be used to instruct to execute a full stack type automation test from WEB page configuration to API access to bottom layer SDK function verification.
Specifically, the control module 201 may be configured to receive an ALL test instruction sent by the first platform 300 and input an ALL test instruction by a user, and start the scanario test module 205 for executing the ALL test instruction; the Scenario testing module 205 may be configured to determine a testing sequence of each testing module according to the ALL testing requirement, and determine whether to start a next testing module according to the testing sequence and the testing data of a previous testing module.
Further, the Scenario testing module 205 may be further configured to receive the test data sent by each testing module, generate ALL test data according to the test data of each testing module, and send the ALL test data to the control platform 201.
Further, the control module 201 is further configured to receive ALL test data, generate an ALL test report according to the ALL test data, and send the ALL test report to the first platform 300, so that the first platform 300 displays the ALL test report to the user.
In the embodiment of the present invention, the ALL test instruction may include a test requirement when the user performs an ALL test, and specifically may include a UI test requirement, an APL test requirement, and an SDK test requirement.
In addition, the ALL test instructions may further include ALL test requirements, wherein the ALL test requirements may include a test order when the user performs ALL tests. For example, the test sequence may be UI test, API test, SDK test; alternatively, the test sequence may be UI test, SDK test, API test. The testing sequence can be determined by the person skilled in the art based on experience and practical situations, and is not limited in particular.
By adopting the automatic test system, the UI test module, the API test module and the SDK test module are respectively started through the Scenario test module in the system, so that the full-stack automatic test from WEB page configuration to API access to SDK function verification can be realized.
The following describes the test sequence of UI test, SDK test, and API test as an example.
If the control module 201 determines that the test instruction is an ALL test instruction, the scorario test module 205 for executing the ALL test instruction is started.
The Scenario testing module 205 starts the UI testing module 203 if the testing sequence is UI testing, API testing, and SDK testing.
The UI test module 203 acquires a second UI test case corresponding to the ALL test requirement, performs UI test according to the second UI test case, and sends second UI test data to the scorario test module 205.
The Scenario testing module 205 receives the second UI testing data sent by the UI testing module 203, and starts the API testing module 204 if it is determined that the UI testing is successful according to the second UI testing data.
The API testing module 204 is configured to obtain a second API test case corresponding to the ALL testing requirement, perform API testing according to the second API test case, and send second API testing data to the scoreio testing module 205;
the Scenario testing module 205 receives the second API testing data sent by the API testing module 204, and starts the SDK testing module 202 if it is determined that the API testing is successful according to the second API testing data.
The SDK testing module 202 obtains a second SDK test case corresponding to the ALL testing requirement, calls an SDK testing service corresponding to the second SDK test case from the second platform 400 based on the RPC communication protocol to perform an SDK test, and sends second SDK testing data to the scoreario testing module 205.
The Scenario testing module 205 receives the second SDK testing data sent by the SDK testing module 202, generates ALL testing data according to the second UI testing data, the second API testing data, and the second SDK testing data, and sends the ALL testing data to the control module 201.
The control module 201 receives ALL test data, generates an ALL test report according to the ALL test data, and sends the ALL test report to the first platform 300, so that the first platform 300 displays the ALL test report to the user.
The automated testing system 200 provided by the embodiment of the invention can realize layered automated testing, namely, independent UI automated testing, independent API automated testing and independent SDK testing on the one hand; on the other hand, the automatic test system 200 opens up the UI layer, the API layer, and the SDK layer, and can implement a full-stack automatic test for determining whether the UI modification configuration and the SDK verification function are valid, thereby implementing a full-stack automatic test from the WEB page configuration to the API access to the SDK function verification.
In an embodiment of the present invention, jenkins may be used as a CI (continuous integration) tool for deployment of the automated test system 200. Fig. 3 is a schematic diagram of system deployment using jenkins in the embodiment of the present invention. In particular, parameters (para) may be passed to the automated test system 200 via parameterized configuration, and the automated test system 200 may determine which particular test module to invoke for automation via test module group management. For example, if the para value is UI, the automatic test system 200 may call a UI test module to perform a UI test, when the UI test is performed, the UI test module may first read the location information of the relevant elements of the relevant page from the configuration file, then may call a packaged method to drive the UI test, when data input is encountered, the UI test module may read parameterized configuration from the configuration file, for example, a web input frame has many test input values to be input and tested, the UI test module may read all test values, and perform verification in a traversal manner, until all test values are verified, then continue to perform the subsequent automatic test case, and after the test is completed, may automatically generate a test report.
Based on the same inventive concept, the embodiment of the invention also provides an automatic test method, which can be applied to the automatic test system. As shown in fig. 4, one of the flow diagrams corresponding to the automated testing method provided in the embodiment of the present invention specifically includes the following steps:
step 401, the control module receives a test instruction sent by the first platform.
Step 402, if the control module determines that the test instruction is an SDK test instruction, the control module starts an SDK test module for executing the SDK test instruction.
Step 403, the SDK testing module obtains a first SDK test case corresponding to the SDK testing requirement.
And step 404, the SDK test module calls the SDK test service corresponding to the first SDK test case from the second platform based on the RPC communication protocol to perform the SDK test.
In step 405, the SDK test module generates first SDK test data.
In step 406, the SDK test module sends the first SDK test data to the control module.
In step 407, the control module receives the first SDK test data.
In step 408, the control module generates an SDK test report according to the first SDK test data.
In step 409, the control module sends an SDK test report to the first platform.
By adopting the automatic testing system, the SDK automatic test based on RPC communication can be realized through the interaction between the SDK testing module in the system and the second platform; furthermore, the system can call the SDK test service from the second platform, in other words, the SDK test case and the corresponding SDK test service are independent from each other, so that the system can realize the rapid capacity expansion of the test case and can greatly improve the maintenance speed.
Based on the same inventive concept, the embodiment of the invention also provides another automatic test method, which can be applied to the automatic test system. As shown in fig. 5, a second flow chart corresponding to the automated testing method provided in the embodiment of the present invention specifically includes the following steps:
step 501, the control module receives a test instruction sent by a first platform.
Step 502, if the control module determines that the test instruction is a UI test instruction, the control module starts a UI test module for executing the UI test instruction.
Step 503, the UI test module obtains a first UI test case corresponding to the UI test requirement.
And 504, the UI test module performs UI test according to the first UI test case.
In step 505, the UI test module generates first UI test data.
At step 506, the UI test module sends the first UI test data to the control module.
In step 507, the control module receives the first UI test data.
In step 508, the control module generates a UI test report according to the first UI test data.
In step 509, the control module sends the UI test report to the first platform.
By adopting the automatic test system, the UI automatic test can be realized through the UI test module in the system.
Based on the same inventive concept, the embodiment of the invention also provides another automatic test method, which can be applied to the automatic test system. As shown in fig. 6, a third flow chart corresponding to the automated testing method provided in the embodiment of the present invention specifically includes the following steps:
step 601, the control module receives a test instruction sent by the first platform.
Step 602, if the control module determines that the test instruction is an API test instruction, the control module starts an API test module for executing the API test instruction.
Step 603, the API testing module obtains a first API test case corresponding to the API testing requirement.
And step 604, the API test module performs API test according to the first API test case.
Step 605, the API test module generates first API test data.
And 606, the API test module sends the first API test data to the control module.
In step 607, the control module receives the first API test data.
Step 608, the control module generates an API test report according to the first API test data.
Step 609, the control module sends the API test report to the first platform.
By adopting the automatic test system, the API automatic test can be realized through the API test module in the system.
Based on the same inventive concept, the embodiment of the invention also provides another automatic test method, which can be applied to the automatic test system. As shown in fig. 7, a fourth flowchart corresponding to the automated testing method provided in the embodiment of the present invention specifically includes the following steps:
in step 701, the control module receives a test instruction sent by the first platform.
Step 702, if the control module determines that the test instruction is a full stack ALL test instruction, the control module starts the scoreario test module for executing the ALL test instruction.
And 703, determining the test sequence of each test module by the Scenario test module according to the ALL test requirement.
Step 704, the Scenario test module determines whether to start the next test module according to the test sequence and the test data of the previous test module.
Step 705, the Scenario test module receives the test data sent by each test module.
Step 706, generating ALL test data by the Scenario test module according to the test data of each test module.
And step 707, the Scenario testing module sends the ALL testing data to the control platform.
At step 708, the control module receives the ALL test data.
And step 709, the control module generates an ALL test report according to the ALL test data.
Step 710, the control module sends the ALL test report to the first platform.
By adopting the automatic test system, the UI test module, the API test module and the SDK test module are respectively started through the Scenario test module in the system, so that the full-stack automatic test from WEB page configuration to API access to SDK function verification can be realized.
It should be noted that, in the above steps 703 to 707, the ALL test instruction may further include an ALL test requirement, where the ALL test requirement may include a test sequence when the user performs an ALL test. For example, the test sequence may be UI test, API test, SDK test; alternatively, the test sequence may be UI test, SDK test, API test. The testing sequence can be determined by the person skilled in the art based on experience and practical situations, and is not limited in particular.
Further, taking the test sequence of UI test, SDK test, and API test as an example, the Scenario test module may start the UI test module first, receive second UI test data sent by the UI test module, and start the API test module if it is determined that the UI test is successful according to the second UI test data; then, second API test data sent by the API test module can be received, and if the API test is determined to be successful according to the second API test data, the SDK test module is started; furthermore, second SDK test data sent by the SDK test module may be received, ALL test data may be generated according to the second UI test data, the second API test data, and the second SDK test data, and the ALL test data may be sent to the control platform.
The embodiment of the present application further provides an apparatus, which has a function of implementing the above-described automated testing method. This function may be implemented by hardware executing corresponding software, and in one possible design, the apparatus includes: a processor, a transceiver, a memory; the memory is used for storing computer execution instructions, the transceiver is used for realizing the communication between the device and other communication entities, the processor and the memory are connected through the bus, and when the device runs, the processor executes the computer execution instructions stored by the memory so as to enable the device to execute the automatic test method described above.
An embodiment of the present invention further provides a computer storage medium, where a software program is stored, and when the software program is read and executed by one or more processors, the software program implements the automated testing method described in the foregoing various possible implementation manners.
Embodiments of the present invention also provide a computer program product containing instructions, which when run on a computer, cause the computer to execute the automated testing method described in the above various possible implementations.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (14)

1. An automated testing system, characterized in that the system comprises a control module and a Software Development Kit (SDK) testing module;
the control module is used for receiving a test instruction sent by a first platform, and if the test instruction is determined to be an SDK test instruction, starting the SDK test module for executing the SDK test instruction;
the SDK testing module is used for obtaining a first SDK testing case corresponding to the SDK testing instruction, obtaining an address of an SDK testing service corresponding to the first SDK testing case from a registration center based on a Remote Procedure Call (RPC) communication protocol, calling the SDK testing service from a second platform according to the address of the SDK testing service to perform an SDK test, wherein the second platform stores a plurality of SDK testing services in advance, and the registration center stores the addresses of the SDK testing services in advance.
2. The system of claim 1, wherein the SDK test module, after performing the SDK test, is further to:
generating first SDK test data and sending the first SDK test data to the control module;
the control module is further configured to:
and receiving the first SDK test data, generating an SDK test report according to the first SDK test data, and sending the SDK test report to the first platform.
3. The system of claim 1, wherein the system further comprises a User Interface (UI) testing module;
the control module is further configured to start the UI test module for executing the UI test instruction if it is determined that the test instruction is a UI test instruction;
the UI test module is used for acquiring a first UI test case corresponding to the UI test instruction, carrying out UI test according to the first UI test case, generating first UI test data and sending the first UI test data to the control module;
the control module is further configured to receive the first UI test data, generate a UI test report according to the first UI test data, and send the UI test report to the first platform.
4. The system of any of claims 1 to 3, wherein the system further comprises an Application Programming Interface (API) test module;
the control module is further configured to start the API testing module for executing the API testing instruction if it is determined that the testing instruction is an API testing instruction;
the API test module is used for acquiring a first API test case corresponding to the API test instruction, carrying out API test according to the first API test case, generating first API test data and sending the first API test data to the control module;
the control module is further configured to receive the first API test data, generate an API test report according to the first API test data, and send the API test report to the first platform.
5. The system of claim 4, further comprising a full scene Scenario test module;
the control module is further configured to start the scoreario test module for executing the ALL test instruction if it is determined that the test instruction is a full stack ALL test instruction; the ALL test instruction is used for indicating to execute the SDK test instruction, the UI test instruction and the API test instruction;
the Scenario test module is used for determining the test sequence of each test module according to the ALL test instruction and determining whether to start the next test module according to the test sequence and the test data of the previous test module;
the Scenario test module is further configured to receive test data sent by each test module, generate ALL test data according to the test data of each test module, and send the ALL test data to the control module;
the control module is further configured to receive the ALL test data, generate an ALL test report according to the ALL test data, and send the ALL test report to the first platform.
6. An automatic test method is applied to an automatic test system, and the system comprises a control module and a Software Development Kit (SDK) test module; the method comprises the following steps:
the control module receives a test instruction sent by a first platform, and if the test instruction is determined to be an SDK test instruction, an SDK test module for executing the SDK test instruction is started;
the SDK testing module obtains a first SDK testing case corresponding to the SDK testing instruction, obtains an address of an SDK testing service corresponding to the first SDK testing case from a registration center based on an RPC communication protocol, calls the SDK testing service from a second platform according to the address of the SDK testing service to perform SDK testing, wherein the second platform stores a plurality of SDK testing services in advance, and the registration center stores the addresses of the SDK testing services in advance.
7. The method of claim 6, wherein after the SDK test module performs an SDK test, the method further comprises:
the SDK testing module generates first SDK testing data and sends the first SDK testing data to the control module;
and the control module receives the first SDK test data, generates an SDK test report according to the first SDK test data, and sends the SDK test report to the first platform.
8. The method of claim 6, wherein the system further comprises a User Interface (UI) test module; the method further comprises the following steps:
if the control module determines that the test instruction is a UI test instruction, starting a UI test module for executing the UI test instruction;
and the UI test module acquires a first UI test case corresponding to the UI test instruction and performs UI test according to the first UI test case.
9. The method of claim 8, wherein after conducting the UI test according to the first UI test case, the method further comprises:
the UI test module generates first UI test data and sends the first UI test data to the control module;
and the control module receives the first UI test data, generates a UI test report according to the first UI test data, and sends the UI test report to the first platform.
10. The method of any of claims 6 to 9, wherein the system further comprises an application programming interface, API, test module; the method further comprises the following steps:
if the control module determines that the test instruction is an API test instruction, starting an API test module for executing the API test instruction;
and the API test module acquires a first API test case corresponding to the API test instruction and performs API test according to the first API test case.
11. The method of claim 10, wherein after conducting API testing in accordance with the first API test case, the method further comprises:
the API test module generates first API test data and sends the first API test data to the control module;
and the control module receives the first API test data, generates an API test report according to the first API test data, and sends the API test report to the first platform.
12. The method of claim 10, wherein the system further comprises a full scene Scenario test module; the method further comprises the following steps:
if the control module determines that the test instruction is a full stack ALL test instruction, starting a Scenario test module for executing the ALL test instruction; the ALL test instruction is used for executing the SDK test instruction, the UI test instruction and the API test instruction;
the Scenario test module determines the test sequence of each test module according to the ALL test instruction, and determines whether to start the next test module according to the test sequence and the test data of the previous test module; receiving the test data sent by each test module, generating ALL test data according to the test data of each test module, and sending the ALL test data to the control module;
the control module receives the ALL test data, generates an ALL test report according to the ALL test data, and sends the ALL test report to the first platform.
13. The method of claim 12, wherein the test order is a UI test, an API test, an SDK test;
the Scenario test module determines whether to start the next test module according to the test sequence and the test data of the previous test module; receiving the test data sent by each test module, generating ALL test data according to the test data of each test module, and sending the ALL test data to the control module, including:
starting a UI test module; receiving second UI test data sent by the UI test module, and starting the API test module if the UI test is determined to be successful according to the second UI test data; receiving second API test data sent by the API test module, and starting the SDK test module if the API test is determined to be successful according to the second API test data; and receiving second SDK test data sent by the SDK test module, generating ALL test data according to the second UI test data, the second API test data and the second SDK test data, and sending the ALL test data to the control module.
14. The method of claim 6, wherein the first platform is configured to receive user-entered test instructions and to receive test reports from the system;
the second platform stores a plurality of SDK test services in advance, and the SDK test services are loaded after the second platform is remotely started by the SDK test module.
CN201811241560.0A 2018-10-24 2018-10-24 Automatic test system and automatic test method Active CN109376088B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811241560.0A CN109376088B (en) 2018-10-24 2018-10-24 Automatic test system and automatic test method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811241560.0A CN109376088B (en) 2018-10-24 2018-10-24 Automatic test system and automatic test method

Publications (2)

Publication Number Publication Date
CN109376088A CN109376088A (en) 2019-02-22
CN109376088B true CN109376088B (en) 2022-07-08

Family

ID=65401089

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811241560.0A Active CN109376088B (en) 2018-10-24 2018-10-24 Automatic test system and automatic test method

Country Status (1)

Country Link
CN (1) CN109376088B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110175117A (en) * 2019-05-06 2019-08-27 珠海全志科技股份有限公司 Test method, system, device, terminal and readable storage medium storing program for executing
CN111694733A (en) * 2020-05-22 2020-09-22 五八有限公司 API (application programming interface) testing method and device for software development kit SDK (software development kit)
US11455237B2 (en) 2020-06-01 2022-09-27 Agora Lab, Inc. Highly scalable system and method for automated SDK testing
CN111651366B (en) * 2020-07-06 2023-08-08 Oppo广东移动通信有限公司 SDK test method, device, equipment and storage medium
CN111858336B (en) * 2020-07-20 2024-03-15 深圳市筑泰防务智能科技有限公司 Automatic software testing method and system
CN112667509B (en) * 2020-12-28 2023-04-07 郑州阿帕斯数云信息科技有限公司 SDK access test method and device
CN113590465B (en) * 2021-06-28 2023-06-06 四川新网银行股份有限公司 Method for automatically generating mock service based on SDK

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101930400B (en) * 2010-08-20 2013-07-31 北京神州泰岳软件股份有限公司 SDK (Software Development Kit) automatic test system and method
US9292416B2 (en) * 2012-10-12 2016-03-22 Vmware, Inc. Software development kit testing
CN104954453B (en) * 2015-06-02 2019-01-22 浙江工业大学 Data mining REST service platform based on cloud computing
CN106951361A (en) * 2016-01-06 2017-07-14 联发科技(新加坡)私人有限公司 SDK method of testing and its device, test system
CN108334441A (en) * 2017-01-19 2018-07-27 深圳市优朋普乐传媒发展有限公司 A kind of automated testing method and system of Software Development Kit
CN107423211B (en) * 2017-03-15 2020-03-13 中国互联网络信息中心 SDNS interface automatic test system and method
CN107357728A (en) * 2017-07-07 2017-11-17 广东中星电子有限公司 The method and electronic equipment of test software
CN108052451A (en) * 2017-12-26 2018-05-18 网易(杭州)网络有限公司 Test method, system, test server, test terminal and storage medium

Also Published As

Publication number Publication date
CN109376088A (en) 2019-02-22

Similar Documents

Publication Publication Date Title
CN109376088B (en) Automatic test system and automatic test method
CN107329861B (en) Multi-interface testing method and device
CN108345531B (en) Test method, device and system
CN111159049B (en) Automatic interface testing method and system
CN105302722B (en) CTS automatic testing method and device
CN107104923B (en) Account binding and service processing method and device
CN107807841B (en) Server simulation method, device, equipment and readable storage medium
CN107015902B (en) Test method and test equipment
CN110543428B (en) Application system testing method and device
CN103701867A (en) Method, system and central server for processing call requests
CN108023905B (en) Internet of things application system and method
CN109656791B (en) gPC performance test method and device based on Jmeter
CN111625443A (en) Pressure testing method, device, equipment and storage medium
CN107025126B (en) Resource scheduling method, NFVO and system
CN111158995B (en) Method and system for realizing cross-system log tracking query based on skywalk and ELK platform
CN112905460A (en) Device and method for simulating three-party receipt by automatic interface test
CN111966556A (en) Performance pressure measurement method and device, server and computer readable storage medium
CN109542775B (en) Test script generation and execution method and device
CN111107100B (en) Equipment for transmitting industrial protocol flow message
CN113934552A (en) Method and device for determining function code, storage medium and electronic device
CN110399161B (en) Mapping relation generation method, calling method and device
CN112073462A (en) Positioning method and device
CN112988582A (en) Application program testing method and device and storage medium
CN116483720A (en) Method and device for issuing test program, storage medium and electronic equipment
CN118051387A (en) Automatic generation method of interface test script, interface test method and device

Legal Events

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