A test method, device, equipment and medium

By providing testing methods and devices, users can configure and execute test tasks without writing code, solving the problems of heavy and inefficient testing code writing tasks in the prior art, and achieving an efficient testing process.

CN113360385BActive Publication Date: 2024-12-10TENCENT CLOUD COMPUTING (BEIJING) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110666212.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-16
Publication Date
2024-12-10
Estimated Expiration
2041-06-16

AI Technical Summary

Technical Problem

In the prior art, testing of web pages or applications or interfaces requires developers to write test code by themselves, resulting in heavy code writing tasks and high maintenance costs, and requires developers to master specific code development languages, resulting in low testing efficiency.

Method used

Provide a test method and device, by displaying the test task configuration page, obtaining the basic configuration data of the test server, generating and displaying the test task configuration page, configuring the test task request data, sending it to the test server to perform the target test task, and generating the test Result data allows users to configure and execute test tasks without writing test code.

Benefits of technology

It enables free configuration and execution of test tasks without writing test code, improves testing efficiency, reduces testing requirements, simplifies user operations, and is suitable for testing of web pages, applications and interfaces.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113360385B_ABST
    Figure CN113360385B_ABST
Patent Text Reader

Abstract

An embodiment of the present specification discloses a testing method, including: displaying a test task configuration page after a test condition is triggered; or, sending a test request to a test server after the test condition is triggered; obtaining test basic configuration data sent by the test server, and generating and displaying a test task configuration page according to the test basic configuration data; wherein the test task configuration page is used to configure the test task; generating test task request data, sending the test task request data to the test server, so that the test server determines a target test task according to the test task request data, and the test server executes the target test task and generates test result data corresponding to the target test task; obtaining the test result data, and generating a page for representing the test result data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a testing method, device, equipment and medium. Background Art

[0002] In the prior art, it is often necessary to test the operation of a web page, application, or interface. Current application or interface testing requires developers to write test code by themselves to execute the test process. If there are new test requirements, it is necessary to rewrite the test code or modify the existing test code in large quantities to adapt to the new test requirements. It can be seen that under the existing test scheme, the code writing task of developers is heavy, the code maintenance cost is high, and developers are required to master and learn the corresponding code development language, resulting in low test efficiency.

[0003] In view of this, a more efficient testing solution for web pages, applications, interfaces, etc. is needed. Summary of the invention

[0004] The embodiments of this specification provide a testing method, apparatus, device and medium to solve the technical problem of how to more efficiently perform tests including web pages, applications and interfaces.

[0005] To solve the above technical problems, the embodiments of this specification provide the following technical solutions:

[0006] The present embodiment provides a first testing method, including:

[0007] After the test condition is triggered, a test task configuration page is displayed; or, after the test condition is triggered, a test request is sent to a test server; basic test configuration data sent by the test server is obtained, and a test task configuration page is generated and displayed according to the basic test configuration data; wherein the test task configuration page is used to configure the test task;

[0008] Generate test task request data, send the test task request data to a test server, so that the test server determines a target test task according to the test task request data, and the test server executes the target test task and generates test result data corresponding to the target test task;

[0009] The test result data is obtained, and a page for representing the test result data is generated.

[0010] The present specification embodiment provides a second testing method, including:

[0011] Obtaining a test request, and sending test basic configuration data to a test requester, so that the test requester generates and displays a test task configuration page according to the test basic configuration data; wherein the test task configuration page is used to configure the test task;

[0012] Acquire the test task request data sent by the test requester, and determine the target test task according to the test task request data;

[0013] Execute the target test task and generate test result data corresponding to the target test task.

[0014] The present invention provides a testing device, including:

[0015] A test request module is used to display a test task configuration page after a test condition is triggered; or, after a test condition is triggered, send a test request to a test server; obtain test basic configuration data sent by the test server, and generate and display a test task configuration page according to the test basic configuration data; wherein the test task configuration page is used to configure a test task;

[0016] A test initiation module, used to generate test task request data, send the test task request data to a test server, so that the test server determines a target test task according to the test task request data, and the test server executes the target test task and generates test result data corresponding to the target test task;

[0017] The test expression module is used to obtain the test result data and generate a page for representing the test result data.

[0018] The present invention provides a testing device, including:

[0019] A test receiving module, used to obtain a test request and send test basic configuration data to a test requester, so that the test requester generates and displays a test task configuration page according to the test basic configuration data; wherein the test task configuration page is used to configure a test task;

[0020] A test judgment module is used to obtain the test task request data sent by the test requester and determine the target test task according to the test task request data;

[0021] The test execution module is used to execute the target test task and generate test result data corresponding to the target test task.

[0022] The present invention provides a testing device, including:

[0023] at least one processor;

[0024] as well as,

[0025] a memory communicatively coupled to the at least one processor;

[0026] in,

[0027] The memory stores instructions that can be executed by the at least one processor. The instructions are executed by the at least one processor to enable the at least one processor to perform the first or second test method.

[0028] An embodiment of the present specification provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, the first or second test method described above is implemented.

[0029] At least one of the above technical solutions adopted in the embodiments of this specification can achieve the following beneficial effects:

[0030] Through the above technical solution, test tasks can be freely configured and corresponding test processes can be implemented. If the test requirements need to be changed, only the test tasks corresponding to the changed test requirements need to be configured, without rewriting or changing the test code, thereby improving the test efficiency. In addition, the configuration of test tasks does not require users to master the code development language, which makes it easier for users to configure test tasks and improve test efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments of this specification or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0032] Figure 1 It is a schematic diagram of the execution body of the test method in the first embodiment of this specification.

[0033] Figure 2 It is a flow chart of the testing method in the first embodiment of this specification.

[0034] Figure 3 It is a flow chart of the testing method in the second embodiment of this specification.

[0035] Figure 4 It is a schematic diagram of the structure of the testing device in the third embodiment of this specification.

[0036] Figure 5 It is a schematic diagram of the structure of the testing device in the fourth embodiment of this specification. DETAILED DESCRIPTION

[0037] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments of this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this application.

[0038] In the prior art, if a web page, application, or interface needs to be tested, the developer needs to write and run the test code to execute the test process. If there is a new test requirement, such as testing a new web page, application, or interface, the test code needs to be rewritten or the existing test code needs to be modified in large quantities to adapt to the new test requirement. It can be seen that under the existing test scheme, the code writing task of the developer is heavy, the code maintenance cost is high, and the developer needs to master and learn the corresponding code development language, resulting in low test efficiency.

[0039] The first embodiment of this specification (hereinafter referred to as "embodiment one") provides a test method. The execution subject of embodiment one can be a terminal (including but not limited to a mobile phone, computer, pad, TV) or a server or an operating system or a test platform or a test system or an application, etc., that is, the execution subject can be various and can be set, used or changed as needed. In addition, a third-party application can also assist the execution subject in executing embodiment one. For example Figure 1 As shown, the test method in Example 1 can be executed by the server, and an application corresponding to the server can be installed on the terminal (held by the user). Data can be transmitted between the terminal or the application and the server, and data can be collected or input or output or page or information processing can be performed (to the user) through the terminal or the application, thereby assisting the server in executing the test method in Example 1.

[0040] like Figure 2 As shown, the testing method provided in Example 1 includes:

[0041] S101: (Executing subject) After the test condition is triggered, display the test task configuration page; or, after the test condition is triggered, send a test request to the test server; obtain the test basic configuration data sent by the test server, and generate and display the test task configuration page according to the test basic configuration data; wherein the test task configuration page is used to configure the test task;

[0042] In the first embodiment, the execution subject may preset the test condition. The user's operation may trigger the test condition, for example, the user may trigger the test condition by clicking a button of the execution subject or an application installed on the execution subject, or the user may trigger the test condition by voice, or the user may trigger the test condition by operating other devices that can perform data transmission with the execution subject. The first embodiment does not limit how to trigger the test condition. Generally, the test condition triggering means the user's test demand.

[0043] After the test condition is triggered, the execution subject (or other device capable of data transmission with the execution subject) can display the test task configuration page. How to display the test task configuration page can be as described in 1.1 and / or 1.2 (embodiment 1 is not limited to 1.1 and / or 1.2):

[0044] 1.1. The execution entity can call the corresponding data stored in itself and parse and generate the test task configuration page.

[0045] 1.2. After the test condition is triggered, the execution subject may also send a test request to the test server (the test server is a server used to execute the test task). After the test server obtains the test request sent by the execution subject (the above-mentioned execution subject that sends the test request can be called the test requester), the test server sends the test basic configuration data to the execution subject. After the execution subject obtains the test basic configuration data sent by the test server, it generates and displays the test task configuration page according to the test basic configuration data. Specifically, the execution subject can parse the test basic configuration data and generate a test task configuration page.

[0046] If the test task configuration page is displayed on other devices, the display principle is the same as that of the execution entity.

[0047] It should be noted that the above-mentioned test task configuration page is used for (user) configuration of test tasks. The test task configuration page may have corresponding buttons or options or input boxes, etc., so that users can configure test tasks by selection or input (there may be corresponding options or input boxes for selection or input, the same below). The test task configuration page in Example 1 does not refer to a single page, but may refer to one or more pages. If the test task configuration page has multiple pages, these multiple pages may include the test task configuration homepage and / or the subordinate pages of the test task configuration homepage and / or the pages for configuring test tasks that are jumped to once or multiple times by the test task configuration homepage. In short, all pages used to configure the test tasks described in Example 1 can become test task configuration pages, regardless of whether there is an association between these pages.

[0048] In order to implement the first embodiment, various devices including computers can be used to pre-build or arrange the test platform (the device here can be the above-mentioned execution subject, or it can be a device other than the above-mentioned execution subject, hereinafter referred to as the platform building device), and the test platform can be in the form of an application or a model, and the test platform is used to perform the test task. The following takes a computer as an example of a platform building device to explain how to build a test platform:

[0049] In the first embodiment, various available computer languages ​​can be downloaded as the test platform development language, and Python language is used as an example for explanation.

[0050] You can use Python as the test platform development language and download the PyCharm editor to write Python scripts.

[0051] Configure the pycharm editor, download the framework package, such as the python Django-3.1.3 framework package, and the framework and related configurations used by the test platform can be implemented through the above framework package. The following describes some specific configurations (only as examples, embodiment 1 is not limited to the following configurations):

[0052] arrow==0.17.0, time module processing, can process the time format in Python language.

[0053] asgiref == 3.3.1, used to wrap or decorate an asynchronous or synchronous function, an asynchronous function can be called from a synchronous thread and vice versa).

[0054] beautifulsoup4==4.9.3, Beautiful Soup is a Python library that can extract data from HTML or XML files. It can realize document navigation, search and modification through converters.

[0055] bs4==0.0.1, used to provide Python-style functions to handle navigation, search, and modify analysis trees.

[0056] certifi==2020.12.5, used to verify the credibility of SSL certificates and the identity of TLS hosts.

[0057] chardet==4.0.0, universal character encoding detector.

[0058] ddt==1.4.1, used to add test case library.

[0059] Django == 3.1.3, Django is a high-level Python Web framework.

[0060] django-cors-headers == 3.5.0 - Used to add Cross-Origin Resource Sharing (CORS) headers to responses, allowing in-browser requests to your Django application from other origins.

[0061] future == 0.18.2 to allow support for both Python 2 and Python 3 using a Python 3.x compatible codebase.

[0062] idna==2.10, used to support the Internationalized Domain Name (IdNA) protocol in applications.

[0063] PyMySQL == 1.0.2. Most public APIs are compatible with mysqlclient and MySQLdb.

[0064] pyperclip == 1.8.1, a cross-platform clipboard utility supporting binary and text data.

[0065] python-dateutil == 2.8.1, date and time module, can be used in Python.

[0066] pytz == 2020.4, pytz brings the Olsontz database to Python. This library allows accurate cross-platform time zone calculations using Python 2.4 or higher, and also solves the problem of ambiguous times when daylight saving time ends.

[0067] requests == 2.25.1, used to send HTTP / 1.1 requests, there is no need to manually add query strings to the URL, nor is there any need to format encode POST data.

[0068] selenium == 3.141.0, Python language bindings for Selenium WebDriver, used to automate web browser interactions with Python.

[0069] serializers == 0.2.4, because each language has its own data type, if different languages ​​want to transmit data, they must specify a data type that is common to all languages, such as json, xml, etc.

[0070] Serializers allow complex data like querysets and model instances to be converted into native Python types that can be rendered into JSON, XML, or other content types.

[0071] six == 1.15.0, is a Python 2 and 3 compatibility library. It provides utility functions to smooth the differences between Python versions, with the goal of writing Python code that is compatible on both Python versions.

[0072] soupsieve == 2.1 aims to provide selection, matching and filtering using modern CSS selectors.

[0073] sqlparse==0.4.1, Sqlparse is a non-validating SQL parser for Python, which provides support for parsing, splitting and formatting of SQL statements.

[0074] urllib3==1.26.2, a Python http client for the Python ecosystem.

[0075] mlrunner==1.7.7, used to generate XML reports. The XML reports can be integrated with Jenkins and can also be used to count case pass rates.

[0076] Through the above framework and configuration including the above examples, and after configuring the local database MySQL, the test platform described in Example 1 can be built. Of course, other development languages ​​can also be selected to build the test platform, and the corresponding framework and configuration depend on the actual situation and needs.

[0077] The test platform can be installed on the execution subject in the form of an application program, and can also be arranged on a test server. The test condition trigger can include clicking or starting the test platform; the test task configuration page can be a page of the test platform application program on the execution subject.

[0078] The test tasks in Example 1 include but are not limited to web page test tasks and / or application test tasks and / or interface test tasks. How to configure the test tasks can adopt the methods described in 2.1 and / or 2.2 and / or 2.3 (Example 1 is not limited to the methods described in 2.1 and / or 2.2 and / or 2.3):

[0079] 2.1. Web page testing tasks

[0080] A web page test task is a test task that uses a web page as the test object. For a web page test task, configuring the test task may include:

[0081] 2.1.1. Determine the web page to be tested;

[0082] The website address and / or URL and / or keywords of the web page can be entered or selected on the test task configuration page, and the execution entity determines the web page to be tested based on the website address and / or URL and / or keywords, including taking the web page corresponding to the website address and / or URL and / or keywords as the web page to be tested.

[0083] For example, if "XX search homepage" is input, the execution subject will use the homepage of XX search (XX search can be a search engine) as the webpage to be tested.

[0084] 2.1.3. Locate the page element to be tested of the web page to be tested;

[0085] The position information can be input or selected on the test task configuration page, so that the execution subject can locate the page element to be tested on the web page to be tested according to the position information. For example, the coordinates of the page element to be tested on the web page to be tested can be selected or input, or the coordinates of the page element to be tested on the screen (of the execution subject) when the page to be tested is displayed on the screen (of the execution subject) can be selected or input, so that the execution subject locates the page element to be tested on the web page to be tested according to any one or more of the above coordinates.

[0086] The page elements here include but are not limited to one or more of the text, images, hyperlinks, navigation bars, animations, tables, frames, forms, banner ads, subtitles, hover buttons, date stamps, calculators, audio, video, and Java Applets on the page.

[0087] Continuing with the above example, if the XX search homepage is used as the webpage to be tested, and there is a button on the homepage, you can select or enter the coordinates of the button on the homepage, or select or enter the coordinates of the button on the screen when the homepage is displayed on the screen, so that the execution subject locates the button as the page element to be tested on the homepage according to the one or more coordinates. For another example, if there is an input box on the homepage, you can select or enter the coordinates of the input box on the homepage, or select or enter the coordinates of the input box on the screen when the homepage is displayed on the screen, so that the execution subject locates the input box as the page element to be tested on the homepage according to the one or more coordinates.

[0088] 2.1.5. Create a test task for the page element to be tested.

[0089] After determining the page element to be tested, the test task corresponding to the page element to be tested can be selected or input, so that the execution subject creates the test task for the page element to be tested. The test task for the page element to be tested includes but is not limited to clicking and / or inputting the page element to be tested, that is, clicking the page element to be tested and / or using the page element to be tested for input.

[0090] Continuing with the above example, assuming that the execution subject positioning button is the page element to be tested on the above-mentioned homepage, a test task can be created for the button, such as a click task; assuming that the execution subject positioning input box is the page element to be tested on the above-mentioned homepage, a test task can be created for the input box, such as an input task.

[0091] 2.2 Mobile terminal testing tasks

[0092] Mobile terminal test tasks are test tasks that test applications installed on the terminal. For mobile terminal test tasks, configuration of test tasks may include:

[0093] 2.2.2. Identify the application to be tested;

[0094] You can enter the keyword of the application to be tested on the test task configuration page to determine the application to be tested, or select the application to be tested from the installed applications.

[0095] For example, if "search" is entered, the installed search application is used as the application to be tested; or, the search application is directly selected from the installed applications as the application to be tested.

[0096] 2.2.4. Locate the page to be tested of the application to be tested and the page element to be tested of the page to be tested, and create a test task for the page element to be tested; or, create a test task for the application to be tested.

[0097] The following is a description of the situation:

[0098] 2.2.4.2. The page to be tested of the application to be tested can be located. Specifically, the link and / or keyword of the page to be tested can be input or selected on the test task configuration page, and the execution subject determines the web page to be tested of the application according to the link and / or keyword, including using the web page corresponding to the link and / or keyword as the web page to be tested. For example, if "home page" is input, the execution subject uses the home page of the application to be tested as the web page to be tested.

[0099] Determine the page elements to be tested of the page to be tested. Position information can be input or selected on the test task configuration page, so that the execution subject can locate the page elements to be tested on the web page to be tested according to the position information. For example, the coordinates of the page elements to be tested on the web page to be tested can be selected or input, or the coordinates of the page elements to be tested on the (execution subject) screen when the page to be tested is displayed on the (execution subject) screen can be selected or input, so that the execution subject locates the page elements to be tested on the web page to be tested according to any one or more of the above coordinates. The page elements here can refer to the examples of web page test tasks.

[0100] Create a test task for the page element to be tested. After determining the page element to be tested, you can select or input the test task corresponding to the page element to be tested, so that the execution subject creates the test task for the page element to be tested. Among them, the test task for the page element to be tested includes but is not limited to clicking and / or inputting on the page element to be tested, that is, clicking on the page element to be tested and / or using the page element to be tested for input.

[0101] For the specific operations of the above content, please refer to the instructions of the web page testing task.

[0102] 2.2.4.4. Create a test task for the application to be tested. A test task directly for the application to be tested can be created by inputting or selecting a test task directly for the application to be tested on the test task configuration page, such as clicking or double-clicking or deleting the application to be tested.

[0103] 2.3 Interface testing tasks

[0104] An interface test task is a test task that uses an interface as the test object. For an interface test task, configuration of the test task may include:

[0105] 2.3.1. Determine the interface to be tested and the test environment of the interface to be tested;

[0106] You can input or select an interface on the test task configuration page, so that the execution subject determines the interface to be tested. You can also input or select a test environment for the interface to be tested on the test task configuration page, so that the execution subject determines the test environment for the interface to be tested.

[0107] 2.3.3. Create a test task for the interface to be tested.

[0108] After determining the interface to be tested, the test task corresponding to the interface to be tested can be selected or input, so that the execution subject creates a test task for the interface to be tested. The test task for the interface to be tested includes but is not limited to executing one or more methods of get, post, delete, and put on the interface to be tested.

[0109] After the test task is configured, it can be saved and stored by the execution subject or sent to the test server for storage. After each test condition is triggered, the test task configuration page can display the configured or saved test tasks for the user to operate the configured or saved test tasks, such as deleting or editing.

[0110] It has been explained above that there may be the situation described in 1.2. If it is the situation described in 1.2, then after the test condition is triggered (for example, the user clicks on the test platform application), the execution subject (or the test platform application on the execution subject) may send a test request to the test server. After the test server obtains the test request sent by the execution subject, the test server sends the test basic configuration data to the execution subject. Here is the test basic configuration data. Since the user may start the test platform application to configure the test task multiple times, each time the test condition is triggered, the test basic configuration data may not only include some initial data (the initial data is used to display one or more test task configuration pages in the initial state), but also include (before the test condition is triggered) the data of the configured test tasks (if any), so that the previously configured test tasks can be displayed on the test task configuration page, so that the user can operate the configured test tasks, such as deleting or editing.

[0111] The above describes how to configure a test task. It is emphasized again that any page used to configure a test task can be used as a test task configuration page, no matter how the page is displayed or how many times it is redirected.

[0112] Users can also use the above test platform to configure various parameters of the test task, such as execution time, waiting time, interval time, etc.

[0113] S103: (Executing subject) generates test task request data, and sends the test task request data to a test server, so that the test server determines a target test task according to the test task request data, and the test server executes the target test task and generates test result data corresponding to the target test task;

[0114] After configuring any test task, the user can directly choose to execute the test task (equivalent to selecting the test task), or select one or more test tasks from the configured test tasks. In either case, the selected test task is the test task that needs to be executed next.

[0115] The execution subject may generate test task request data according to the user's operation (on the configured test task). The test task request data may include the selected configured test task, and the test task included in the test task request data may be referred to as a target test task.

[0116] Specifically, generating test task request data may include: determining a selected configured test task, generating test task request data based on the selected configured test task, wherein the test task request data includes the selected configured test task; and / or determining a configured test task, generating test task request data based on the configured test task, for example, automatically including all configured test tasks in the test task request data.

[0117] The execution subject sends the test task request data to the test server, so that the test server determines the target test task according to the test task request data, and the test server executes the target test task (by running the above-mentioned test platform).

[0118] If there is only one target test task, the test server only needs to execute the target test task.

[0119] If there are multiple target test tasks, executing the target test tasks may include: determining the execution order of each target test task; and executing each target test task in sequence according to the execution order. Specifically, the test task request data may include the execution order of each test task included therein, and the test server executes each target test task in sequence according to the execution order in the test task request data; and / or, the test server may preset execution rules, and the execution rules may be used to determine the execution order of various types of test tasks (web page test tasks, mobile terminal test tasks, and interface test tasks can be used as different types of test tasks).

[0120] For example, the web page test task priority is higher than the mobile terminal test task priority which is higher than the interface test task priority, then the execution order can be that the web page test task is before the mobile terminal test task, and the mobile terminal test task is before the interface test task.

[0121] You can set the priority of various page elements. For a certain type of test task, if there are multiple test tasks for different page elements, you can determine the priority of the test task according to the priority of the page element. For example, for a web page test task or a mobile terminal test task, the button priority is higher than the input box. For a web page or mobile terminal test task, the execution order of the test task for the web page button is before the test task for the web page input box.

[0122] You can set the priority of each type of interface. If there are multiple interface test tasks, their execution order is determined according to the priority.

[0123] Currently, there are other ways to determine the execution order of the target test tasks, which are not limited in the first embodiment.

[0124] After the test server executes the target test task, it can generate the test result data corresponding to the target test task. The test result data corresponding to each target test task can be generated after each target test task is executed; the test result data for each target test task can also be generated after all target test tasks in the test task request data are executed, or the test result data for each target test task can be generated uniformly.

[0125] S105: (Execution subject) Obtain the test result data, and generate a page for representing the test result data.

[0126] The test server may send the test result data to the execution subject. After acquiring the test result data, the execution subject may generate a page for representing the test result data according to the test result data (analysis).

[0127] In the first embodiment, the user (i.e., the user who configures the test task) can freely configure the test tasks for various objects, and execute the corresponding test tasks to implement the corresponding test process, without the need for the user to write the test code, thereby improving the test efficiency and reducing the test requirements. If the test requirements need to be changed, such as changing the test object, it is only necessary to configure the test task corresponding to the changed test requirements (for example, to change the web page test to the interface test, it is only necessary to configure the test task corresponding to the interface test), without the need for the user to rewrite or change the test code, further improving the test efficiency and reducing the test requirements. In addition, the configuration of the test task only requires the user to operate the page, and does not require the user to master the coding language or write code, thereby facilitating the user to configure the test task and improving the test efficiency.

[0128] Through the first embodiment, various objects including web pages, mobile applications, and interfaces can be tested, which is easy to operate and has a wide range of applications. By configuring the test tasks, the working process and operating performance of various objects can be accurately and comprehensively simulated. For example, the operating performance and resource usage of the test object can be determined by the execution time of the test task. Generally, the shorter the execution time, the better the operating performance of the test object.

[0129] The second embodiment of this specification (hereinafter referred to as "embodiment 2") provides a test method. The execution subject of embodiment 2 can be a terminal (including but not limited to mobile phones, computers, pads, televisions) or a server or an operating system or a test platform or a test system or an application, etc., that is, the execution subject can be various and can be set, used or changed as needed. In addition, a third-party application can also assist the execution subject in executing embodiment 2. For example Figure 1As shown, the test method in Example 2 can be executed by the server, and an application corresponding to the server can be installed on the terminal (held by the user). Data can be transmitted between the terminal or the application and the server, and data can be collected or input or output or page or information processing can be performed (to the user) through the terminal or the application, thereby assisting the server in executing the test method in Example 2.

[0130] In particular, the execution subject of the second embodiment may be the test server in the first embodiment.

[0131] like Figure 3 As shown, the testing method provided in Example 2 includes:

[0132] S202: (Executing subject) obtains a test request, and sends test basic configuration data to the test requester, so that the test requester generates and displays a test task configuration page according to the test basic configuration data; wherein the test task configuration page is used to configure the test task;

[0133] S204: (Executing entity) obtaining the test task request data sent by the test requester, and determining the target test task according to the test task request data;

[0134] S206: (Execution subject) executes the target test task and generates test result data corresponding to the target test task.

[0135] The execution entity of the second embodiment can build the test platform described in the first embodiment.

[0136] For details not described in detail in the second embodiment, refer to the first embodiment.

[0137] In the second embodiment, the user (i.e., the user who configures the test task) can freely configure the test tasks for various objects, and execute the corresponding test tasks to implement the corresponding test process, without the need for the user to write the test code, thereby improving the test efficiency and reducing the test requirements. If the test requirements need to be changed, such as changing the test object, it is only necessary to configure the test task corresponding to the changed test requirements (for example, to change the web page test to the interface test, it is only necessary to configure the test task corresponding to the interface test), without the need for the user to rewrite or change the test code, further improving the test efficiency and reducing the test requirements. In addition, the configuration of the test task only requires the user to operate the page, and does not require the user to master the coding language or write code, which makes it convenient for the user to configure the test task and improves the test efficiency.

[0138] Through the second embodiment, various objects including web pages, mobile applications, and interfaces can be tested, which is easy to operate and has a wide range of applications. By configuring the test tasks, the working process and operating performance of various objects can be accurately and comprehensively simulated. For example, the operating performance and resource usage of the test object can be determined by the execution time of the test task. Generally, the shorter the execution time, the better the operating performance of the test object.

[0139] like Figure 4 As shown, the third embodiment of this specification provides a testing device, including:

[0140] The test request module 301 is used to display the test task configuration page after the test condition is triggered; or, after the test condition is triggered, send a test request to the test server; obtain the test basic configuration data sent by the test server, and generate and display the test task configuration page according to the test basic configuration data; wherein the test task configuration page is used to configure the test task;

[0141] The test initiation module 303 is used to generate test task request data, send the test task request data to the test server, so that the test server determines the target test task according to the test task request data, and the test server executes the target test task and generates test result data corresponding to the target test task;

[0142] The test expression module 305 is used to obtain the test result data and generate a page for representing the test result data.

[0143] Optionally, the test task includes a web page test task and / or an application program test task;

[0144] For web page testing tasks, configuring the testing tasks includes:

[0145] Identify the web page to be tested;

[0146] Locating a page element to be tested of the web page to be tested;

[0147] Creating a test task for the page element to be tested;

[0148] and / or,

[0149] For mobile terminal test tasks, configure the test tasks including:

[0150] Identify the application to be tested;

[0151] Locating a page to be tested of the application to be tested and a page element to be tested of the page to be tested, and creating a test task for the page element to be tested;

[0152] Or, create a test task for the application to be tested.

[0153] Optionally, the test task for the to-be-tested page element includes clicking and / or inputting on the to-be-tested page element.

[0154] Optionally, the test task includes an interface test task;

[0155] Configuration test tasks include:

[0156] Determine an interface to be tested and a test environment for the interface to be tested;

[0157] Create a test task for the interface to be tested.

[0158] Optionally, the test task for the interface to be tested includes executing get and / or post and / or delete and / or put on the interface to be tested.

[0159] Optionally, the test task configuration page includes a test task configuration homepage and / or a subordinate page of the test task configuration homepage and / or a page for configuring test tasks that is jumped to once or multiple times from the test task configuration homepage.

[0160] Optionally, if the test basic configuration data sent by the test server is obtained, the test basic configuration data includes configured test tasks.

[0161] Optionally, the test task request data includes a selected configured test task;

[0162] and / or,

[0163] The target test task is the test task included in the test task request data.

[0164] Optionally, the generated test task request data includes:

[0165] Determine a selected configured test task, and generate test task request data according to the selected configured test task;

[0166] and / or,

[0167] The configured test task is determined, and test task request data is generated according to the configured test task.

[0168] Optionally, there are multiple target test tasks, and executing the target test tasks includes:

[0169] Determine the execution order of each target test task;

[0170] Execute each of the target test tasks in sequence according to the execution order.

[0171] like Figure 5 As shown, the fourth embodiment of this specification provides a testing device, including:

[0172] The test receiving module 402 is used to obtain a test request and send test basic configuration data to the test requester, so that the test requester generates and displays a test task configuration page according to the test basic configuration data; wherein the test task configuration page is used to configure the test task;

[0173] The test determination module 404 is used to obtain the test task request data sent by the test requester and determine the target test task according to the test task request data;

[0174] The test execution module 406 is used to execute the target test task and generate test result data corresponding to the target test task.

[0175] Optionally, the device further comprises:

[0176] The configuration module is used to build a test platform, and the test platform is used to execute the target test task.

[0177] A fifth embodiment of the present specification provides a testing device, comprising:

[0178] at least one processor;

[0179] as well as,

[0180] a memory communicatively coupled to the at least one processor;

[0181] in,

[0182] The memory stores instructions that can be executed by the at least one processor. The instructions are executed by the at least one processor to enable the at least one processor to perform the testing method described in the first or second embodiment.

[0183] A sixth embodiment of the present specification provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, the test method described in the first or second embodiment is implemented.

[0184] The above embodiments may be used in combination, and modules with the same name between different embodiments or within the same embodiment may be the same or different modules.

[0185] The above describes specific embodiments of the present specification, and other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily have to be performed in the specific order or sequential order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0186] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, equipment, and non-volatile computer-readable storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0187] The apparatus, device, non-volatile computer-readable storage medium and method provided in the embodiments of this specification correspond to each other, and therefore, the apparatus, device, and non-volatile computer storage medium also have similar beneficial technical effects as the corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the corresponding apparatus, device, and non-volatile computer storage medium will not be repeated here.

[0188] In the 1990s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages ​​and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.

[0189] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the devices for implementing various functions can be regarded as both software modules for implementing the method and structures within the hardware component.

[0190] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0191] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0192] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems, or computer program products. Therefore, the embodiments of this specification may be in the form of complete hardware embodiments, complete software embodiments, or embodiments in combination with software and hardware. Moreover, the embodiments of this specification may be in the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0193] This specification is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of this specification. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0194] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0195] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0196] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0197] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0198] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0199] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0200] This specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0201] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0202] The above is only an embodiment of this specification and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims

1. A testing method comprising: After the test condition is triggered, the test task configuration page is displayed; Or, after the test condition is triggered, a test request is sent to the test server; Acquire the test basic configuration data sent by the test server, and generate and display a test task configuration page according to the test basic configuration data; wherein the test task configuration page is used to configure the test task; the test task includes at least one of a web page test task, an application test task and an interface test task; Generate test task request data, send the test task request data to a test server, so that the test server determines a target test task according to the test task request data, and the test server executes the target test task and generates test result data corresponding to the target test task; The generating the test task request data comprises: determining a selected configured test task, and generating the test task request data according to the selected configured test task; and / or, Determine the configured test task, and generate the test task request data according to the configured test task; The test result data is obtained, and a page for representing the test result data is generated.

2. The method according to claim 1, wherein the test task comprises a web page test task and / or an application program test task; For web page testing tasks, configuring the testing tasks includes: Identify the web page to be tested; Locating a page element to be tested of the web page to be tested; Creating a test task for the page element to be tested; and / or, For mobile terminal test tasks, configure the test tasks including: Identify the application to be tested; Locate the page to be tested of the application to be tested and the page elements to be tested of the page to be tested, create A test task for the page element to be tested; Or, create a test task for the application to be tested.

3. The method as claimed in claim 2, wherein the test task for the page element to be tested comprises executing a click and / or input on the page element to be tested.

4. The method according to claim 1, wherein the test task comprises an interface test task; Configuration test tasks include: Determine an interface to be tested and a test environment for the interface to be tested; Create a test task for the interface to be tested.

5. The method as claimed in claim 4, wherein the test task for the interface to be tested comprises executing get and / or post and / or delete and / or put on the interface to be tested.

6. According to the method as claimed in claim 1, the test task configuration page includes a test task configuration home page and / or a subordinate page of the test task configuration home page and / or a page for configuring test tasks that is jumped to once or multiple times by the test task configuration home page.

7. The method according to claim 1, wherein if the test basic configuration data sent by the test server is obtained, the test basic configuration data includes configured test tasks.

8. The method of claim 1, wherein the test task request data comprises a selected configured test task; and / or, The target test task is the test task included in the test task request data.

9. The method according to any one of claims 1 to 8, wherein if there are multiple target test tasks, executing the target test tasks comprises: Determine the execution order of each target test task; Execute each of the target test tasks in sequence according to the execution order.

10. A testing method comprising: Obtain a test request, and send test basic configuration data to the test requester, so that the test requester generates and displays a test task configuration page according to the test basic configuration data; wherein the test task configuration page is used to configure a test task; the test task includes at least one of a web page test task, an application test task, and an interface test task; Acquire the test task request data sent by the test requester, and determine the target test task according to the test task request data; the test task request data is generated in the following manner: determine the selected configured test task, and generate the test task request data according to the selected configured test task; and / or, Determine the configured test task, and generate the test task request data according to the configured test task; Execute the target test task and generate test result data corresponding to the target test task.

11. The method of claim 10, further comprising: A test platform is built, where the test platform is used to execute the target test task.

12. A testing device comprising: Test request module, used to display the test task configuration page after the test condition is triggered; Or, after the test condition is triggered, a test request is sent to the test server; Acquire the test basic configuration data sent by the test server, and generate and display a test task configuration page according to the test basic configuration data; wherein the test task configuration page is used to configure the test task; the test task includes at least one of a web page test task, an application test task and an interface test task; A test initiation module, used to generate test task request data, send the test task request data to a test server, so that the test server determines a target test task according to the test task request data, and the test server executes the target test task and generates test result data corresponding to the target test task; The generating the test task request data comprises: determining a selected configured test task, and generating the test task request data according to the selected configured test task; and / or, Determine the configured test task, and generate the test task request data according to the configured test task; The test expression module is used to obtain the test result data and generate a page for representing the test result data.

13. A testing device comprising: A test receiving module, used to obtain a test request and send test basic configuration data to a test requester, so that the test requester generates and displays a test task configuration page according to the test basic configuration data; wherein the test task configuration page is used to configure a test task; the test task includes at least one of a web page test task, an application test task and an interface test task; A test judgment module is used to obtain the test task request data sent by the test requester, and determine the target test task according to the test task request data; the test task request data is generated in the following manner: determine the selected configured test task, and generate the test task request data according to the selected configured test task; and / or, Determine the configured test task, and generate the test task request data according to the configured test task; The test execution module is used to execute the target test task and generate test result data corresponding to the target test task.

14. A testing device comprising: at least one processor; as well as, a memory communicatively coupled to the at least one processor; in, The memory stores instructions that can be executed by the at least one processor. The instructions are executed by the at least one processor to enable the at least one processor to perform the testing method according to any one of claims 1 to 11. 15 . A computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are capable of implementing the testing method according to claim 1 when executed by a processor.