Test method, device, electronic device and computer readable storage medium
By storing test instructions in an orderly manner and simply naming them, and parsing test requests, the problems of disordered storage and difficult naming of test codes are solved, and testing efficiency and accuracy are improved.
Patent Information
- Application Number
- CN201910989889.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-10-17
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2039-10-17
AI Technical Summary
In the existing technology, test codes are stored out of order and the naming is abstract and difficult to understand, making it difficult for testers to quickly determine the test content, especially in complex scenarios, resulting in a waste of labor costs and low testing efficiency.
By storing test instructions in an orderly manner, using simple and easy-to-understand naming methods, parsing test requests, splitting test application description information to obtain corresponding test instructions, and combining execution to obtain test results.
It greatly saves the workload of testers, improves testing efficiency and ensures testing accuracy.
Smart Images

Figure CN112685282B
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of testing technology, and in particular to a testing method, device, electronic device, and computer-readable storage medium. Background Art
[0002] With the development of Internet technology, more and more businesses and service providers are providing services to users through Internet applications. To improve service quality, it is necessary to frequently test the service content provided by Internet applications to promptly identify potential problems in Internet applications and resolve them promptly to ensure the normal operation of Internet applications. However, in existing technologies, test code is often stored in a disorderly manner and the naming is relatively abstract and difficult to understand. This makes it difficult for testers to quickly determine the test content that the test code can perform. Especially for more complex test scenarios, finding and assembling test code takes a lot of time for testers, resulting in wasted manpower costs and reduced testing efficiency. Summary of the Invention
[0003] Embodiments of the present disclosure provide a testing method, apparatus, electronic device, and computer-readable storage medium.
[0004] In a first aspect, an embodiment of the present disclosure provides a testing method.
[0005] Specifically, the testing method includes:
[0006] In response to receiving a test request sent by a test requester and carrying at least test application description information, split the test application description information to obtain test application description sub-information;
[0007] Determine the test instruction corresponding to the test application description sub-information;
[0008] The test instructions are combined to obtain a test instruction set corresponding to the test request, and the test instruction set is executed to obtain a test result.
[0009] In conjunction with the first aspect, in a first implementation of the first aspect of the present disclosure, in response to receiving a test request sent by a test requester that carries at least test application description information, the test application description information is split to obtain test application description sub-information, including:
[0010] In response to receiving a test request sent by a test requester and carrying at least test application description information, obtaining the test application description information and obtaining the behavior characteristics of the test subject object of a preset unit;
[0011] The test application description information is split according to the test subject object behavior characteristics of the preset unit to obtain test application description sub-information corresponding to the test subject object behavior characteristics of the preset unit.
[0012] In combination with the first aspect and the first implementation manner of the first aspect, in the second implementation manner of the first aspect of the present disclosure, determining the test instruction corresponding to the test application descriptor information according to the test application descriptor information includes:
[0013] Determine instruction index information of the test application descriptor information;
[0014] Sending a test instruction acquisition request carrying at least the instruction index information to a test instruction database, so that the test instruction database searches for a test instruction corresponding to the instruction index information according to the instruction index information;
[0015] Receive a test instruction corresponding to the instruction index information sent by the test instruction database.
[0016] In combination with the first aspect, the first implementation method of the first aspect and the second implementation method of the first aspect, in the third implementation method of the first aspect of the present disclosure, the instruction index information of the test application descriptor information is the keyword corresponding to the test application descriptor information.
[0017] In combination with the first aspect, the first implementation manner of the first aspect, the second implementation manner of the first aspect, and the third implementation manner of the first aspect, in a fourth implementation manner of the first aspect of the present disclosure, combining the test instructions to obtain a test instruction set corresponding to the test request, and executing the test instruction set to obtain a test result includes:
[0018] Determining the execution order of the test application descriptor information;
[0019] Combining the test instructions corresponding to the test application description sub-information according to the execution order of the test application description sub-information to obtain a test instruction set corresponding to the test request;
[0020] Execute the test instruction set to obtain a test result.
[0021] In combination with the first aspect, the first implementation of the first aspect, the second implementation of the first aspect, the third implementation of the first aspect, and the fourth implementation of the first aspect, the fifth implementation of the first aspect of the present disclosure further includes:
[0022] The test results are displayed.
[0023] In combination with the first aspect, the first implementation of the first aspect, the second implementation of the first aspect, the third implementation of the first aspect, the fourth implementation of the first aspect, and the fifth implementation of the first aspect, the sixth implementation of the first aspect of the present disclosure further includes:
[0024] A test prompt image corresponding to the test request is displayed, wherein the test prompt image is used to prompt a test result.
[0025] In combination with the first aspect, the first implementation manner of the first aspect, the second implementation manner of the first aspect, the third implementation manner of the first aspect, the fourth implementation manner of the first aspect, the fifth implementation manner of the first aspect, and the sixth implementation manner of the first aspect, in a seventh implementation manner of the first aspect of the present disclosure, the displaying a test prompt image corresponding to the test request includes:
[0026] Obtaining prompt image information corresponding to the test instruction;
[0027] The prompt image information is combined according to the execution order of the test application description sub-information to obtain and display a test prompt image corresponding to the test request.
[0028] In a second aspect, an embodiment of the present disclosure provides a testing device.
[0029] Specifically, the testing device includes:
[0030] a splitting module configured to, in response to receiving a test request at least carrying test application description information from a test requester, split the test application description information to obtain test application description sub-information;
[0031] A determination module is configured to determine a test instruction corresponding to the test application description sub-information according to the test application description sub-information;
[0032] The execution module is configured to combine the test instructions to obtain a test instruction set corresponding to the test request, and execute the test instruction set to obtain a test result.
[0033] In conjunction with the second aspect, in a first implementation of the second aspect of the present disclosure, the splitting module includes:
[0034] A first acquisition submodule is configured to, in response to receiving a test request at least carrying test application description information from a test requester, acquire the test application description information and acquire behavior characteristics of a preset unit of test subject objects;
[0035] The splitting submodule is configured to split the test application description information according to the test subject object behavior characteristics of the preset unit to obtain test application description sub-information corresponding to the test subject object behavior characteristics of the preset unit.
[0036] In combination with the second aspect and the first implementation of the second aspect, in a second implementation of the second aspect of the present disclosure, the determining module includes:
[0037] A first determining submodule is configured to determine instruction index information of the test application description subinformation;
[0038] a sending submodule configured to send a test instruction acquisition request carrying at least the instruction index information to a test instruction database, so that the test instruction database searches for a test instruction corresponding to the instruction index information according to the instruction index information;
[0039] The receiving submodule is configured to receive a test instruction corresponding to the instruction index information sent by the test instruction database.
[0040] In combination with the second aspect, the first implementation of the second aspect and the second implementation of the second aspect, in the third implementation of the second aspect of the present disclosure, the instruction index information of the test application descriptor information is the keyword corresponding to the test application descriptor information.
[0041] In combination with the second aspect, the first implementation manner of the second aspect, the second implementation manner of the second aspect, and the third implementation manner of the second aspect, in a fourth implementation manner of the second aspect of the present disclosure, the execution module includes:
[0042] A second determining submodule is configured to determine an execution order of the test application description sub-information;
[0043] a combining submodule configured to combine the test instructions corresponding to the test application description sub-information according to the execution order of the test application description sub-information to obtain a test instruction set corresponding to the test request;
[0044] The execution submodule is configured to execute the test instruction set to obtain a test result.
[0045] In combination with the second aspect, the first implementation of the second aspect, the second implementation of the second aspect, the third implementation of the second aspect, and the fourth implementation of the second aspect, the fifth implementation of the second aspect of the present disclosure further includes:
[0046] The first display module is configured to display the test result.
[0047] In combination with the second aspect, the first implementation manner of the second aspect, the second implementation manner of the second aspect, the third implementation manner of the second aspect, the fourth implementation manner of the second aspect, and the fifth implementation manner of the second aspect, the sixth implementation manner of the second aspect of the present disclosure further includes:
[0048] The second display module is configured to display a test prompt image corresponding to the test request, wherein the test prompt image is used to prompt the test result.
[0049] In combination with the second aspect, the first implementation manner of the second aspect, the second implementation manner of the second aspect, the third implementation manner of the second aspect, the fourth implementation manner of the second aspect, the fifth implementation manner of the second aspect, and the sixth implementation manner of the second aspect, in a seventh implementation manner of the second aspect of the present disclosure, the second display module includes:
[0050] A second acquisition submodule is configured to acquire prompt image information corresponding to the test instruction;
[0051] The display submodule is configured to combine the prompt image information according to the execution order of the test application description sub-information, and obtain and display the test prompt image corresponding to the test request.
[0052] In a third aspect, an embodiment of the present disclosure provides an electronic device comprising a memory and at least one processor, wherein the memory is used to store one or more computer instructions, and wherein the one or more computer instructions are executed by the at least one processor to implement the method steps of the testing method in the first aspect above.
[0053] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium for storing computer instructions used by a testing device, which includes computer instructions involved in the testing device for executing the testing method in the first aspect.
[0054] The technical solutions provided by the embodiments of the present disclosure may have the following beneficial effects:
[0055] The above technical solution stores test instructions in an orderly manner, names them using a simple and easy-to-understand naming method, and parses the test request to obtain the test instructions corresponding to the test request, thereby completing the test work. This technical solution can significantly reduce the testing workload of testers, improve the execution efficiency of the test work, and effectively ensure the accuracy of the test.
[0056] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Other features, objectives and advantages of the present disclosure will become more apparent through the following detailed description of non-limiting embodiments in conjunction with the accompanying drawings. In the accompanying drawings:
[0058] Figure 1 A flow chart showing a testing method according to an embodiment of the present disclosure;
[0059] Figure 2 Show the basis Figure 1 Flowchart of step S101 of the testing method of the illustrated embodiment;
[0060] Figure 3 Show the basis Figure 1 Flowchart of step S102 of the testing method of the illustrated embodiment;
[0061] Figure 4 Show the basis Figure 1 Flowchart of step S103 of the testing method of the illustrated embodiment;
[0062] Figure 5 A flow chart showing a testing method according to another embodiment of the present disclosure is shown;
[0063] Figure 6 A flow chart showing a testing method according to yet another embodiment of the present disclosure;
[0064] Figure 7 Show the basis Figure 6 Flowchart of step S605 of the testing method of the illustrated embodiment;
[0065] Figure 8 Shows a structural block diagram of a testing device according to an embodiment of the present disclosure;
[0066] Figure 9 Show the basis Figure 8 A structural block diagram of the splitting module 801 of the test device of the illustrated embodiment;
[0067] Figure 10 Show the basis Figure 8 A structural block diagram of the determination module 802 of the test device of the illustrated embodiment;
[0068] Figure 11 Show the basis Figure 8 A structural block diagram of the execution module 803 of the test device according to the embodiment shown;
[0069] Figure 12 A structural block diagram of a testing device according to another embodiment of the present disclosure is shown;
[0070] Figure 13 FIG. 1 shows a structural block diagram of a testing device according to another embodiment of the present disclosure;
[0071] Figure 14 Show the basis Figure 13 A structural block diagram of the second display module 1305 of the testing device according to the illustrated embodiment;
[0072] Figure 15 A structural block diagram of an electronic device according to an embodiment of the present disclosure is shown;
[0073] Figure 16 It is a structural diagram of a computer system suitable for implementing a testing method according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0074] Hereinafter, exemplary embodiments of the present disclosure will be described in detail with reference to the accompanying drawings so that those skilled in the art can easily implement them. In addition, for the sake of clarity, parts not related to the description of the exemplary embodiments are omitted in the accompanying drawings.
[0075] In the present disclosure, it should be understood that terms such as "include" or "have" are intended to indicate the presence of features, numbers, steps, actions, components, parts, or combinations thereof disclosed in the present specification, and are not intended to exclude the possibility that one or more other features, numbers, steps, actions, components, parts, or combinations thereof exist or are added.
[0076] It should also be noted that, in the absence of conflict, the embodiments and features of the embodiments of the present disclosure may be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0077] The technical solution provided by the disclosed embodiments stores test instructions in an orderly manner, names them using a simple and easy-to-understand naming method, and parses the test request to obtain the test instructions corresponding to the test request, thereby completing the test work. This technical solution can significantly reduce the testing workload of testers, improve the execution efficiency of the test work, and effectively ensure the accuracy of the test.
[0078] Figure 1 The flowchart of the testing method according to one embodiment of the present disclosure is shown, which can be applied to the server side. Figure 1 As shown, the testing method includes the following steps S101-S103:
[0079] In step S101, in response to receiving a test request sent by a test requester and carrying at least test application description information, the test application description information is split to obtain test application description sub-information;
[0080] In step S102, a test instruction corresponding to the test application description sub-information is determined;
[0081] In step S103, the test instructions are combined to obtain a test instruction set corresponding to the test request, and the test instruction set is executed to obtain a test result.
[0082] As mentioned above, with the development of Internet technology, more and more businesses or service providers are providing services to users through Internet applications. To improve service quality, it is necessary to frequently test the service content provided by Internet applications to promptly identify and resolve potential problems in Internet applications and ensure the normal operation of Internet applications. However, in existing technologies, test code is often stored in a disorderly manner and the naming is relatively abstract and difficult to understand. This makes it difficult for testers to quickly determine the test content that the test code can perform. Especially for more complex test scenarios, finding and assembling test code takes a lot of time for testers, resulting in wasted manpower costs and reduced testing efficiency.
[0083] In view of the above shortcomings, this embodiment proposes a testing method that stores test instructions in an orderly manner, names them using a simple and easy-to-understand naming method, and parses the test request to obtain the test instruction corresponding to the test request, thereby completing the test. This technical solution can significantly reduce the testing workload of testers, improve the execution efficiency of the test work, and effectively ensure the accuracy of the test.
[0084] In an optional implementation of this embodiment, the test request carries at least test application description information, and may also carry information such as test requester identification information and test requirement information. The test application description information is used to describe test application information, such as test application scenario information, etc. The test requester identification information is used to uniquely identify the test requester. The test requirement information may include, for example, test time requirement information, test duration requirement information, test result return time requirement information, test condition requirement information, and test result return format requirement information.
[0085] Typically, the test application description information includes a variety of application segmentation information. For example, if the test application description information is test application scenario information, the test application scenario information may include a plurality of application scenario links that can constitute the test application scenario. For example, if the test application scenario information is a test application scenario for a user to place an order, the test application scenario includes a plurality of order processing links, such as the user generating a new order, the merchant processing the order, the distribution resources distributing the order, and the user receiving the ordered goods to complete the order. Therefore, in order to improve the application flexibility of the test instructions, in this implementation, a corresponding test instruction is configured for each application link. At the same time, after receiving the test application description information, it is split to obtain a plurality of application segmentation information included in the test application description information, namely, the test application description sub-information. Then, the test instruction corresponding to it is determined according to the test application description sub-information. Finally, the test instructions corresponding to each test application description sub-information are combined to obtain a test instruction set corresponding to the test request. The final test result can be obtained by executing the test instruction set.
[0086] In an optional implementation of this embodiment, the test instruction refers to an instruction that can be executed or run, and can obtain a certain test result after execution and running. For example, the test instruction can be a test code.
[0087] In an optional implementation of this embodiment, as Figure 2 As shown, the step S101, i.e., in response to receiving a test request sent by a test requester and carrying at least test application description information, splitting the test application description information to obtain test application description sub-information, includes the following steps S201-S202:
[0088] In step S201, in response to receiving a test request sent by a test requester that carries at least test application description information, the test application description information is obtained, and behavior characteristics of a test subject object of a preset unit are obtained;
[0089] In step S202, the test application description information is split according to the test subject object behavior characteristics of the preset unit to obtain test application description sub-information corresponding to the test subject object behavior characteristics of the preset unit.
[0090] In order to obtain more accurate test instructions, in this embodiment, it is necessary to first split the test application description information to obtain test application description sub-information, and then obtain the corresponding test instructions based on the split test application description sub-information. Specifically, after receiving a test request from a test requester that carries at least test application description information, the test application description information is obtained, and based on the test application description information, the test subject object behavior characteristics of the preset units are obtained; then, the test application description information is split according to the test subject object behavior characteristics of the preset units to obtain the test application description sub-information corresponding to the test subject object behavior characteristics of the preset units.
[0091] In an optional implementation of this embodiment, the test subject object behavior feature refers to feature information that can characterize the test subject object behavior characteristics, and the preset unit test subject object behavior feature refers to the smallest, indivisible test subject object behavior feature. For example, for a test application scenario in which a user places an order, the test application scenario includes multiple order processing links such as a user generating a new order, a merchant processing an order, a distribution resource distributing an order, and a user receiving an order product to complete the order. Correspondingly, there are test subject object behavior features such as a user generating a new order, a merchant processing an order, a distribution resource distributing an order, and a user receiving an order product. Based on the above test subject object behavior feature information, the test application scenario in which a user places an order can be split into multiple test application sub-scenarios corresponding to the test subject object behavior feature information, and the test application description information can also be split into test application description sub-information corresponding to the test subject object behavior feature information.
[0092] In an optional implementation of this embodiment, as Figure 3 As shown, the step S102, i.e. determining the test instruction corresponding to the test application descriptor information, includes the following steps S301-S303:
[0093] In step S301, the instruction index information of the test application descriptor information is determined;
[0094] In step S302, a test instruction acquisition request carrying at least the instruction index information is sent to a test instruction database, so that the test instruction database searches for a test instruction corresponding to the instruction index information according to the instruction index information;
[0095] In step S303, a test instruction corresponding to the instruction index information is received from the test instruction database.
[0096] In order to accurately obtain the test instructions corresponding to the test application descriptor information, in this embodiment, the test instructions corresponding to the smallest unit of test subject object behavior characteristics are named using a simple and easy-to-understand naming method, and then stored in an orderly manner in a test instruction database. Then, the instruction index information of the test application descriptor information is determined, and a test instruction acquisition request carrying at least the instruction index information is sent to the test instruction database, so that the test instruction database searches for the test instructions corresponding to the instruction index information according to the instruction index information; and then receives the test instructions corresponding to the instruction index information sent by the test instruction database.
[0097] In an optional implementation of this embodiment, the test instruction is named using natural language that can characterize the test behavior, test content, test purpose or test effect of the test instruction. For example, for a test instruction that can implement the distribution of distribution resources and orders, its name can be set to "Order Distribution". In this way, the test behavior, test content, test purpose or test effect of the test instruction can be understood directly from the name of the test instruction. At the same time, it is also convenient for testers to find the required test instructions according to the test purpose and test application description information. Therefore, while enhancing the readability of the test instructions, it can also improve the efficiency of obtaining the test instructions, thereby improving the testing efficiency.
[0098] In an optional implementation of this embodiment, the test instructions are stored in an orderly manner in a test instruction database for storing test instructions. For example, the test instructions can be stored in the order of occurrence of the corresponding test subject object behavior characteristics. In this way, when the test instructions are subsequently searched for according to the test application descriptor information, since the test application descriptor information is also generated according to the order of occurrence of the corresponding test subject object behavior characteristics, the test instructions corresponding to the test application descriptor information can be found more quickly, further improving the test instruction acquisition efficiency and testing efficiency.
[0099] Since the test instructions are named using a natural language that can characterize the test behavior, test content, test purpose or test effect of the test instructions, and are stored in the order of occurrence of the corresponding test subject object behavior characteristics, therefore, in this implementation method, when it is necessary to determine the corresponding test instructions based on the test application descriptor information, first determine the instruction index information of the test application descriptor information, and then send a test instruction acquisition request carrying at least the instruction index information to the test instruction database storing the test instructions, so that the test instruction database searches for the test instructions corresponding to the instruction index information according to the instruction index information; and then receive the test instructions corresponding to the instruction index information sent by the test instruction database.
[0100] In an optional implementation of this embodiment, the instruction index information of the test application descriptor is a keyword corresponding to the test application descriptor. For example, if the test application descriptor is "delivery resources delivery order", the corresponding keyword can be set to "order delivery".
[0101] In order to increase the information content of the keywords and enhance the matching degree between the test application descriptor information and the test instructions, a keyword extraction tool may be used to extract the keyword information of the test application descriptor information.
[0102] In an optional implementation of this embodiment, as Figure 4 As shown, the step S103, i.e. combining the test instructions to obtain a test instruction set corresponding to the test request, and executing the test instruction set to obtain a test result, includes the following steps S401-S403:
[0103] In step S401, the execution order of the test application descriptor information is determined;
[0104] In step S402, test instructions corresponding to the test application description sub-information are combined according to the execution order of the test application description sub-information to obtain a test instruction set corresponding to the test request;
[0105] In step S403, the test instruction set is executed to obtain a test result.
[0106] After obtaining the test instructions corresponding to the test application description sub-information, in order to obtain the test instruction set that accurately corresponds to the test request, in this embodiment, the test instructions corresponding to the test application description sub-information are combined accordingly according to the execution order of the test application description sub-information, thereby obtaining the test instruction set corresponding to the test request. The execution order of the test application description sub-information refers to the execution order of the test subject object behavior characteristics related to the test application description sub-information. For example, if the test application description sub-information is respectively distribution resources distribution order, merchant processing order, user generates new order, user receives order goods and completes order, and the execution order of the test subject object behavior characteristics related to the test application description sub-information is user generates new order, merchant processes order, distribution resources distribution order, user receives order goods and completes order, then the test instructions corresponding to the test application description sub-information are combined according to the execution order of the above-mentioned test subject object behavior characteristics.
[0107] In an optional implementation of this embodiment, the method further includes a step of displaying the test result, that is, Figure 5 As shown, the testing method includes the following steps S501-S504:
[0108] In step S501, in response to receiving a test request at least carrying test application description information from a test requester, the test application description information is split to obtain test application description sub-information;
[0109] In step S502, a test instruction corresponding to the test application descriptor is determined according to the test application descriptor information;
[0110] In step S503, the test instructions are combined to obtain a test instruction set corresponding to the test request, and the test instruction set is executed to obtain a test result;
[0111] In step S504, the test result is displayed.
[0112] In order to enable the test personnel to understand the test results in a timely manner, in this embodiment, after the test results are obtained, the test results are also displayed.
[0113] In an optional implementation of this embodiment, the method further includes the step of displaying a test prompt image corresponding to the test request, wherein the test prompt image is used to prompt the test result, that is, Figure 6 As shown, the testing method includes the following steps S601-S605:
[0114] In step S601, in response to receiving a test request sent by a test requester and carrying at least test application description information, the test application description information is split to obtain test application description sub-information;
[0115] In step S602, a test instruction corresponding to the test application description sub-information is determined;
[0116] In step S603, the test instructions are combined to obtain a test instruction set corresponding to the test request, and the test instruction set is executed to obtain a test result;
[0117] In step S604, the test result is displayed;
[0118] In step S605 , a test prompt image corresponding to the test request is displayed, wherein the test prompt image is used to prompt the test result.
[0119] In order to enable the test personnel to understand the test results more intuitively, in this embodiment, in addition to displaying the test results or displaying the test results, a test prompt image corresponding to the test request is also displayed, wherein the test prompt image is used to prompt the test results.
[0120] In an optional implementation of this embodiment, as Figure 7 As shown, the step S605, i.e. displaying a test prompt image corresponding to the test request, includes the following steps S701-S702:
[0121] In step S701, the prompt image information corresponding to the test instruction is obtained;
[0122] In step S702, the prompt image information is combined according to the execution order of the test application description sub-information to obtain and display a test prompt image corresponding to the test request.
[0123] In this implementation, in order to obtain and display the test prompt image corresponding to the test request, the prompt image information corresponding to the test instruction is first obtained, wherein the prompt image information corresponding to the test instruction can be set or generated when the test instruction is generated, and stored in the test instruction database together with the test instruction; then, in the same way as the combination method of the test instructions, the prompt image information is combined according to the execution order of the test application descriptor information, and finally the test prompt image corresponding to the test request is obtained and displayed.
[0124] The following are embodiments of the apparatus disclosed herein, which can be used to execute embodiments of the method disclosed herein.
[0125] Figure 8 The structural block diagram of the test device according to one embodiment of the present disclosure is shown. The device can be implemented as part or all of an electronic device through software, hardware or a combination of both, and can be implemented as a server. Figure 8 As shown, the testing device includes:
[0126] The splitting module 801 is configured to, in response to receiving a test request at least carrying test application description information from a test requester, split the test application description information to obtain test application description sub-information;
[0127] A determination module 802 is configured to determine a test instruction corresponding to the test application description sub-information;
[0128] The execution module 803 is configured to combine the test instructions to obtain a test instruction set corresponding to the test request, and execute the test instruction set to obtain a test result.
[0129] As mentioned above, with the development of Internet technology, more and more businesses or service providers are providing services to users through Internet applications. To improve service quality, it is necessary to frequently test the service content provided by Internet applications to promptly identify and resolve potential problems in Internet applications and ensure the normal operation of Internet applications. However, in existing technologies, test code is often stored in a disorderly manner and the naming is relatively abstract and difficult to understand. This makes it difficult for testers to quickly determine the test content that the test code can perform. Especially for more complex test scenarios, finding and assembling test code takes a lot of time for testers, resulting in wasted manpower costs and reduced testing efficiency.
[0130] In light of the above shortcomings, this embodiment proposes a testing device that stores test instructions in an orderly manner, names them using a simple and easy-to-understand naming method, and parses test requests to obtain test instructions corresponding to the test requests, thereby completing the test. This technical solution can significantly reduce the testing workload of testers, improve the execution efficiency of the test work, and effectively ensure the accuracy of the test.
[0131] In an optional implementation of this embodiment, the test request carries at least test application description information, and may also carry information such as test requester identification information and test requirement information. The test application description information is used to describe test application information, such as test application scenario information, etc. The test requester identification information is used to uniquely identify the test requester. The test requirement information may include, for example, test time requirement information, test duration requirement information, test result return time requirement information, test condition requirement information, and test result return format requirement information.
[0132] Typically, the test application description information includes a variety of application segmentation information. For example, if the test application description information is test application scenario information, the test application scenario information may include a plurality of application scenario links that can constitute the test application scenario. For example, if the test application scenario information is a test application scenario for a user to place an order, the test application scenario includes a plurality of order processing links, such as the user generating a new order, the merchant processing the order, the distribution resources distributing the order, and the user receiving the ordered goods to complete the order. Therefore, in order to improve the application flexibility of the test instructions, in this implementation, a corresponding test instruction is configured for each application link. At the same time, after receiving the test application description information, it is split to obtain a plurality of application segmentation information included in the test application description information, namely, the test application description sub-information. Then, the test instruction corresponding to it is determined according to the test application description sub-information. Finally, the test instructions corresponding to each test application description sub-information are combined to obtain a test instruction set corresponding to the test request. The final test result can be obtained by executing the test instruction set.
[0133] In an optional implementation of this embodiment, the test instruction refers to an instruction that can be executed or run, and can obtain a certain test result after execution and running. For example, the test instruction can be a test code.
[0134] In an optional implementation of this embodiment, as Figure 9 As shown, the splitting module 801 includes:
[0135] The first acquisition submodule 901 is configured to, in response to receiving a test request sent by a test requester and carrying at least test application description information, acquire the test application description information and acquire the behavior characteristics of the test subject object of a preset unit;
[0136] The splitting submodule 902 is configured to split the test application description information according to the test subject object behavior characteristics of the preset unit to obtain test application description sub-information corresponding to the test subject object behavior characteristics of the preset unit.
[0137] In order to obtain more accurate test instructions, in this embodiment, it is necessary to first split the test application description information to obtain test application description sub-information, and then obtain the corresponding test instructions based on the split test application description sub-information. Specifically, after receiving a test request sent by a test requester that carries at least test application description information, the first acquisition sub-module 901 obtains the test application description information therein, and obtains the test subject object behavior characteristics of the preset unit based on the test application description information; the splitting sub-module 902 splits the test application description information according to the test subject object behavior characteristics of the preset unit, and obtains the test application description sub-information corresponding to the test subject object behavior characteristics of the preset unit.
[0138] In an optional implementation of this embodiment, the test subject object behavior feature refers to feature information that can characterize the test subject object behavior characteristics, and the preset unit test subject object behavior feature refers to the smallest, indivisible test subject object behavior feature. For example, for a test application scenario in which a user places an order, the test application scenario includes multiple order processing links such as a user generating a new order, a merchant processing an order, a distribution resource distributing an order, and a user receiving an order product to complete the order. Correspondingly, there are test subject object behavior features such as a user generating a new order, a merchant processing an order, a distribution resource distributing an order, and a user receiving an order product. Based on the above test subject object behavior feature information, the test application scenario in which a user places an order can be split into multiple test application sub-scenarios corresponding to the test subject object behavior feature information, and the test application description information can also be split into test application description sub-information corresponding to the test subject object behavior feature information.
[0139] In an optional implementation of this embodiment, as Figure 10 As shown, the determining module 802 includes:
[0140] The first determining submodule 1001 is configured to determine the instruction index information of the test application description sub-information;
[0141] The sending submodule 1002 is configured to send a test instruction acquisition request carrying at least the instruction index information to the test instruction database, so that the test instruction database searches for a test instruction corresponding to the instruction index information according to the instruction index information;
[0142] The receiving submodule 1003 is configured to receive a test instruction corresponding to the instruction index information sent by the test instruction database.
[0143] In order to accurately obtain the test instructions corresponding to the test application descriptor information, in this embodiment, the test instructions corresponding to the smallest unit of test subject object behavior characteristics are named using a simple and easy-to-understand naming method, and then stored in an orderly manner in a test instruction database. Then, the instruction index information of the test application descriptor information is determined, and a test instruction acquisition request carrying at least the instruction index information is sent to the test instruction database, so that the test instruction database searches for the test instructions corresponding to the instruction index information according to the instruction index information; and then receives the test instructions corresponding to the instruction index information sent by the test instruction database.
[0144] In an optional implementation of this embodiment, the test instruction is named using natural language that can characterize the test behavior, test content, test purpose or test effect of the test instruction. For example, for a test instruction that can implement the distribution of distribution resources and orders, its name can be set to "Order Distribution". In this way, the test behavior, test content, test purpose or test effect of the test instruction can be understood directly from the name of the test instruction. At the same time, it is also convenient for testers to find the required test instructions according to the test purpose and test application description information. Therefore, while enhancing the readability of the test instructions, it can also improve the efficiency of obtaining the test instructions, thereby improving the testing efficiency.
[0145] In an optional implementation of this embodiment, the test instructions are stored in an orderly manner in a test instruction database for storing test instructions. For example, the test instructions can be stored in the order of occurrence of the corresponding test subject object behavior characteristics. In this way, when the test instructions are subsequently searched for according to the test application descriptor information, since the test application descriptor information is also generated according to the order of occurrence of the corresponding test subject object behavior characteristics, the test instructions corresponding to the test application descriptor information can be found more quickly, further improving the test instruction acquisition efficiency and testing efficiency.
[0146] Since the test instructions are named using a natural language that can characterize the test behavior, test content, test purpose or test effect of the test instructions, and are stored in the order of occurrence of the corresponding test subject object behavior characteristics, therefore, in this implementation method, when it is necessary to determine the corresponding test instructions based on the test application descriptor information, first determine the instruction index information of the test application descriptor information, and then send a test instruction acquisition request carrying at least the instruction index information to the test instruction database storing the test instructions, so that the test instruction database searches for the test instructions corresponding to the instruction index information according to the instruction index information; and then receive the test instructions corresponding to the instruction index information sent by the test instruction database.
[0147] In an optional implementation of this embodiment, the instruction index information of the test application descriptor is a keyword corresponding to the test application descriptor. For example, if the test application descriptor is "delivery resources delivery order", the corresponding keyword can be set to "order delivery".
[0148] In order to increase the information content of the keywords and enhance the matching degree between the test application descriptor information and the test instructions, a keyword extraction tool may be used to extract the keyword information of the test application descriptor information.
[0149] In an optional implementation of this embodiment, as Figure 11 As shown, the execution module 803 includes:
[0150] The second determining submodule 1101 is configured to determine the execution order of the test application description sub-information;
[0151] A combining submodule 1102 is configured to combine the test instructions corresponding to the test application description sub-information according to the execution order of the test application description sub-information to obtain a test instruction set corresponding to the test request;
[0152] The execution submodule 1103 is configured to execute the test instruction set to obtain a test result.
[0153] After obtaining the test instructions corresponding to the test application description sub-information, in order to obtain the test instruction set that accurately corresponds to the test request, in this embodiment, the test instructions corresponding to the test application description sub-information are combined accordingly according to the execution order of the test application description sub-information, thereby obtaining the test instruction set corresponding to the test request. The execution order of the test application description sub-information refers to the execution order of the test subject object behavior characteristics related to the test application description sub-information. For example, if the test application description sub-information is respectively distribution resources distribution order, merchant processing order, user generates new order, user receives order goods and completes order, and the execution order of the test subject object behavior characteristics related to the test application description sub-information is user generates new order, merchant processes order, distribution resources distribution order, user receives order goods and completes order, then the test instructions corresponding to the test application description sub-information are combined according to the execution order of the above-mentioned test subject object behavior characteristics.
[0154] In an optional implementation of this embodiment, the device further includes a portion for displaying the test result, such as Figure 12 As shown, the testing device includes:
[0155] The splitting module 1201 is configured to, in response to receiving a test request sent by a test requester and carrying at least test application description information, split the test application description information to obtain test application description sub-information;
[0156] A determination module 1202 is configured to determine a test instruction corresponding to the test application description sub-information;
[0157] An execution module 1203 is configured to combine the test instructions to obtain a test instruction set corresponding to the test request, and execute the test instruction set to obtain a test result;
[0158] The first display module 1204 is configured to display the test result.
[0159] In order to enable the test personnel to understand the test results in a timely manner, in this embodiment, after the test results are obtained, a first display module 1204 is further provided to display the test results.
[0160] In an optional implementation of this embodiment, the device further includes a portion for displaying a test prompt image corresponding to the test request, wherein the test prompt image is used to prompt the test result, that is, Figure 13 As shown, the testing device includes:
[0161] The splitting module 1301 is configured to, in response to receiving a test request at least carrying test application description information from a test requester, split the test application description information to obtain test application description sub-information;
[0162] A determination module 1302 is configured to determine a test instruction corresponding to the test application description sub-information;
[0163] An execution module 1303 is configured to combine the test instructions to obtain a test instruction set corresponding to the test request, and execute the test instruction set to obtain a test result;
[0164] A first display module 1304 is configured to display the test result;
[0165] The second display module 1305 is configured to display a test prompt image corresponding to the test request, wherein the test prompt image is used to prompt the test result.
[0166] In order to enable the test personnel to understand the test results more intuitively, in this embodiment, in addition to the first display module 1304 displaying the test results or displaying the test results, a second display module 1305 is also provided to display a test prompt image corresponding to the test request, wherein the test prompt image is used to prompt the test results.
[0167] In an optional implementation of this embodiment, as Figure 14 As shown, the second display module 1305 includes:
[0168] The second acquisition submodule 1401 is configured to acquire prompt image information corresponding to the test instruction;
[0169] The display submodule 1402 is configured to combine the prompt image information according to the execution order of the test application description sub-information, and obtain and display the test prompt image corresponding to the test request.
[0170] In this implementation, in order to obtain and display the test prompt image corresponding to the test request, the second acquisition submodule 1401 obtains the prompt image information corresponding to the test instruction, wherein the prompt image information corresponding to the test instruction can be set or generated when the test instruction is generated, and stored in the test instruction database together with the test instruction; the display submodule 1402 combines the prompt image information according to the execution order of the test application description sub-information in the same way as the test instructions, and finally obtains and displays the test prompt image corresponding to the test request.
[0171] The present disclosure also discloses an electronic device, Figure 15 A structural block diagram of an electronic device according to an embodiment of the present disclosure is shown. Figure 15 As shown, the electronic device 1500 includes a memory 1501 and a processor 1502; wherein,
[0172] The memory 1501 is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor 1502 to implement the above method steps.
[0173] Figure 16 A schematic structural diagram of a computer system suitable for implementing the testing method according to an embodiment of the present disclosure.
[0174] like Figure 16As shown, the computer system 1600 includes a central processing unit (CPU) 1601, which can execute various processes in the above-described embodiments according to a program stored in a read-only memory (ROM) 1602 or a program loaded from a storage unit 1608 into a random access memory (RAM) 1603. Various programs and data required for the operation of the system 1600 are also stored in the RAM 1603. The CPU 1601, the ROM 1602, and the RAM 1603 are connected to each other via a bus 1604. An input / output (I / O) interface 1605 is also connected to the bus 1604.
[0175] The following components are connected to the I / O interface 1605: an input section 1606 including a keyboard, a mouse, and the like; an output section 1607 including devices such as a cathode ray tube (CRT), a liquid crystal display (LCD), and speakers; a storage section 1608 including a hard disk; and a communication section 1609 including a network interface card such as a LAN card or a modem. The communication section 1609 performs communication processing via a network such as the Internet. A drive 1610 is also connected to the I / O interface 1605 as needed. Removable media 1611, such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory, is installed in the drive 1610 as needed, so that computer programs read therefrom can be installed into the storage section 1608 as needed.
[0176] In particular, according to embodiments of the present disclosure, the methods described above can be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program tangibly embodied on a computer-readable medium, the computer program comprising program code for executing the above-described testing methods. In such embodiments, the computer program can be downloaded and installed from a network via communication portion 1609 and / or installed from removable media 1611.
[0177] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the diagram or block diagram can represent a module, program segment or part of the code, and the module, program segment or part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, as well as the combination of boxes in the block diagram and / or flow chart, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or can be implemented using a combination of dedicated hardware and computer instructions.
[0178] The units or modules described in the embodiments of the present disclosure may be implemented in software or hardware. The units or modules described may also be provided in a processor, and the names of these units or modules do not, in certain circumstances, limit the units or modules themselves.
[0179] As another aspect, the present disclosure further provides a computer-readable storage medium. This computer-readable storage medium may be included in the apparatus described in the above embodiments, or may be a standalone computer-readable storage medium not incorporated into the apparatus. The computer-readable storage medium stores one or more programs, which are used by one or more processors to execute the methods described in the present disclosure.
[0180] The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of the invention herein is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but also encompasses other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the inventive concept. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.
Claims
1. A testing method, It is characterized in that include: In response to receiving a test request at least carrying test application description information sent by a test requester, splitting the test application description information to obtain test application description sub-information; Determine the test instruction corresponding to the test application description sub-information; Combining the test instructions to obtain a test instruction set corresponding to the test request, and executing the test instruction set to obtain a test result; The step of responding to receiving a test request at least carrying test application description information from a test requester, splitting the test application description information to obtain test application description sub-information includes: In response to receiving a test request sent by a test requester and carrying at least test application description information, obtaining the test application description information and obtaining a test subject object behavior feature of a preset unit; The test application description information is split according to the test subject object behavior characteristics of the preset unit to obtain the test application description sub-information corresponding to the test subject object behavior characteristics of the preset unit; The test instructions are named using natural language and stored in the order in which the corresponding test subject object behavior characteristics occur.
2. The test method according to claim 1, It is characterized in that The determining, according to the test application description sub-information, a test instruction corresponding thereto, comprises: Determine instruction index information of the test application descriptor information; Sending a test instruction acquisition request carrying at least the instruction index information to a test instruction database, so that the test instruction database searches for a test instruction corresponding to the instruction index information according to the instruction index information; Receive a test instruction corresponding to the instruction index information sent by the test instruction database.
3. The test method according to claim 2, It is characterized in that The instruction index information of the test application description sub-information is a keyword corresponding to the test application description sub-information.
4. The testing method according to claim 1, It is characterized in that The combining the test instructions to obtain a test instruction set corresponding to the test request, and executing the test instruction set to obtain a test result, includes: Determining the execution order of the test application descriptor information; Combining the test instructions corresponding to the test application description sub-information according to the execution order of the test application description sub-information to obtain a test instruction set corresponding to the test request; Execute the test instruction set to obtain a test result.
5. The testing method according to claim 1, It is characterized in that Also includes: The test results are displayed.
6. The test method according to claim 5, It is characterized in that Also includes: A test prompt image corresponding to the test request is displayed, wherein the test prompt image is used to prompt the test result.
7. The testing method according to claim 6, It is characterized in that The displaying of a test prompt image corresponding to the test request includes: Acquire prompt image information corresponding to the test instruction; The prompt image information is combined according to the execution order of the test application description sub-information to obtain and display a test prompt image corresponding to the test request.
8. A testing device, It is characterized in that include: a splitting module configured to, in response to receiving a test request at least carrying test application description information sent by a test requester, split the test application description information to obtain test application description sub-information; A determination module, configured to determine a test instruction corresponding to the test application description sub-information according to the test application description sub-information; an execution module, configured to combine the test instructions to obtain a test instruction set corresponding to the test request, and execute the test instruction set to obtain a test result; The splitting module comprises: A first acquisition submodule is configured to, in response to receiving a test request at least carrying test application description information sent by a test requester, acquire the test application description information and acquire the behavior characteristics of the test subject object of a preset unit; A splitting submodule is configured to split the test application description information according to the test subject object behavior characteristics of the preset unit to obtain the test application description sub-information corresponding to the test subject object behavior characteristics of the preset unit; The test instructions are named using natural language and stored in the order in which the corresponding test subject object behavior characteristics occur.
9. The testing device according to claim 8, It is characterized in that The determination module comprises: A first determining submodule is configured to determine instruction index information of the test application description subinformation; A sending submodule is configured to send a test instruction acquisition request carrying at least the instruction index information to a test instruction database, so that the test instruction database searches for a test instruction corresponding to the instruction index information according to the instruction index information; The receiving submodule is configured to receive a test instruction corresponding to the instruction index information sent by the test instruction database.
10. The testing device according to claim 9, It is characterized in that The instruction index information of the test application description sub-information is a keyword corresponding to the test application description sub-information.
11. The testing device according to claim 8, It is characterized in that The execution module includes: A second determination submodule is configured to determine the execution order of the test application description sub-information; a combining submodule, configured to combine the test instructions corresponding to the test application description sub-information according to the execution order of the test application description sub-information to obtain a test instruction set corresponding to the test request; The execution submodule is configured to execute the test instruction set to obtain a test result.
12. The testing device according to claim 8, It is characterized in that Also includes: The first display module is configured to display the test result.
13. The testing device according to claim 12, It is characterized in that Also includes: The second display module is configured to display a test prompt image corresponding to the test request, wherein the test prompt image is used to prompt the test result.
14. The testing device according to claim 13, It is characterized in that The second display module comprises: A second acquisition submodule is configured to acquire prompt image information corresponding to the test instruction; The display submodule is configured to combine the prompt image information according to the execution order of the test application description sub-information, and obtain and display the test prompt image corresponding to the test request.
15. An electronic device, It is characterized in that The method comprises a memory and at least one processor; wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the at least one processor to implement the method steps described in any one of claims 1 to 7.
16. A computer-readable storage medium having computer instructions stored thereon, It is characterized in that When the computer instructions are executed by a processor, the method steps described in any one of claims 1 to 7 are implemented.
