CN113553257B - Test method, device, storage medium and electronic equipment - Google Patents

Test method, device, storage medium and electronic equipment Download PDF

Info

Publication number
CN113553257B
CN113553257B CN202110796007.9A CN202110796007A CN113553257B CN 113553257 B CN113553257 B CN 113553257B CN 202110796007 A CN202110796007 A CN 202110796007A CN 113553257 B CN113553257 B CN 113553257B
Authority
CN
China
Prior art keywords
test
test script
script
automatic
function
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
CN202110796007.9A
Other languages
Chinese (zh)
Other versions
CN113553257A (en
Inventor
杨锋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing 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 CN202110796007.9A priority Critical patent/CN113553257B/en
Publication of CN113553257A publication Critical patent/CN113553257A/en
Application granted granted Critical
Publication of CN113553257B publication Critical patent/CN113553257B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/3684Test management for test design, e.g. generating new test cases
    • 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/3696Methods or tools to render software testable

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 disclosure relates to a testing method, a testing device, a storage medium and electronic equipment, so as to realize synchronous testing under a cross-platform multi-equipment scene and improve testing efficiency. The method comprises the following steps: acquiring test cases written on the basis of unified standard interfaces of a plurality of test script ends; sending a starting command to a server, wherein the starting command is used for indicating the server to start automatic test scripts preset by the plurality of test script ends and network services associated with the automatic test scripts; and sending the test cases to the plurality of test script ends through the network service, so that each test script end calls a target test function in a corresponding automatic test script based on the identification parameter and the function name, and executes the target test function based on the execution parameter.

Description

Test method, device, storage medium and electronic equipment
Technical Field
The disclosure relates to the technical field of automatic testing, and in particular relates to a testing method, a testing device, a storage medium and electronic equipment.
Background
The UI (User Interface) test is used for testing whether the layout of the functional modules in the User Interface is reasonable, whether the overall styles are consistent, whether the responses of the controls are correct, and the like. In the related art, UI automation test generally supports only a single application scenario, and thus needs to be tested one by one for application programs running on different test devices. Specifically, corresponding test cases are written for different test devices, and then the application programs running on the different test devices are tested one by one through the test cases, so that more manpower and time are required, and the high-efficiency test requirements under the multi-device scene cannot be met.
Disclosure of Invention
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
In a first aspect, the present disclosure provides a test method comprising:
Acquiring test cases written on the basis of unified standard interfaces of a plurality of test script ends, wherein each test script end in the plurality of test script ends is preset with an automatic test script aiming at a specified platform, different test script ends correspond to different specified platforms, each automatic test script is used for controlling test equipment corresponding to the specified platform to perform test operation, and the test cases comprise identification parameters of contents to be tested, function names of test functions to be executed in the automatic test script and execution parameters required by the test functions;
Sending a starting command to a server, wherein the starting command is used for indicating the server to start automatic test scripts preset by a plurality of test script ends and network services associated with the automatic test scripts, and the network services are used for controlling the communication between the test script ends and a test control end;
And sending the test cases to the plurality of test script ends through the network service, so that each test script end calls a target test function in a corresponding automatic test script based on the identification parameter and the function name, and executes the target test function based on the execution parameter.
In a second aspect, the present disclosure provides a test apparatus, the apparatus comprising:
The system comprises an acquisition module, a test script and a test module, wherein the acquisition module is used for acquiring test cases written based on unified standard interfaces of a plurality of test script ends, each test script end in the plurality of test script ends is preset with an automatic test script aiming at a specified platform, different test script ends correspond to different specified platforms, each automatic test script is used for controlling test equipment corresponding to the specified platform to perform test operation, and the test cases comprise identification parameters of contents to be tested, function names of test functions to be executed in the automatic test script and execution parameters required by the test functions;
The starting module is used for sending a starting command to the server, the starting command is used for instructing the server to start the automatic test scripts preset by the plurality of test script ends and the network service associated with the automatic test scripts, and the network service is used for controlling the communication between the test script ends and the test control ends;
And the test module is used for sending the test cases to the plurality of test script ends through the network service, so that each test script end calls a target test function in a corresponding automatic test script based on the identification parameter and the function name, and executes the target test function based on the execution parameter.
In a third aspect, the present disclosure provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processing device, implements the steps of the method of the first aspect.
In a fourth aspect, the present disclosure provides an electronic device comprising:
A storage device having a computer program stored thereon;
Processing means for executing said computer program in said storage means to carry out the steps of the method of the first aspect.
Through the technical scheme, the test control terminal can acquire the test cases written based on the unified standard interfaces of the plurality of test script terminals, and each test script terminal is preset with the automatic test script aiming at the appointed platform, so that after the test cases are sent to the plurality of test script terminals, each test script terminal can call the target test function in the corresponding automatic test script based on the test cases so as to control the test equipment of different platforms to execute the test operation. Therefore, under the cross-platform multi-device test scene, corresponding test cases do not need to be written for each device, unified test cases can be transmitted, and therefore labor and time consumed under the multi-device test scene can be reduced, and the test efficiency is improved. And a network service associated with the automatic test script can be arranged between the test control terminal and the test script terminal, so that the communication between the test control terminal and the automatic test script can be ensured through the network service, and the problem of cross-platform calling of the test case is solved.
Additional features and advantages of the present disclosure will be set forth in the detailed description which follows.
Drawings
The above and other features, advantages, and aspects of embodiments of the present disclosure will become more apparent by reference to the following detailed description when taken in conjunction with the accompanying drawings. The same or similar reference numbers will be used throughout the drawings to refer to the same or like elements. It should be understood that the figures are schematic and that elements and components are not necessarily drawn to scale. In the drawings:
FIG. 1 is a flow chart of a test method according to an exemplary embodiment of the present disclosure;
FIG. 2 is a process schematic diagram of one test method shown in accordance with an exemplary embodiment of the present disclosure;
FIG. 3 is a block diagram of a test apparatus according to an exemplary embodiment of the present disclosure;
fig. 4 is a block diagram of an electronic device, according to an exemplary embodiment of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure have been shown in the accompanying drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustration purposes only and are not intended to limit the scope of the present disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order and/or performed in parallel. Furthermore, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "including" and variations thereof as used herein are intended to be open-ended, i.e., including, but not limited to. The term "based on" is based at least in part on. The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments. Related definitions of other terms will be given in the description below.
It should be noted that the terms "first," "second," and the like in this disclosure are merely used to distinguish between different devices, modules, or units and are not used to define an order or interdependence of functions performed by the devices, modules, or units. It is further noted that references to "one" or "a plurality" in this disclosure are intended to be illustrative rather than limiting, and those of ordinary skill in the art will appreciate that "one or more" is intended to be understood as "one or more" unless the context clearly indicates otherwise.
The names of messages or information interacted between the various devices in the embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
In the related art, UI automation test generally supports only a single application scenario, and thus needs to be tested one by one for applications running on different platforms. Specifically, corresponding test cases are written for different platforms, and then the application programs running on the different platforms are tested one by one through the test cases, so that more manpower and time are required, and the high-efficiency test requirements under the cross-platform and multi-equipment scenes cannot be met. For example, in an educational live scenario, the electronic devices used between different roles of students and teachers may differ, and the platforms on which the electronic devices operate may also differ, such as may include windows, android, and iOS platforms. Under such a scenario, more than 90% of test cases need to be completed in cooperation with a plurality of electronic devices running on different platforms, so the UI automation test framework for a single device is far from meeting the requirements.
In view of this, the embodiments of the present disclosure provide a testing method, apparatus, storage medium, and electronic device, so as to implement automatic testing of UI in a cross-platform and multi-device scenario, and improve testing efficiency.
Fig. 1 is a flow chart illustrating a test method according to an exemplary embodiment of the present disclosure. Referring to fig. 1, the test method includes:
step 101, obtaining test cases written based on unified standard interfaces of a plurality of test script ends. Each test script end of the plurality of test script ends is preset with an automatic test script aiming at a specified platform, different test script ends correspond to different specified platforms, each automatic test script is used for controlling test equipment corresponding to the specified platform to perform test operation, and a test case comprises identification parameters of contents to be tested, function names of test functions to be executed in the automatic test script and execution parameters required by the test functions;
And 102, sending a starting command to the server, wherein the starting command is used for instructing the server to start a plurality of automatic test scripts preset by the test script end and network services associated with the automatic test scripts. The network service is used for controlling the communication between the test script end and the test control end;
and step 103, sending test cases to a plurality of test script terminals through network service, so that each test script terminal calls a target test function in the corresponding automatic test script based on the identification parameter and the function name, and executing the target test function based on the execution parameter.
Through the technical scheme, the test control terminal can acquire the test cases written based on the unified standard interfaces of the plurality of test script terminals, and each test script terminal is preset with the automatic test script aiming at the appointed platform, so that after the test cases are sent to the plurality of test script terminals, each test script terminal can call the target test function in the corresponding automatic test script based on the test cases so as to control the test equipment corresponding to different test platforms to execute the test operation. Therefore, under the cross-platform multi-device test scene, corresponding test cases do not need to be written for each device, unified test cases can be transmitted, and accordingly labor and time consumed under the multi-device test scene can be reduced, and test efficiency is improved. And a network service associated with the automatic test script can be arranged between the test control terminal and the test script terminal, so that the communication between the test control terminal and the automatic test script can be ensured through the network service, and the problem of cross-platform calling of the test case is solved.
In order to make those skilled in the art more aware of the test methods provided by the present disclosure, the following details of the above steps are exemplified.
It should be understood at first that the test devices of different platforms refer to different operating systems that the test devices run, so that automatic test scripts preset by multiple test script ends can be set for the operating systems of the test devices to realize targeted test operation on the test devices. In addition, in order to synchronously test a plurality of test devices of different platforms, the test efficiency is improved, the plurality of test script ends can externally package a unified interface, and the unified interface abstracts automation capability set for realizing the same function on different test script ends so as to shield the difference realized on automatic test scripts preset by the different test script ends for the same function, thereby calling the unified interface through the same test case, and each test script end can call a target test function in the corresponding automatic test script based on the incoming test case, thereby controlling the corresponding test device to execute test operation.
For example, for login testing of the same application running on a plurality of test devices, the login interface patterns are different because the operating systems run on the plurality of test devices are different. According to the method provided by the disclosure, firstly, a logic function can be defined in an automatic test script preset by a plurality of test script ends, the parameters comprise a Login parameter Account for representing a Login Account and a verification parameter Code for representing a Login verification Code, and a return value can be set to be a Boolean type and used for indicating Login success or Login failure. The implementation logic of the login automation operation on each test device is different due to different UI interactions, different automation frames and the like, but the function name and parameter return value definition of the login function can be set uniformly, and the login interface can be named as login_page uniformly.
In this case, a Login test case is written according to unified standard interfaces of multiple test script ends, where the Login test case may include an identification parameter logic_page of the content to be tested, a function name logic of a test function to be executed in the automatic test script, and execution parameters account and code required by the test function. Then, all test functions corresponding to the page to be tested can be determined in the automatic test script corresponding to each test device according to the identification parameter logic_page, and then the target test function can be determined in all test functions corresponding to the page to be tested according to the function name logic. Finally, the Login function may be executed based on the execution parameters account and code. Therefore, after the test control terminal sends the test cases written according to the unified standard interface to the test script, the test script terminal can call the corresponding functions in the corresponding automatic test script to execute the test operation, so that synchronous test of a plurality of devices is realized, the manpower and time consumed in the test process are reduced, and the test efficiency is improved.
In a possible manner, a set of test cases written based on a unified specification interface of a plurality of test script ends may be obtained, where the set of test cases includes a plurality of sets of test cases for performing different test operations, each set of test cases having a sequence identification that specifies an execution sequence of the test operations. Accordingly, the test case set can be sent to a plurality of test script ends through the network service, so that each test script end can call a plurality of test functions in the corresponding automatic test script based on a plurality of identification parameters and a plurality of function names in the test case set, and the plurality of test functions are sequentially executed based on the sequence identification, so that the corresponding test equipment is controlled to execute a plurality of test operations.
It should be understood that, in the related art, an automation framework corresponding to each platform is generally used for an automation test case for different platforms, and automation UI operations are directly combined into one automation test case in the test case. Because the automatic test case is determined aiming at the platform, the automatic test case can only complete the automatic operation of serial definition in the automatic test case on a single device corresponding to the platform, and can not meet the test requirements under a cross-platform multi-device scene.
In the embodiment of the disclosure, a test case set including a plurality of groups of test cases can be obtained, and then after the test case set is sent to a plurality of test script ends through network service, each test script end can call a plurality of test functions in a corresponding automatic test script based on a plurality of identification parameters and a plurality of function names in the test case set, and sequentially execute the plurality of test functions based on a sequence identification corresponding to each test case in the test case set, so that corresponding test equipment can be controlled to serially execute a plurality of test operations, namely, the test equipment can be controlled to execute a series of self-defined automatic operations, the labor and time consumed in the test process are reduced, and the test efficiency is improved.
By way of example, multiple groups of test cases in the test case set can be transmitted into the test trigger functions of the corresponding test page types through the form of the function blocks, so that a user can randomly combine UI operation interfaces in the function blocks, under the condition that the test logic is changed, the UI operation interface combination in the function blocks can be changed, a test script does not need to be rewritten, and further, the labor and time consumed in the test process can be reduced, and the test efficiency is improved.
In a possible manner, the test case may correspond to a concurrent extension function, where the concurrent extension function is used to multithread control the multiple test script ends to call the corresponding test function in the corresponding automatic test script.
It should be understood that, in an automated test under a cross-platform multi-device scenario, it is often required to perform operations of the same scenario on multiple devices at the same time, for example, education live broadcast scenario, and it is required to operate operations of entering a classroom for class at the same time on all student terminals of different platforms, etc. In order to adapt to the problems of automation execution efficiency and convenience in the scene, the automatic test case in the scene can be further optimized.
For example, a concurrent extension function may be set for the test case, so that concurrent test operations on the plurality of test devices are implemented through the concurrent extension function. The concurrent extension function can be used for controlling the multiple test script ends to call the corresponding test functions in the corresponding automatic test scripts through multiple threads, so that the multiple threads can be started to call the multiple test functions in a concurrent mode based on the concurrent extension function, and the corresponding test equipment is controlled to execute multiple test operations in a concurrent mode.
It should be understood that the concurrent extension function may take the form of template function plus model to implement code multiplexing, further reducing the manpower and time consumed in the testing process, and thus improving the testing efficiency.
In a possible manner, the test case can be converted into parameters required by each automatic test script based on a single interface parameter rule predefined between the test control terminal and the plurality of test script terminals, so as to obtain the target test case. Accordingly, the target test cases can be sent to the corresponding test script end through the network service associated with each automatic test script.
In the embodiment of the disclosure, in order to realize cross-platform multi-device testing, test cases are written according to unified standard interfaces of a plurality of test script ends. However, in practical applications, the specific data form and/or the specific number of parameters of the test cases required by the automatic test script preset in each test script end may be different. Therefore, in order for the test script end to execute the automatic test more efficiently based on the test cases and the automatic test scripts, the test cases may be converted into parameters required by each automatic test script based on a single interface parameter rule predefined between the test control end and the plurality of test script ends, so as to obtain the target test cases.
For example, a single interface parameter rule is set for parameters required by the automatic test script in each test script end, so that the test cases are converted based on the single interface rule to obtain target test cases, and the target test cases can be in one-to-one correspondence with each automatic test script. And then, the target test cases can be sent to the corresponding test script end through the network service associated with each automatic test script, so that the test script end can quickly realize automatic test according to the target test cases and the automatic test scripts which are matched with each other, and the automatic test efficiency is improved.
In a possible manner, the identification information and the network connection information of the test device can also be registered to the device status server for each test device by means of the corresponding automatic test script. Accordingly, the target test equipment in the connection state can be determined through the equipment state server, the target automatic test script for controlling the target test equipment to perform test operation is determined, and then the test case is sent to the test script end preset with the target automatic test script through the network service.
For example, after the test cases are acquired, a corresponding number of test devices and corresponding network services may be activated. For example, a start command may be sent to the chassis server, and after the chassis server receives the command, the chassis server may start a plurality of Docker services, where each Docker service may start an automatic test script preset at a test script end and a network service associated with the automatic test script. The automatic test script is aimed at the automatic test scripts of different platforms, so that the automatic test script can automatically acquire a test device corresponding to an operating system and keep control over the test device. The network service is started and the identification information and the network connection information of the test equipment are registered to the equipment state server through the test equipment, for example, the equipment ID and the IP address of the test equipment are registered to the equipment state server.
After that, the state of the test equipment can be confirmed, and the preparation before the test is completed. For example, this phase may determine whether a test device registered in the device state server is online, and may be deleted from the device state server for test devices registered but not online. And for the online test equipment, namely the target test equipment in the connection state is determined, the target automatic test script for controlling the target test equipment to perform the test operation can be further determined, and then the test cases are sent to a plurality of test script ends through the network service. In addition, before the test case is sent, the front-end operation of starting the application program to be tested, the login account and the like can be performed aiming at the target test equipment, so that after the test case is received, automatic test can be directly executed based on the test case, and the test efficiency is improved.
In a possible manner, the sending of the test case to the test script end through the network service may also be: firstly, determining a pre-packaged page base class, wherein the page base class comprises a test trigger function, the entry of the test trigger function comprises a first entry for representing identification information of a to-be-tested page, a second entry for representing identification information of the to-be-tested function and a third entry for representing execution parameters required by the to-be-tested function, then determining a test page class inherited from the page base class aiming at the to-be-tested page, taking the identification parameters, the function name and the execution parameters as entries, calling the test trigger function of the test page class, and finally sending test cases to a test script terminal through the test trigger function and network service.
The page base class may be obtained, in a possible way, by: under the condition that the test script end and the test control end carry out socket communication, each automatic test script in the test script end is used as a socket server end to be packaged, a socket entity class is obtained, and abstract packaging is carried out on the common attribute of the socket entity class based on a page object model, so that a page base class is obtained.
It should be appreciated that the embodiments of the present disclosure need to define UI automation testing in a multi-device interaction scenario, so that each test script end may be a Server instead of a Client. Therefore, after each test script end starts an automatic test script and controls the test equipment through the automatic test script, the test script end can be used as a Server to wait for communication messages transmitted by the test control end, such as transmitted test cases and the like, so that synchronous automatic test of a plurality of test equipment is realized.
For example, the test control end and the test script end may perform Socket communication, in which case each automatic test script in the test script end may be packaged as a Socket server end to obtain a Socket entity class. Taking a multi-device interaction scene under an educational live scene as an example, studentSocket types can be packaged and realized, and an automatic test script aiming at different operating systems can be associated with one physical device under the operating systems, for example, a windows student end, an iOS student end or an android student end, and each automatic test script can be simultaneously associated with one SocketServer during running. In the embodiment of the present disclosure, each SocketServer may be abstracted at the test control end into a Socket entity class that needs to be communicated, that is, each automatic test script in the test script end is packaged as a Socket server end, so as to obtain a Socket entity class.
Illustratively, the Socket entity class mainly needs to define variables shown in table 1. It should be understood that the variables shown in table 1 are common variables required in the socket communication process, and will not be described here in detail:
TABLE 1
Variable name Type(s) Meaning of
name String Marking the identity of a test device
ip String Ip address of automatic test script Server
port String Port of automatic test script Server end
socket Socket type Socket connection object between test control terminal and automatic test script Server terminal
inputStream InputStream Input stream corresponding to variable socket for reading in communication process
outputStream OutputStream Output flow corresponding to variable socket for reading in communication process
In order to realize synchronous testing of multiple testing devices, the embodiments of the present disclosure may encapsulate the interfaces shown in table 2 in a Socket entity class, in addition to the variables shown in table 1.
TABLE 2
Through the abstract Socket entity class, based on the page object model, a page base class BasePage layer can be encapsulated and abstracted, basePge layer is used as a base class of each page in the page object model to hold a Socket entity class object, and an Invoke method and a screenShot method are provided. For example, the variable definition of the page base class may be as shown in Table 3 and the method definition of the page base class may be as shown in Table 4.
TABLE 3 Table 3
TABLE 4 Table 4
For example, referring to table 4, the corresponding UI operation interface function encapsulated by the test script end may be remotely invoked by an invoke command, so that the same automation operation with the cross-platform invocation function may be implemented by the normalization of the interface consistency. In addition, it should be understood that the params parameter and the function return value are designed to be of any type, so that the expansibility and usability of the interface can be improved.
For example, in the above-mentioned logging test, a log operation page may be defined at the test script end and inherited from the packaged page base class BasePage, the parameters are account and code, and the log operation page is consistent with the log interface definition of each test script end, and the return values are also consistent, so that the invoke function (i.e. the test trigger function) of the test page class may be called, and the incoming parameter mehod is log, and the parameters are a list formed by combining account and code, and the timeout time of the operation. Therefore, after the test case is sent to the test script end through the invoke function, each test script end can call a corresponding login function in a corresponding automatic test script according to the test case to carry out login test. For example, the test script end may preset a corresponding test processing function, and the test case transmitted by the test control end may be used as an entry in the function, routed to a corresponding page to be tested, and reflected to call a test function packaged in the corresponding automatic test script. And then the result of the reflection calling, namely the test result, can be returned to the test control end.
For example, referring to table 4, the page base class may further include a test result function screen, where the test result function is used by the test script end to perform a screenshot operation on the test device after the test device performs the test operation. Correspondingly, after determining the test page class inherited from the page base class, the self-defined screenshot parameter can be obtained, the self-defined screenshot parameter is used as an entry, a test result function of the test page class is called to instruct the test script end to perform screenshot operation on the test equipment after the test equipment executes the test operation, a target screenshot for representing the test result is obtained, and then the test control end can receive the target screenshot sent by the test script end through the network service. Therefore, the test results can be subjected to screenshot and returned to the test control end, so that the test control end can integrate the test results of a plurality of test devices, and can uniformly display the test results, and a user can check the test results of the plurality of test devices conveniently.
According to the method, based on the pre-packaged page base class, the content to be tested corresponding to each test device can be abstractly packaged into different test page classes, so that the test case is sent to the test script end by calling the test trigger function of the test page class. The test page class inherits from the page base class, and each test script end is provided with a unified interface aiming at the parameters corresponding to the page base class, so that each test script end can be uniformly scheduled to control the test equipment to test through the test trigger function of the test page class, synchronous test under a multi-equipment scene is realized, and the test efficiency is improved.
The test method provided by the present disclosure is described below by way of another exemplary embodiment.
Referring to fig. 2, first, test cases are written based on a unified specification interface of a plurality of test script ends. Taking an educational live broadcast scene as an example, a teacher and a student use different application programs, each application program runs under different platforms and has different realization logics, but page display and control operation in the same application program are unified. In this case, two test page classes of the teacher side and the student side may be packaged, and a plurality of test sub-pages and test operations may be packaged under each test page class. In the writing process of the test cases, the test case set can be obtained only by designating the execution flow of each test operation under different test page types.
After the test case set is acquired, the slave machine may be activated, thereby activating a corresponding number of test devices and a corresponding network service. Specific procedures may be referred to above, and will not be described here again. After that, the test equipment can be initialized, namely, the state of the test equipment can be confirmed, and the preparation before the test is finished. Specific procedures may be referred to above, and will not be described here again.
Then, an interface guarantee mechanism can be set for the test cases, a retry mechanism is added for the test cases returned as false errors, and the functions of abnormal receiving, abnormal screenshot functions and the like of each test device are packaged for problem investigation. In addition, the parameters included in the test case set can be converted into parameters required by each automatic test script based on a single interface parameter rule predefined between the test control end and the plurality of test script ends, so that a target test case set is obtained.
Finally, a target test case set may be issued. For example, the network layer of the test control end may issue the target test case set to the network layer of each test script end. After the network layer of each test script end receives the target test case set, the network layer controls the corresponding automatic test script to execute and call the corresponding target test function, and further controls the corresponding test equipment to execute the test operation corresponding to the target test function. After the test operation is completed, the return field, the exception, the screenshot information and the like can be returned to the test control end. It should be understood that in the embodiment of the present disclosure, the test script end is used as the communication Server end during the test execution process, and the test script end is used as the communication Client end during the device state registration and the test result feedback process.
Through the mode, the test control terminal can acquire the test cases written according to the unified interface, and then the corresponding test functions in the corresponding automatic test scripts are called through the same test cases, so that synchronous test under a multi-equipment scene can be realized, and the test efficiency is improved.
Based on the same inventive concept, the present disclosure also provides a testing device, which may be part or all of an electronic apparatus by means of software, hardware, or a combination of both. Referring to fig. 3, the test apparatus 300 includes:
The obtaining module 301 is configured to obtain test cases written based on unified standard interfaces of multiple test script ends, where each test script end in the multiple test script ends is preset with an automatic test script for a specified platform, and different test script ends correspond to different specified platforms, and each automatic test script is configured to control test equipment corresponding to the specified platform to perform a test operation, and the test cases include identification parameters of content to be tested, function names of test functions to be executed in the automatic test script, and execution parameters required by the test functions;
The starting module 302 is configured to send a starting command to a server, where the starting command is used to instruct the server to start automatic test scripts preset by the multiple test script ends and network services associated with the automatic test scripts, and the network services are used to control communication between the test script ends and a test control end;
And the test module 303 is configured to send the test cases to the plurality of test script ends through the network service, so that each test script end invokes a target test function in a corresponding automatic test script based on the identification parameter and the function name, and execute the target test function based on the execution parameter.
Optionally, the apparatus 300 further includes:
the conversion module is used for converting parameters included in the test cases into parameters required by each automatic test script based on a single interface parameter rule predefined between the test control end and the plurality of test script ends to obtain target test cases;
the test module 303 is configured to:
and sending the target test cases to the corresponding test script end through the network service associated with each automatic test script.
Optionally, the apparatus 300 further includes:
The registration module is used for registering the identification information and the network connection information of the test equipment to the equipment state server through the corresponding automatic test script for each test equipment;
the test module 303 is configured to:
Determining target test equipment in a connection state through the equipment state server, and determining a target automatic test script for controlling the target test equipment to perform test operation;
And sending the test case to a test script end preset with the target automatic test script through the network service.
Optionally, the acquiring module 301 is configured to:
Acquiring a test case set written on the basis of unified standard interfaces of a plurality of test script ends, wherein the test case set comprises a plurality of groups of test cases for executing different test operations, each group of test cases has a sequence identifier, and the sequence identifier is used for designating the execution sequence of the test operations;
the test module 303 is configured to:
and sending the test case sets to the plurality of test script ends through the network service, so that each test script end calls a plurality of test functions in the corresponding automatic test script based on a plurality of identification parameters and a plurality of function names in the test case sets, and sequentially executes the plurality of test functions based on the sequence identifications to control the corresponding test equipment to execute a plurality of test operations.
Optionally, the test case corresponds to a concurrent extension function, and the concurrent extension function is used for controlling the multiple test script ends to call the corresponding test function in the corresponding automatic test script in a multithreading manner.
Optionally, the test module 303 is configured to:
Determining a pre-packaged page base class, wherein the page base class comprises a test trigger function, and the parameters of the test trigger function comprise a first parameter used for representing identification information of a page to be tested, a second parameter used for representing identification information of the test function to be executed and a third parameter used for representing execution parameters required by the test function to be executed;
Determining a test page class inherited from the page base class aiming at the page to be tested, taking the identification parameter, the function name and the execution parameter as input parameters, and calling a test trigger function of the test page class;
and sending the test cases to the plurality of test script ends through the test trigger function and the network service.
Optionally, the apparatus 300 further includes:
And the packaging module is used for packaging each automatic test script in the test script end as a socket server end under the condition that the test script end and the test control end carry out socket communication to obtain a socket entity class, and carrying out abstract packaging on the common attribute of the socket entity class based on a page object model to obtain the page base class.
The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.
Based on the same inventive concept, the embodiments of the present disclosure also provide a non-transitory computer-readable storage medium having stored thereon a computer program which, when executed by a processing device, implements the steps of any of the above-described test methods.
Based on the same inventive concept, the embodiments of the present disclosure further provide an electronic device, including:
A storage device having a computer program stored thereon;
Processing means for executing said computer program in said storage means to implement the steps of any of the test methods described above.
Referring now to fig. 4, a schematic diagram of an electronic device 400 suitable for use in implementing embodiments of the present disclosure is shown. The terminal devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and the like, and stationary terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 4 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
As shown in fig. 4, the electronic device 400 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 401, which may perform various suitable actions and processes according to a program stored in a Read Only Memory (ROM) 402 or a program loaded from a storage means 408 into a Random Access Memory (RAM) 403. In the RAM 403, various programs and data necessary for the operation of the electronic device 400 are also stored. The processing device 401, the ROM 402, and the RAM 403 are connected to each other by a bus 404. An input/output (I/O) interface 405 is also connected to bus 404.
In general, the following devices may be connected to the I/O interface 405: input devices 406 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 407 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 408 including, for example, magnetic tape, hard disk, etc.; and a communication device 409. The communication means 409 may allow the electronic device 400 to communicate with other devices wirelessly or by wire to exchange data. While fig. 4 shows an electronic device 400 having various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead.
In particular, according to embodiments of the present disclosure, the processes described above with reference to 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 non-transitory computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via communications device 409, or from storage 408, or from ROM 402. The above-described functions defined in the methods of the embodiments of the present disclosure are performed when the computer program is executed by the processing device 401.
It should be noted that the computer readable medium described in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any 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 context of this 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 the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. 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, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
In some embodiments, communications may be made using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol ), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the internet (e.g., the internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed networks.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: acquiring test cases written on the basis of unified standard interfaces of a plurality of test script ends, wherein each test script end in the plurality of test script ends is preset with an automatic test script aiming at a specified platform, different test script ends correspond to different specified platforms, each automatic test script is used for controlling test equipment corresponding to the specified platform to perform test operation, and the test cases comprise identification parameters of contents to be tested, function names of test functions to be executed in the automatic test script and execution parameters required by the test functions; sending a starting command to a server, wherein the starting command is used for instructing the server to start automatic test scripts preset by a plurality of test script ends and network services associated with the automatic test scripts, and the network layer is used for controlling the communication between the test script ends and a test control end; and sending the test cases to the network services of the plurality of test script ends, so that each test script end calls a target test function in the corresponding automatic test script based on the identification parameter and the function name, and executes the target test function based on the execution parameter.
Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including, but not limited to, 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 kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts 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 modules described in the embodiments of the present disclosure may be implemented in software or hardware. The name of a module does not in some cases define the module itself.
The functions described above herein 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: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a Complex Programmable Logic Device (CPLD), 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. The 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 accordance with one or more embodiments of the present disclosure, example 1 provides a test method comprising:
Acquiring test cases written on the basis of unified standard interfaces of a plurality of test script ends, wherein each test script end in the plurality of test script ends is preset with an automatic test script aiming at a specified platform, different test script ends correspond to different specified platforms, each automatic test script is used for controlling test equipment corresponding to the specified platform to perform test operation, and the test cases comprise identification parameters of contents to be tested, function names of test functions to be executed in the automatic test script and execution parameters required by the test functions;
Sending a starting command to a server, wherein the starting command is used for indicating the server to start automatic test scripts preset by a plurality of test script ends and network services associated with the automatic test scripts, and the network services are used for controlling the communication between the test script ends and a test control end;
And sending the test cases to the plurality of test script ends through the network service, so that each test script end calls a target test function in a corresponding automatic test script based on the identification parameter and the function name, and executes the target test function based on the execution parameter.
In accordance with one or more embodiments of the present disclosure, example 2 provides the method of example 1, the method further comprising:
Converting parameters included in the test case into parameters required by each automatic test script based on a single interface parameter rule predefined between the test control terminal and the plurality of test script terminals to obtain a target test case;
The sending, by the network service, the test case to a network layer of the plurality of test script ends includes:
and sending the target test cases to the corresponding test script end through the network service associated with each automatic test script.
In accordance with one or more embodiments of the present disclosure, example 3 provides the method of example 1, the method further comprising:
Registering identification information and network connection information of the test equipment to an equipment state server through the corresponding automatic test script for each test equipment;
The sending, by the network service, the test case to a network layer of the plurality of test script ends includes:
Determining target test equipment in a connection state through the equipment state server, and determining a target automatic test script for controlling the target test equipment to perform test operation;
And sending the test case to a test script end preset with the target automatic test script through the network service.
In accordance with one or more embodiments of the present disclosure, example 4 provides the method of any one of examples 1 to 3, the obtaining test cases written based on a unified specification interface of a plurality of test script ends, including:
Acquiring a test case set written on the basis of unified standard interfaces of a plurality of test script ends, wherein the test case set comprises a plurality of groups of test cases for executing different test operations, each group of test cases has a sequence identifier, and the sequence identifier is used for designating the execution sequence of the test operations;
The step of sending the test cases to the plurality of test script ends through the network service so that each test script end calls a target test function in a corresponding automatic test script based on the identification parameter and the function name, and executes the target test function based on the execution parameter, comprising:
And sending the test case sets to the plurality of test script ends through the network service, so that each test script end calls a plurality of test functions in the corresponding automatic test script based on a plurality of identification parameters and a plurality of function names in the test case sets, and sequentially executing the plurality of test functions based on the sequence identifications.
In accordance with one or more embodiments of the present disclosure, example 5 provides the method of example 4, the test case corresponding to a concurrent extension function for multithreading the plurality of test script ends to invoke corresponding test functions in corresponding automated test scripts.
According to one or more embodiments of the present disclosure, example 6 provides the method of any one of examples 1 to 3, the sending, by the web service, the test case to the plurality of test script ends, including:
Determining a pre-packaged page base class, wherein the page base class comprises a test trigger function, and the parameters of the test trigger function comprise a first parameter used for representing identification information of a page to be tested, a second parameter used for representing identification information of the test function to be executed and a third parameter used for representing execution parameters required by the test function to be executed;
Determining a test page class inherited from the page base class aiming at the page to be tested, taking the identification parameter, the function name and the execution parameter as input parameters, and calling a test trigger function of the test page class;
and sending the test cases to the plurality of test script ends through the test trigger function and the network service.
In accordance with one or more embodiments of the present disclosure, example 7 provides the method of example 6, the page base class being derived by:
And under the condition that the test script end and the test control end carry out socket communication, each automatic test script in the test script end is used as a socket server end to be packaged to obtain a socket entity class, and the common attribute of the socket entity class is abstract packaged based on a page object model to obtain the page base class.
Example 8 provides a test apparatus according to one or more embodiments of the present disclosure, the apparatus comprising:
The system comprises an acquisition module, a test script and a test module, wherein the acquisition module is used for acquiring test cases written based on unified standard interfaces of a plurality of test script ends, each test script end in the plurality of test script ends is preset with an automatic test script aiming at a specified platform, different test script ends correspond to different specified platforms, each automatic test script is used for controlling test equipment corresponding to the specified platform to perform test operation, and the test cases comprise identification parameters of contents to be tested, function names of test functions to be executed in the automatic test script and execution parameters required by the test functions;
The starting module is used for sending a starting command to the server, the starting command is used for instructing the server to start the automatic test scripts preset by the plurality of test script ends and the network service associated with the automatic test scripts, and the network service is used for controlling the communication between the test script ends and the test control ends;
And the test module is used for sending the test cases to the plurality of test script ends through the network service, so that each test script end calls a target test function in a corresponding automatic test script based on the identification parameter and the function name, and executes the target test function based on the execution parameter.
According to one or more embodiments of the present disclosure, example 9 provides a non-transitory computer-readable storage medium having stored thereon a computer program that, when executed by a processing device, performs the steps of the method of any of examples 1-7.
In accordance with one or more embodiments of the present disclosure, example 10 provides an electronic device, comprising:
A storage device having a computer program stored thereon;
processing means for executing the computer program in the storage means to implement the steps of the method of any one of examples 1-7.
The foregoing description is only of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by persons skilled in the art that the scope of the disclosure referred to in this disclosure is not limited to the specific combinations of features described above, but also covers other embodiments which may be formed by any combination of features described above or equivalents thereof without departing from the spirit of the disclosure. Such as those described above, are mutually substituted with the technical features having similar functions disclosed in the present disclosure (but not limited thereto).
Moreover, although 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. In 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 limiting the scope of the present 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 example forms of implementing the claims. The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.

Claims (9)

1. A method of testing, the method comprising:
Acquiring test cases written on the basis of unified standard interfaces of a plurality of test script ends, wherein each test script end in the plurality of test script ends is preset with an automatic test script aiming at a specified platform, different test script ends correspond to different specified platforms, each automatic test script is used for controlling test equipment corresponding to the specified platform to perform test operation, and the test cases comprise identification parameters of contents to be tested, function names of test functions to be executed in the automatic test script and execution parameters required by the test functions;
Sending a starting command to a server, wherein the starting command is used for indicating the server to start automatic test scripts preset by a plurality of test script ends and network services associated with the automatic test scripts, and the network services are used for controlling the communication between the test script ends and a test control end;
sending the test cases to the plurality of test script ends through the network service, so that each test script end calls a target test function in a corresponding automatic test script based on the identification parameter and the function name, and executes the target test function based on the execution parameter;
the method further comprises the steps of:
Registering identification information and network connection information of the test equipment to an equipment state server through the corresponding automatic test script for each test equipment;
the sending the test case to the plurality of test script ends through the network service includes:
Determining target test equipment in a connection state through the equipment state server, and determining a target automatic test script for controlling the target test equipment to perform test operation;
And sending the test case to a test script end preset with the target automatic test script through the network service.
2. The method according to claim 1, wherein the method further comprises:
Converting parameters in the test cases into parameters required by each automatic test script based on a single interface parameter rule predefined between the test control terminal and the plurality of test script terminals to obtain target test cases;
the sending the test case to the plurality of test script ends through the network service includes:
and sending the target test cases to the corresponding test script end through the network service associated with each automatic test script.
3. The method according to claim 1 or 2, wherein the obtaining test cases written based on the unified specification interfaces of the plurality of test script ends includes:
Acquiring a test case set written on the basis of unified standard interfaces of a plurality of test script ends, wherein the test case set comprises a plurality of groups of test cases for executing different test operations, each group of test cases has a sequence identifier, and the sequence identifier is used for designating the execution sequence of the test operations;
The step of sending the test cases to the plurality of test script ends through the network service so that each test script end calls a target test function in a corresponding automatic test script based on the identification parameter and the function name, and executes the target test function based on the execution parameter, comprising:
And sending the test case sets to the plurality of test script ends through the network service, so that each test script end calls a plurality of test functions in the corresponding automatic test script based on a plurality of identification parameters and a plurality of function names in the test case sets, and sequentially executing the plurality of test functions based on the sequence identifications.
4. The method according to claim 1 or 2, wherein the test cases correspond to concurrent extension functions, and the concurrent extension functions are used for multithreading control of the plurality of test script ends to call corresponding test functions in corresponding automatic test scripts.
5. The method according to claim 1 or 2, wherein the sending, through the web service, the test case to the plurality of test script ends includes:
Determining a pre-packaged page base class, wherein the page base class comprises a test trigger function, and the parameters of the test trigger function comprise a first parameter used for representing identification information of a page to be tested, a second parameter used for representing identification information of the test function to be executed and a third parameter used for representing execution parameters required by the test function to be executed;
Determining a test page class inherited from the page base class aiming at the page to be tested, taking the identification parameter, the function name and the execution parameter as input parameters, and calling a test trigger function of the test page class;
And sending the test case to the test script terminal through the test trigger function and the network service.
6. The method of claim 5, wherein the page base class is obtained by:
And under the condition that the test script end and the test control end carry out socket communication, each automatic test script in the test script end is used as a socket server end to be packaged to obtain a socket entity class, and the common attribute of the socket entity class is abstract packaged based on a page object model to obtain the page base class.
7. A test apparatus, the apparatus comprising:
The system comprises an acquisition module, a test script and a test module, wherein the acquisition module is used for acquiring test cases written based on unified standard interfaces of a plurality of test script ends, each test script end in the plurality of test script ends is preset with an automatic test script aiming at a specified platform, different test script ends correspond to different specified platforms, each automatic test script is used for controlling test equipment corresponding to the specified platform to perform test operation, and the test cases comprise identification parameters of contents to be tested, function names of test functions to be executed in the automatic test script and execution parameters required by the test functions;
The starting module is used for sending a starting command to the server, the starting command is used for indicating the server to start the automatic test scripts preset by the plurality of test script ends and the network service associated with the automatic test scripts, and the network service is used for controlling the communication between the test script ends and the test control ends;
The test module is used for sending the test cases to the plurality of test script ends through the network service, so that each test script end calls a target test function in a corresponding automatic test script based on the identification parameter and the function name, and executes the target test function based on the execution parameter;
The apparatus further comprises:
The registration module is used for registering the identification information and the network connection information of the test equipment to the equipment state server through the corresponding automatic test script for each test equipment;
The test module is used for:
Determining target test equipment in a connection state through the equipment state server, and determining a target automatic test script for controlling the target test equipment to perform test operation;
And sending the test case to a test script end preset with the target automatic test script through the network service.
8. A non-transitory computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processing device, implements the steps of the method according to any one of claims 1-6.
9. An electronic device, comprising:
A storage device having a computer program stored thereon;
Processing means for executing said computer program in said storage means to carry out the steps of the method according to any one of claims 1-6.
CN202110796007.9A 2021-07-14 2021-07-14 Test method, device, storage medium and electronic equipment Active CN113553257B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110796007.9A CN113553257B (en) 2021-07-14 2021-07-14 Test method, device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110796007.9A CN113553257B (en) 2021-07-14 2021-07-14 Test method, device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN113553257A CN113553257A (en) 2021-10-26
CN113553257B true CN113553257B (en) 2024-04-26

Family

ID=78131815

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110796007.9A Active CN113553257B (en) 2021-07-14 2021-07-14 Test method, device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN113553257B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114328210A (en) * 2021-12-24 2022-04-12 中国联合网络通信集团有限公司 Test method, test device and computer readable storage medium
CN114610599A (en) * 2022-01-18 2022-06-10 阿里云计算有限公司 Test method and system
CN114691530A (en) * 2022-06-01 2022-07-01 广州世炬网络科技有限公司 Communication end-to-end automatic test method and platform
CN115792768B (en) * 2023-01-04 2023-05-12 俐玛光电科技(北京)有限公司 Monitoring method and device for integrated circuit test and electronic equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106201854A (en) * 2015-05-04 2016-12-07 北京畅游天下网络技术有限公司 A kind of server load method of testing based on socket and system
CN107908541A (en) * 2017-07-26 2018-04-13 平安壹钱包电子商务有限公司 Interface test method, device, computer equipment and storage medium
CN108427636A (en) * 2018-01-09 2018-08-21 阿里巴巴集团控股有限公司 Test method, system and the electronic equipment of application
CN108459953A (en) * 2017-02-22 2018-08-28 北京京东尚科信息技术有限公司 test method and device
CN110096446A (en) * 2019-05-08 2019-08-06 江苏恒宝智能系统技术有限公司 SDK test platform, test macro and its test method
CN111581083A (en) * 2020-04-26 2020-08-25 北京字节跳动网络技术有限公司 Interface testing method and device, electronic equipment and storage medium
CN112241372A (en) * 2020-10-22 2021-01-19 北京字节跳动网络技术有限公司 Terminal testing method and device and electronic equipment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106201854A (en) * 2015-05-04 2016-12-07 北京畅游天下网络技术有限公司 A kind of server load method of testing based on socket and system
CN108459953A (en) * 2017-02-22 2018-08-28 北京京东尚科信息技术有限公司 test method and device
CN107908541A (en) * 2017-07-26 2018-04-13 平安壹钱包电子商务有限公司 Interface test method, device, computer equipment and storage medium
CN108427636A (en) * 2018-01-09 2018-08-21 阿里巴巴集团控股有限公司 Test method, system and the electronic equipment of application
CN110096446A (en) * 2019-05-08 2019-08-06 江苏恒宝智能系统技术有限公司 SDK test platform, test macro and its test method
CN111581083A (en) * 2020-04-26 2020-08-25 北京字节跳动网络技术有限公司 Interface testing method and device, electronic equipment and storage medium
CN112241372A (en) * 2020-10-22 2021-01-19 北京字节跳动网络技术有限公司 Terminal testing method and device and electronic equipment

Also Published As

Publication number Publication date
CN113553257A (en) 2021-10-26

Similar Documents

Publication Publication Date Title
CN113553257B (en) Test method, device, storage medium and electronic equipment
CN110442524B (en) Method and device for testing web service interface with authentication authorization
CN108563579B (en) White box testing method, device and system and storage medium
CN110753089B (en) Method, device, medium and electronic equipment for managing client
CN111897740B (en) User interface testing method and device, electronic equipment and computer readable medium
CN109002366A (en) A kind of remote debugging method and device of mobile terminal webpage
US20170208637A1 (en) Method and Apparatus for Interconnecting Smart Terminal and In-Vehicle Terminal
CN112015654A (en) Method and apparatus for testing
WO2021139379A1 (en) Activity configuration method and apparatus, readable medium and electronic device
CN107704499A (en) A kind of page jump control method and device of application program
CN111309304B (en) Method, device, medium and electronic equipment for generating IDL file
CN110851211A (en) Method, apparatus, electronic device, and medium for displaying application information
CN113608997B (en) Remote debugging method and device for embedded webpage of application program and electronic equipment
CN111209205B (en) Configuration method, configuration device and electronic equipment
CN115022328B (en) Server cluster, testing method and device of server cluster and electronic equipment
CN113704079B (en) Protobuf-based interface testing method and device
CN112422648B (en) Data synchronization method and system
CN113407229B (en) Method and device for generating offline scripts
CN109669679B (en) Service detection and processing method and device and electronic equipment
CN112306858A (en) Test method and device and electronic equipment
CN111797009A (en) Method and device for detecting code compatibility and electronic equipment
CN114398098B (en) Application script execution method, device, electronic equipment and computer readable medium
CN112486826B (en) Test method, test device, electronic equipment and computer readable medium
CN111831531B (en) Test method and device
US20230215065A1 (en) Method, apparatus, device and medium for image special effect processing

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