Test object generation method, device, electronic device and computer storage medium

By designing the test object generation unit, the test objects corresponding to the test object generation request are generated, which solves the problem of inefficient testing in the existing technology and realizes an efficient test workflow.

CN112685286BActive Publication Date: 2024-12-31RAJAX NETWORK &TECHNOLOGY (SHANGHAI) CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN201910995537.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-10-18
Publication Date
2024-12-31
Estimated Expiration
2039-10-18

AI Technical Summary

Technical Problem

The existing technology is inefficient during testing and cannot be applied to test work with large amounts of data. It is necessary to detect the operating status of the application by performing real operation processes.

Method used

Design a test object generation unit to generate corresponding test objects based on the test object generation request, reducing the workload of testers and the time to execute real operation processes.

Benefits of technology

It improves the execution efficiency of test work and can be effectively applied to test work with large amounts of data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112685286B_ABST
    Figure CN112685286B_ABST
Patent Text Reader

Abstract

The disclosed embodiments disclose a test object generation method, device, electronic device and computer storage medium, wherein the test object generation method comprises: in response to receiving a test object generation request sent by a test object generation requester, generating a test object parameter acquisition request, wherein the test object generation request carries a test object identifier; sending the test object parameter acquisition request to the test object generation requester; in response to receiving the test object parameters returned by the test object generation requester, generating a test object corresponding to the test object identifier according to the test object parameters. This technical solution greatly saves the test workload of testers with the help of a test object generation unit, avoids the time spent on executing real operation processes, thereby greatly improving the execution efficiency of the test work, and can therefore be effectively applied to test work with large amounts of data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of testing technology, and in particular to a test object generation method, device, electronic device and computer storage medium. Background Art

[0002] With the development of Internet technology, more and more businesses or service providers provide services to users through Internet applications. In order to make the services provided more complete, businesses or service providers usually frequently add, delete, and update the content of the application. At the same time, in order to ensure the normal operation of the new version of the application, it is necessary to test the new version of the application after the application is changed to detect the running status of the new version of the application. When testing, the existing technology usually implements the test by executing a real operation process. For example, when creating a test order, the tester will create an order according to the real order process to determine whether the order process is normal. Although this test method can ensure the accuracy of the test, the test method is inefficient and cannot be applied to testing work with large amounts of data. Summary of the invention

[0003] Embodiments of the present disclosure provide a test object generation method, device, electronic device, and computer storage medium.

[0004] In a first aspect, an embodiment of the present disclosure provides a method for generating a test object.

[0005] Specifically, the test object generation method includes:

[0006] In response to receiving a test object generation request sent by a test object generation requester, generating a test object parameter acquisition request, wherein the test object generation request carries a test object identifier;

[0007] Sending the test object parameter acquisition request to the test object generation requester;

[0008] In response to receiving the test object parameters returned by the test object generation requester, a test object corresponding to the test object identifier is generated according to the test object parameters.

[0009] In combination with the first aspect, in a first implementation of the first aspect of the present disclosure, in response to receiving a test object generation request sent by a test object generation requester, generating a test object parameter acquisition request includes:

[0010] In response to receiving a test object generation request sent by a test object generation requester, calling a test object generation interface of a test object generation unit;

[0011] In response to the test object generation interface being called, a test object parameter acquisition request is generated.

[0012] In combination with the first aspect and the first implementation manner of the first aspect, in a second implementation manner of the first aspect of the present disclosure, the test object parameter acquisition request is a test object parameter acquisition page.

[0013] In combination with the first aspect, the first implementation manner of the first aspect, and the second implementation manner of the first aspect, in a third implementation manner of the first aspect of the present disclosure, sending the test object parameter acquisition request to the test object generation requester is implemented as follows:

[0014] The test object parameter acquisition page is displayed to the test object generation requester.

[0015] In combination with the first aspect, the first implementation of the first aspect, the second implementation of the first aspect, and the third implementation of the first aspect, the fourth implementation of the first aspect of the present disclosure further includes:

[0016] The test object information is sent to the test object generation requester, so that the test object performs a preset test operation according to the test object.

[0017] In a second aspect, an embodiment of the present disclosure provides a method for generating a test object.

[0018] Specifically, the test object generation method includes:

[0019] Sending a test object generation request to a server, wherein the test object generation request carries a test object identifier;

[0020] In response to receiving the test object parameter acquisition request sent by the server, sending the test object parameters to the server;

[0021] Receive test object information corresponding to the test object identifier sent by the server, wherein the test object is generated by the server according to the test object parameters.

[0022] In combination with the second aspect, in a first implementation manner of the second aspect of the present disclosure, the test object parameter acquisition request is a test object parameter acquisition page.

[0023] In combination with the second aspect and the first implementation of the second aspect, the second implementation of the second aspect of the present disclosure further includes:

[0024] A preset test operation is performed according to the test object.

[0025] In a third aspect, a test object generating device is provided in an embodiment of the present disclosure.

[0026] Specifically, the test object generating device includes:

[0027] A first generating module is configured to generate a test object parameter acquisition request in response to receiving a test object generation request sent by a test object generation requester, wherein the test object generation request carries a test object identifier;

[0028] A first sending module is configured to send the test object parameter acquisition request to the test object generation requester;

[0029] The second generating module is configured to generate a test object corresponding to the test object identifier according to the test object parameters in response to receiving the test object parameters returned by the test object generation requester.

[0030] In combination with the third aspect, in a first implementation of the third aspect of the present disclosure, the first generating module includes:

[0031] A calling submodule, configured to call a test object generation interface of a test object generation unit in response to receiving a test object generation request sent by a test object generation requester;

[0032] The generating submodule is configured to generate a test object parameter acquisition request in response to the test object generating interface being called.

[0033] In combination with the third aspect and the first implementation manner of the third aspect, in a second implementation manner of the third aspect of the present disclosure, the test object parameter acquisition request is a test object parameter acquisition page.

[0034] In combination with the third aspect, the first implementation manner of the third aspect, and the second implementation manner of the third aspect, in a third implementation manner of the third aspect of the present disclosure, the first sending module is configured as follows:

[0035] The test object parameter acquisition page is displayed to the test object generation requester.

[0036] In combination with the third aspect, the first implementation of the third aspect, the second implementation of the third aspect, and the third implementation of the third aspect, the present disclosure, in a fourth implementation of the third aspect, further includes:

[0037] The second sending module is configured to send the test object information to the test object generation requester, so that it performs a preset test operation according to the test object.

[0038] In a fourth aspect, a test object generating device is provided in an embodiment of the present disclosure.

[0039] Specifically, the test object generating device includes:

[0040] A third sending module is configured to send a test object generation request to the server, wherein the test object generation request carries a test object identifier;

[0041] a fourth sending module, configured to send the test object parameters to the server in response to receiving the test object parameter acquisition request sent by the server;

[0042] The receiving module is configured to receive the test object information corresponding to the test object identifier sent by the server, wherein the test object is generated by the server according to the test object parameters.

[0043] In combination with the fourth aspect, in a first implementation manner of the fourth aspect of the present disclosure, the test object parameter acquisition request is a test object parameter acquisition page.

[0044] In combination with the fourth aspect and the first implementation of the fourth aspect, the second implementation of the fourth aspect of the present disclosure further includes:

[0045] The test module is configured to perform a preset test operation according to the test object.

[0046] In a third aspect, an embodiment of the present disclosure provides an electronic device, comprising a memory and a 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 processor to implement the method steps of the above-mentioned test object generation method.

[0047] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium for storing computer instructions used by a test object generation device, which includes computer instructions involved in the test object generation device for executing the above-mentioned test object generation method.

[0048] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:

[0049] The above technical solution designs a test object generation unit, and uses the test object generation unit to generate a test object corresponding to the test object generation request according to the test object generation request of the requesting party. With the help of the test object generation unit, the technical solution greatly saves the test workload of the tester and avoids the time spent on executing the real operation process, thereby greatly improving the execution efficiency of the test work, and can be effectively applied to the test work with large data volume.

[0050] 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 present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] 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:

[0052] Figure 1 A flowchart showing a test object generation method according to an embodiment of the present disclosure is shown;

[0053] Figure 2 Show according to Figure 1 A flowchart of step S101 of the test object generation method of the illustrated embodiment;

[0054] Figure 3 A flowchart showing a test object generation method according to another embodiment of the present disclosure;

[0055] Figure 4 A flowchart showing a test object generation method according to another embodiment of the present disclosure;

[0056] Figure 5 A flowchart showing a test object generation method according to another embodiment of the present disclosure;

[0057] Figure 6 A structural block diagram of a test object generating device according to an embodiment of the present disclosure is shown;

[0058] Figure 7 Show according to Figure 6 A structural block diagram of a first generation module 601 of a test object generation device according to the embodiment shown;

[0059] Figure 8 A structural block diagram of a test object generating device according to another embodiment of the present disclosure is shown;

[0060] Fig. 9 A structural block diagram of a test object generating device according to another embodiment of the present disclosure is shown;

[0061] Fig.10 A structural block diagram of a test object generating device according to another embodiment of the present disclosure is shown;

[0062] Fig.11 A structural block diagram of an electronic device according to an embodiment of the present disclosure is shown;

[0063] Fig.12 It is a structural diagram of a computer system suitable for implementing a test object generation method according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0064] 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.

[0065] 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, behaviors, components, parts, or a combination thereof disclosed in the present specification, and are not intended to exclude the possibility that one or more other features, numbers, steps, behaviors, components, parts, or a combination thereof exist or are added.

[0066] It should also be noted that, in the absence of conflict, the embodiments and features in 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.

[0067] The technical solution provided by the embodiment of the present disclosure designs a test object generation unit, and uses the test object generation unit to generate a test object corresponding to the test object generation request according to the test object generation request of the requesting party. With the help of the test object generation unit, the technical solution greatly saves the test workload of the tester and avoids the time spent on executing the real operation process, thereby greatly improving the execution efficiency of the test work, and can be effectively applied to the test work with large data volume.

[0068] Figure 1 The flowchart of the test object generation method according to an embodiment of the present disclosure is shown, which can be applied to the server side. Figure 1 As shown, the test object generation method includes the following steps S101-S103:

[0069] In step S101, in response to receiving a test object generation request sent by a test object generation requester, a test object parameter acquisition request is generated, wherein the test object generation request carries a test object identifier;

[0070] In step S102, the test object parameter acquisition request is sent to the test object generation requester;

[0071] In step S103, in response to receiving the test object parameters returned by the test object generation requester, a test object corresponding to the test object identifier is generated according to the test object parameters.

[0072] As mentioned above, with the development of Internet technology, more and more businesses or service providers provide services to users through Internet applications. In order to make the services provided more complete, businesses or service providers usually frequently add, delete, and update the content of the application. At the same time, in order to ensure the normal operation of the new version of the application, it is necessary to test the new version of the application after the application is changed to detect the running status of the new version of the application. When testing, the existing technology usually implements the test by executing a real operation process. For example, when creating a test order, the tester will create an order according to the real order process to determine whether the order process is normal. Although this test method can ensure the accuracy of the test, the test method is inefficient and cannot be applied to testing work with large amounts of data.

[0073] In view of the above defects, in this embodiment, a test object generation method is proposed, which designs a test object generation unit, and uses the test object generation unit to generate a test object corresponding to the test object generation request according to the test object generation request of the requesting party. With the help of the test object generation unit, this technical solution greatly saves the test workload of the tester and avoids the time spent on executing the real operation process, thereby greatly improving the execution efficiency of the test work, and can be effectively applied to the test work with large data volume.

[0074] In an optional implementation of this embodiment, the test object refers to an object that is generated or created and is used to detect whether the operation or functioning of an application, a running program or a running environment is normal. For example, the test object can be an order, an activity, an account, a product, a store or other product or service provider, a delivery task, delivery status, an order evaluation task, an order or operation troubleshooting task, etc.

[0075] In an optional implementation of this embodiment, the test object generation requester refers to the subject object requesting the generation of the test object, such as a machine device that performs functions based on the tester's operation, or a device that automatically executes according to rules, including but not limited to software, hardware, client, service platform, etc.

[0076] In an optional implementation of this embodiment, the test object generation request carries a test object identifier for identifying the test object generated according to the test object generation request. For example, if the test object is an order, the test object identifier may be an order number.

[0077] In an optional implementation of this embodiment, the test object parameters refer to the parameters required to generate the test object. For example, if the test object is an order, the test object parameters may include one or more of the following parameters: order generation time, order payment time, order delivery time, order completion time, order content, order amount, order discount information, order delivery information, order transaction information, etc. After obtaining the test object parameters, a test object corresponding to the test object identifier can be generated according to the test object parameters.

[0078] In an optional implementation of this embodiment, Figure 2 As shown, the step S101, i.e., generating a test object parameter acquisition request in response to receiving a test object generation request sent by a test object generation requester, includes the following steps S201-S202:

[0079] In step S201, in response to receiving a test object generation request sent by a test object generation requester, a test object generation interface of a test object generation unit is called;

[0080] In step S202, in response to the test object generation interface being called, a test object parameter acquisition request is generated.

[0081] In order to save the tester's testing time, reduce the tester's testing workload, improve the execution efficiency of the testing work, and avoid the testing process of real operations, in this implementation method, a test object generation unit is designed to utilize the test object generation unit to generate a corresponding test object according to the test object generation request of the test object generation requester.

[0082] In an optional implementation of this embodiment, the test object generation unit is a framework unit generated based on flask and tornado, which includes one or more unit modules and corresponding module interfaces that can realize certain functions, and is provided with an interface specification, based on which different unit modules can be called to realize corresponding functions, and a visual interactive interface can be provided. Among them, flask is a lightweight Web application framework written in Python language, which has strong customization. Users can add corresponding functions according to their own needs, which can enrich and expand functions while keeping the core functions simple; tornado is an open source version of Web server software, which is a fast non-blocking server.

[0083] Therefore, in this implementation, when a test object generation request is received from a test object generation requester, a test object parameter acquisition request can be generated by calling a test object generation interface of a test object generation unit to acquire parameters required for generating a test object.

[0084] As mentioned above, the test object generation unit can provide a visual interactive interface. Therefore, in an optional implementation of this embodiment, the generated test object parameter acquisition request can be a test object parameter acquisition page. At this time, the step S102, that is, the step of sending the test object parameter acquisition request to the test object generation requester, can be implemented as: displaying the test object parameter acquisition page to the test object generation requester. The test object parameter acquisition page may include the following content: the test object parameter name, the test object parameter input box corresponding to the test object parameter name, the test object parameter optional value range, etc. Therefore, in this page, the test object generation requester can interactively input the parameters required for the test object it wants to create.

[0085] In an optional implementation of the present embodiment, the test object parameter acquisition page also includes a default value of the test object parameter. If the expected value of the test object parameter of the test object generation requester is different from the default value of the test object parameter, the default value of the test object parameter may be modified to the expected value of the test object parameter. If the expected value of the test object parameter of the test object generation requester is the same as the default value of the test object parameter, the default value of the test object parameter may be retained unchanged.

[0086] In an optional implementation of this embodiment, the method further includes the step of sending the test object information to the test object generation requester so that the test object generates a request for performing a preset test operation according to the test object. Figure 3 As shown, the test object generation method includes the following steps S301-S304:

[0087] In step S301, in response to receiving a test object generation request sent by a test object generation requester, a test object parameter acquisition request is generated, wherein the test object generation request carries a test object identifier;

[0088] In step S302, the test object parameter acquisition request is sent to the test object generation requester;

[0089] In step S303, in response to receiving the test object parameters returned by the test object generation requester, generating a test object corresponding to the test object identifier according to the test object parameters;

[0090] In step S304, the test object information is sent to the test object generation requester so that the test object generation requester performs a preset test operation according to the test object.

[0091] After generating the test object corresponding to the test object identifier sent by the test object generation requester, the corresponding test object information may be sent to the test object generation requester so that the test object performs a preset test operation according to the test object.

[0092] Figure 4 A flowchart of a test object generation method according to another embodiment of the present disclosure is shown, which can be applied to a client. Figure 4 As shown, the test object generation method includes the following steps S401-S403:

[0093] In step S401, a test object generation request is sent to a server, so that the server calls a test object generation interface of a test object generation unit according to the test object generation request to generate a test object parameter acquisition request, wherein the test object generation request carries a test object identifier;

[0094] In step S402, in response to receiving the test object parameter acquisition request sent by the server, the test object parameters are sent to the server;

[0095] In step S403, the test object information corresponding to the test object identifier sent by the server is received, wherein the test object is generated by the server according to the test object parameters.

[0096] As mentioned above, with the development of Internet technology, more and more businesses or service providers provide services to users through Internet applications. In order to make the services provided more complete, businesses or service providers usually frequently add, delete, and update the content of the application. At the same time, in order to ensure the normal operation of the new version of the application, it is necessary to test the new version of the application after the application is changed to detect the running status of the new version of the application. When testing, the existing technology usually implements the test by executing a real operation process. For example, when creating a test order, the tester will create an order according to the real order process to determine whether the order process is normal. Although this test method can ensure the accuracy of the test, the test method is inefficient and cannot be applied to testing work with large amounts of data.

[0097] In view of the above defects, in this embodiment, a test object generation method is proposed, which generates a test object corresponding to the test object generation request according to the test object generation request by means of a test object generation unit designed by the server. This technical solution can greatly save the test workload of testers and avoid the time spent on executing the real operation process, thereby greatly improving the execution efficiency of the test work, and can be effectively applied to the test work with large data volume.

[0098] In an optional implementation of this embodiment, the server is provided with a test object generation unit, wherein the test object generation unit is a framework unit generated based on flask and tornado, which includes one or more unit modules that can realize certain functions and corresponding module interfaces, and is provided with an interface specification. Based on the interface specification, different unit modules can be called to realize corresponding functions, and a visual interactive interface can be provided.

[0099] Therefore, in an optional implementation of this embodiment, the test object parameter acquisition request may be a test object parameter acquisition page. The test object parameter acquisition page may include the following contents: a test object parameter name, a test object parameter input box corresponding to the test object parameter name, a test object parameter optional value range, etc. Therefore, in this page, the client can interactively input the parameters required for the test object it wants to create.

[0100] In an optional implementation of the present embodiment, the test object parameter acquisition page also includes a default value of the test object parameter. If the client's expected value of the test object parameter is different from the default value of the test object parameter, the default value of the test object parameter may be modified to the expected value of the test object parameter. If the client's expected value of the test object parameter is the same as the default value of the test object parameter, the default value of the test object parameter may be retained unchanged.

[0101] In an optional implementation of this embodiment, the method further includes: performing a preset test operation according to the test object, that is, Figure 5 As shown, the test object generation method includes the following steps S501-S504:

[0102] In step S501, a test object generation request is sent to a server, so that the server calls a test object generation interface of a test object generation unit according to the test object generation request to generate a test object parameter acquisition request, wherein the test object generation request carries a test object identifier;

[0103] In step S502, in response to receiving the test object parameter acquisition request sent by the server, the test object parameters are sent to the server;

[0104] In step S503, receiving the test object information corresponding to the test object identifier sent by the server, wherein the test object is generated by the server according to the test object parameters;

[0105] In step S504, a preset test operation is performed according to the test object.

[0106] After receiving the test object information corresponding to the test object identifier sent by the server, a preset test operation may be performed according to the generated test object.

[0107] Figure 4-Figure 5 Some technical terms in the embodiments shown in the figure are similar to those in the embodiment shown in the figure. Figure 1-Figure 3 Some technical terms in the embodiments shown are the same or similar. For the explanation and description of these technical terms, please refer to the above Figure 1-Figure 3 The description of the illustrated embodiments will not be repeated in this disclosure.

[0108] The following are embodiments of the apparatus of the present disclosure, which can be used to execute embodiments of the method of the present disclosure.

[0109] Figure 6 The structure block diagram of the test object generation device according to one embodiment of the present disclosure is shown. The device can be implemented as part or all of the electronic device through software, hardware or a combination of both, and can be implemented as a server. Figure 6 As shown, the test object generating device includes:

[0110] The first generating module 601 is configured to generate a test object parameter acquisition request in response to receiving a test object generation request sent by a test object generation requester, wherein the test object generation request carries a test object identifier;

[0111] A first sending module 602 is configured to send the test object parameter acquisition request to the test object generation requester;

[0112] The second generating module 603 is configured to generate a test object corresponding to the test object identifier according to the test object parameters in response to receiving the test object parameters returned by the test object generation requester.

[0113] As mentioned above, with the development of Internet technology, more and more businesses or service providers provide services to users through Internet applications. In order to make the services provided more complete, businesses or service providers usually frequently add, delete, and update the content of the application. At the same time, in order to ensure the normal operation of the new version of the application, it is necessary to test the new version of the application after the application is changed to detect the running status of the new version of the application. When testing, the existing technology usually implements the test by executing a real operation process. For example, when creating a test order, the tester will create an order according to the real order process to determine whether the order process is normal. Although this test method can ensure the accuracy of the test, the test method is inefficient and cannot be applied to testing work with large amounts of data.

[0114] In view of the above defects, in this embodiment, a test object generation device is proposed, which designs a test object generation unit and uses the test object generation unit to generate a test object corresponding to the test object generation request according to the test object generation request of the requesting party. With the help of the test object generation unit, this technical solution greatly saves the test workload of the tester and avoids the time spent on executing the real operation process, thereby greatly improving the execution efficiency of the test work, and can be effectively applied to the test work with large data volume.

[0115] In an optional implementation of this embodiment, the test object refers to an object that is generated or created and is used to detect whether the operation or functioning of an application, a running program or a running environment is normal. For example, the test object can be an order, an activity, an account, a product, a store or other product or service provider, a delivery task, delivery status, an order evaluation task, an order or operation troubleshooting task, etc.

[0116] In an optional implementation of this embodiment, the test object generation requester refers to the subject object requesting the generation of the test object, such as a machine device that performs functions based on the tester's operation, or a device that automatically executes according to rules, including but not limited to software, hardware, client, service platform, etc.

[0117] In an optional implementation of this embodiment, the test object generation request carries a test object identifier for identifying the test object generated according to the test object generation request. For example, if the test object is an order, the test object identifier may be an order number.

[0118] In an optional implementation of this embodiment, the test object parameters refer to the parameters required to generate the test object. For example, if the test object is an order, the test object parameters may include one or more of the following parameters: order generation time, order payment time, order delivery time, order completion time, order content, order amount, order discount information, order delivery information, order transaction information, etc. After obtaining the test object parameters, a test object corresponding to the test object identifier can be generated according to the test object parameters.

[0119] In an optional implementation of this embodiment, Figure 7 As shown, the first generating module 601 includes:

[0120] The calling submodule 701 is configured to call the test object generation interface of the test object generation unit in response to receiving the test object generation request sent by the test object generation requester;

[0121] The generation submodule 702 is configured to generate a test object parameter acquisition request in response to the test object generation interface being called.

[0122] In order to save the tester's testing time, reduce the tester's testing workload, improve the execution efficiency of the testing work, and avoid the testing process of real operations, in this implementation method, a test object generation unit is designed to utilize the test object generation unit to generate a corresponding test object according to the test object generation request of the test object generation requester.

[0123] In an optional implementation of this embodiment, the test object generation unit is a framework unit generated based on flask and tornado, which includes one or more unit modules and corresponding module interfaces that can realize certain functions, and is provided with an interface specification, based on which different unit modules can be called to realize corresponding functions, and a visual interactive interface can be provided. Among them, flask is a lightweight Web application framework written in Python language, which has strong customization. Users can add corresponding functions according to their own needs, which can enrich and expand functions while keeping the core functions simple; tornado is an open source version of Web server software, which is a fast non-blocking server.

[0124] Therefore, in this implementation, when a test object generation request is received from a test object generation requester, a test object parameter acquisition request can be generated by calling a test object generation interface of a test object generation unit to acquire parameters required for generating a test object.

[0125] As mentioned above, the test object generation unit can provide a visual interactive interface. Therefore, in an optional implementation of this embodiment, the generated test object parameter acquisition request can be a test object parameter acquisition page. At this time, the first sending module 602 can be configured to: display the test object parameter acquisition page to the test object generation requester. The test object parameter acquisition page may include the following content: a test object parameter name, a test object parameter input box corresponding to the test object parameter name, a test object parameter optional value range, etc. Therefore, in this page, the test object generation requester can interactively input the parameters required for the test object it wants to create.

[0126] In an optional implementation of the present embodiment, the test object parameter acquisition page also includes a default value of the test object parameter. If the expected value of the test object parameter of the test object generation requester is different from the default value of the test object parameter, the default value of the test object parameter may be modified to the expected value of the test object parameter. If the expected value of the test object parameter of the test object generation requester is the same as the default value of the test object parameter, the default value of the test object parameter may be retained unchanged.

[0127] In an optional implementation of this embodiment, the device further includes a part that sends the test object information to the test object generation requester so that the test object performs a preset test operation according to the test object. Figure 8 As shown, the test object generating device includes:

[0128] The first generating module 801 is configured to generate a test object parameter acquisition request in response to receiving a test object generation request sent by a test object generation requester, wherein the test object generation request carries a test object identifier;

[0129] A first sending module 802 is configured to send the test object parameter acquisition request to the test object generation requester;

[0130] The second generating module 803 is configured to generate a test object corresponding to the test object identifier according to the test object parameters in response to receiving the test object parameters returned by the test object generation requester;

[0131] The second sending module 804 is configured to send the test object information to the test object generation requester, so that it performs a preset test operation according to the test object.

[0132] After generating the test object corresponding to the test object identifier sent by the test object generation requester, the corresponding test object information may be sent to the test object generation requester so that the test object performs a preset test operation according to the test object.

[0133] Fig. 9 FIG. 1 is a block diagram showing a test object generation device according to another embodiment of the present disclosure. 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 client. Fig. 9 As shown, the test object generating device includes:

[0134] The third sending module 901 is configured to send a test object generation request to the server, wherein the test object generation request carries a test object identifier;

[0135] A fourth sending module 902 is configured to send the test object parameters to the server in response to receiving the test object parameter acquisition request sent by the server;

[0136] The receiving module 903 is configured to receive the test object information corresponding to the test object identifier sent by the server, wherein the test object is generated by the server according to the test object parameters.

[0137] As mentioned above, with the development of Internet technology, more and more businesses or service providers provide services to users through Internet applications. In order to make the services provided more complete, businesses or service providers usually frequently add, delete, and update the content of the application. At the same time, in order to ensure the normal operation of the new version of the application, it is necessary to test the new version of the application after the application is changed to detect the running status of the new version of the application. When testing, the existing technology usually implements the test by executing a real operation process. For example, when creating a test order, the tester will create an order according to the real order process to determine whether the order process is normal. Although this test method can ensure the accuracy of the test, the test method is inefficient and cannot be applied to testing work with large amounts of data.

[0138] In view of the above defects, in this embodiment, a test object generation device is proposed, which generates a test object corresponding to the test object generation request according to the test object generation request by means of a test object generation unit designed by the server. This technical solution can greatly save the test workload of testers and avoid the time spent on executing the real operation process, thereby greatly improving the execution efficiency of the test work, and can be effectively applied to the test work with large data volume.

[0139] In an optional implementation of this embodiment, the server is provided with a test object generation unit, wherein the test object generation unit is a framework unit generated based on flask and tornado, which includes one or more unit modules that can realize certain functions and corresponding module interfaces, and is provided with an interface specification. Based on the interface specification, different unit modules can be called to realize corresponding functions, and a visual interactive interface can be provided.

[0140] Therefore, in an optional implementation of this embodiment, the test object parameter acquisition request may be a test object parameter acquisition page. The test object parameter acquisition page may include the following contents: a test object parameter name, a test object parameter input box corresponding to the test object parameter name, a test object parameter optional value range, etc. Therefore, in this page, the client can interactively input the parameters required for the test object it wants to create.

[0141] In an optional implementation of the present embodiment, the test object parameter acquisition page also includes a default value of the test object parameter. If the client's expected value of the test object parameter is different from the default value of the test object parameter, the default value of the test object parameter may be modified to the expected value of the test object parameter. If the client's expected value of the test object parameter is the same as the default value of the test object parameter, the default value of the test object parameter may be retained unchanged.

[0142] In an optional implementation of this embodiment, the device further includes a part that performs a preset test operation according to the test object, that is, Fig.10 As shown, the test object generating device includes:

[0143] The third sending module 1001 is configured to send a test object generation request to the server, wherein the test object generation request carries a test object identifier;

[0144] The fourth sending module 1002 is configured to send the test object parameters to the server in response to receiving the test object parameter acquisition request sent by the server;

[0145] The receiving module 1003 is configured to receive the test object information corresponding to the test object identifier sent by the server, wherein the test object is generated by the server according to the test object parameters;

[0146] The testing module 1004 is configured to perform a preset testing operation according to the test object.

[0147] After receiving the test object information corresponding to the test object identifier sent by the server, the test module 1004 can perform a preset test operation according to the generated test object.

[0148] Figure 9-10 Some technical terms in the embodiments shown in the figure are similar to those in the embodiment shown in the figure. Figure 6-Figure 8 Some technical terms in the embodiments shown are the same or similar. For the explanation and description of these technical terms, please refer to the above Figure 6-Figure 8 The description of the illustrated embodiments will not be repeated in this disclosure.

[0149] The present disclosure also discloses an electronic device, Fig.11 A structural block diagram of an electronic device according to an embodiment of the present disclosure is shown. Fig.11 As shown, the electronic device 1100 includes a memory 1101 and a processor 1102; wherein,

[0150] The memory 1101 is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor 1102 to implement the above method steps.

[0151] Fig.12 It is a structural diagram of a computer system suitable for implementing a test object generation method according to an embodiment of the present disclosure.

[0152] like Fig.12 As shown, the computer system 1200 includes a central processing unit (CPU) 1201, which can perform various processes in the above-mentioned embodiments according to a program stored in a read-only memory (ROM) 1202 or a program loaded from a storage part 1208 to a random access memory (RAM) 1203. In the RAM 1203, various programs and data required for the operation of the system 1200 are also stored. The CPU 1201, the ROM 1202, and the RAM 1203 are connected to each other via a bus 1204. An input / output (I / O) interface 1205 is also connected to the bus 1204.

[0153] The following components are connected to the I / O interface 1205: an input section 1206 including a keyboard, a mouse, etc.; an output section 1207 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1208 including a hard disk, etc.; and a communication section 1209 including a network interface card such as a LAN card, a modem, etc. The communication section 1209 performs communication processing via a network such as the Internet. A drive 1210 is also connected to the I / O interface 1205 as needed. A removable medium 1211, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1210 as needed, so that a computer program read therefrom is installed into the storage section 1208 as needed.

[0154] In particular, according to an embodiment of the present disclosure, the method described above can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program tangibly contained on a readable medium thereof, and the computer program includes a program code for executing the above-mentioned test object generation method. In such an embodiment, the computer program can be downloaded and installed from a network through the communication part 1209, and / or installed from the removable medium 1211.

[0155] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the road map or block diagram can represent a part of a module, program segment or code, and the part of the module, program segment or code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a different order from the order marked in the accompanying drawings. For example, two square 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 square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0156] The units or modules involved in the embodiments described in the present disclosure may be implemented by software or hardware. The units or modules described may also be set in a processor, and the names of these units or modules do not constitute limitations on the units or modules themselves in some cases.

[0157] As another aspect, the present disclosure further provides a computer-readable storage medium, which may be a computer-readable storage medium included in the device described in the above embodiment; or a computer-readable storage medium that exists independently and is not assembled into the device. The computer-readable storage medium stores one or more programs, and the programs are used by one or more processors to execute the method described in the present disclosure.

[0158] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present disclosure is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the inventive concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other.

Claims

1. A test object generation method, characterized in that: include: In response to receiving a test object generation request sent by a test object generation requester, generating a test object parameter acquisition request, wherein the test object generation request carries a test object identifier; Sending the test object parameter acquisition request to the test object generation requester; In response to receiving the test object parameters returned by the test object generation requester, generating a test object corresponding to the test object identifier according to the test object parameters; The step of generating a test object parameter acquisition request in response to receiving a test object generation request sent by a test object generation requester comprises: In response to receiving a test object generation request sent by a test object generation requester, calling a test object generation interface of a test object generation unit, wherein the test object generation unit includes one or more unit modules, and the interface corresponding to the unit module is the test object generation interface; the test object generation unit is a framework unit generated based on flask and tornado, including one or more unit modules capable of realizing certain functions and corresponding module interfaces, and is provided with an interface specification, and different unit modules are called based on the interface specification; In response to the test object generation interface being called, generating a test object parameter acquisition request; The test object parameter acquisition request is a test object parameter acquisition page; The test object parameter acquisition page also includes a default value of the test object parameter. If the expected value of the test object parameter by the test object generation requester is different from the default value of the test object parameter, the default value of the test object parameter can be modified to the expected value of the test object parameter; If the expected value of the test object parameter by the test object generation requester is the same as the default value of the test object parameter, the default value of the test object parameter may be retained unchanged.

2. The test object generation method according to claim 1, characterized in that: The sending of the test object parameter acquisition request to the test object generation requester is implemented as follows: The test object parameter acquisition page is displayed to the test object generation requester.

3. The test object generation method according to claim 1, characterized in that: It also includes: sending the test object information to the test object generation requester, so that it performs a preset test operation according to the test object.

4. A test object generation method, characterized in that: include: Send a test object generation request to the server, wherein the test object generation request carries a test object identifier: In response to receiving a test object parameter acquisition request sent by the server, the test object parameters are sent to the server, the test object parameter acquisition request is the server calling the test object generation interface of the test object generation unit; in response to the test object generation interface being called, a test object parameter acquisition request is generated; the test object generation unit includes one or more unit modules, and the interface corresponding to the unit module is the test object generation interface; the test object generation unit is a framework unit generated based on flask and tornado, including one or more unit modules and corresponding module interfaces that can realize certain functions, and an interface specification is provided, and different unit modules are called based on the interface specification; receiving test object information corresponding to the test object identifier sent by the server, wherein the test object is generated by the server according to the test object parameters; The test object parameter acquisition request is a test object parameter acquisition page; the test object parameter acquisition page also includes a test object parameter default value. If the test object generation requester expects a test object parameter value that is different from the test object parameter default value, the test object parameter default value may be modified to the test object parameter expected value; If the expected value of the test object parameter by the test object generation requester is the same as the default value of the test object parameter, the default value of the test object parameter may be retained unchanged.

5. The test object generation method according to claim 4, characterized in that: Also includes: A preset test operation is performed according to the test object.

6. A test object generating device, characterized in that: include: A first generating module is configured to generate a test object parameter acquisition request in response to receiving a test object generation request sent by a test object generation requester, wherein the test object generation request carries a test object identifier; A first sending module is configured to send the test object parameter acquisition request to the test object generation requester; A second generating module is configured to generate a test object corresponding to the test object identifier according to the test object parameters in response to receiving the test object parameters returned by the test object generation requester; The first generation module comprises: The calling submodule is configured to call the test object generation interface of the test object generation unit in response to receiving the test object generation request sent by the test object generation requester, wherein the test object generation unit includes one or more unit modules, and the interface corresponding to the unit module is the test object generation interface; the test object generation unit is a framework unit generated based on flask and tornado, including one or more unit modules and corresponding module interfaces capable of realizing certain functions, and an interface specification is provided, and different unit modules are called based on the interface specification; A generating submodule, configured to generate a test object parameter acquisition request in response to the test object generating interface being called; The test object parameter acquisition request is a test object parameter acquisition page; the test object parameter acquisition page also includes a test object parameter default value. If the test object generation requester's expected value for the test object parameter is different from the test object parameter default value, the test object parameter default value can be modified to the expected value of the test object parameter; if the test object generation requester's expected value for the test object parameter is the same as the test object parameter default value, the test object parameter default value can be retained unchanged.

7. The test object generating device according to claim 6, characterized in that: The first sending module is configured as follows: The test object parameter acquisition page is displayed to the test object generation requester.

8. The test object generating device according to claim 7, characterized in that , also includes: a second sending module, configured to send the test object information to the test object generating request party, so that it performs a preset test operation according to the test object.

9. A test object generating device, characterized in that: include: A third sending module is configured to send a test object generation request to the server, wherein the test object generation request carries a test object identifier; The fourth sending module is configured to send the test object parameters to the server in response to receiving the test object parameter acquisition request sent by the server, wherein the test object parameter acquisition request is the test object generation interface of the test object generation unit called by the server; in response to the test object generation interface being called, generate the test object parameter acquisition request; the test object generation unit includes one or more unit modules, and the interface corresponding to the unit module is the test object generation interface; the test object generation unit is a framework unit generated based on flask and tornado, including one or more unit modules and corresponding module interfaces that can realize certain functions, and is provided with an interface specification, and different unit modules are called based on the interface specification; a receiving module, configured to receive test object information corresponding to the test object identifier sent by the server, wherein the test object is generated by the server according to the test object parameters; The test object parameter acquisition request is a test object parameter acquisition page; the test object parameter acquisition page also includes a test object parameter default value. If the test object generation requester expects a test object parameter value that is different from the test object parameter default value, the test object parameter default value may be modified to the test object parameter expected value; If the expected value of the test object parameter by the test object generation requester is the same as the default value of the test object parameter, the default value of the test object parameter may be retained unchanged.

10. The test object generating device according to claim 9, characterized in that , also includes: The test module is configured to perform a preset test operation according to the test object.

11. An electronic device, characterized in that: The method comprises a memory and a processor; wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement the method steps described in any one of claims 1-5.

12. A computer-readable storage medium having computer instructions stored thereon, characterized in that: When the computer instructions are executed by a processor, the method steps described in any one of claims 1-2 are implemented.

Citation Information

Patent Citations

  • Test data obtaining method, client and server

    CN104427627A

  • Testing method and testing device of interface

    CN107247660A

  • Data receiving method and device, data sending method and device, testing system and storage medium

    CN108255727A

  • Method and device for determining financial test object

    CN109933534A

  • System testing method and device, computer equipment and storage medium

    CN110321278A