Page method and device for automatic testing, storage medium and electronic device

By displaying various forms of test case sets on the test page and determining target test cases, the problem in the existing technology that automated testing requires redevelopment of the test interface is solved, reducing costs and improving efficiency and user experience.

CN118733423APending Publication Date: 2024-10-01HAIER YOUJIA INTELLIGENT TECH (BEIJING) CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310330029.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-30
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

Different forms of automated testing in the existing technology require the redevelopment of test interfaces, resulting in high consumption of manpower and material resources, and increasing the cost of automated testing.

Method used

By displaying various forms of test case sets on the pre-created test page, and determining the target test cases to be tested from the test case set through the test page, the test results are displayed, avoiding the need to redevelop the test interface.

Benefits of technology

It enables running various forms of test cases directly on the test page, reducing the test cost of automated testing and improving efficiency and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118733423A_ABST
    Figure CN118733423A_ABST
Patent Text Reader

Abstract

The invention discloses a page method and device for automatic testing, a storage medium and an electronic device, and relates to the technical field of smart home / smart home, the page method for automatic testing comprises the following steps: obtaining a test pack, and scanning the test pack to obtain a test case set; displaying the test case set on a pre-created test page; determining a target test case to be tested from the test case set through the test page; and displaying a test result corresponding to the target test case on the test page. According to the method, the test case set containing various forms of test cases is displayed through the test page, a user can conveniently and directly operate the various forms of test cases on the test page and display the test result, a new test interface does not need to be developed again, and therefore the test cost of automatic testing can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of smart home technology, and in particular to a paging method, device, storage medium and electronic device for automated testing. Background Art

[0002] Before a software product is officially put into use, its performance needs to be tested. In order to get rid of repetitive and tedious manual testing tasks, automated testing frameworks came into being.

[0003] As known from the related technology, currently, the automated testing platform in the form of Postman is often used to perform automated testing on interfaces. However, for other automated tests, such as page automated testing, image accuracy testing, etc., it is often necessary to redevelop the test interface to ensure the effective operation of different forms of test cases, which will cause a lot of manpower and material resources consumption and increase the test cost of automated testing. Summary of the invention

[0004] The present application provides a page-based method, device, storage medium and electronic device for automated testing, which are used to solve the defect in the prior art that a large amount of manpower and material resources are consumed due to the need to redevelop a test interface for different automated tests. The method realizes the display of a test case set containing test cases in various forms through a test page, making it convenient for users to directly run test cases in various forms on the test page and display the test results, thereby reducing the testing cost of automated testing.

[0005] The present application provides a page-based method for automated testing, which includes: obtaining a test package and scanning the test package to obtain a test case set; displaying the test case set on a pre-created test page; determining a target test case to be tested from the test case set through the test page; and displaying the test results corresponding to the target test case on the test page.

[0006] According to a paging method for automated testing provided by the present application, determining a target test case to be tested from the test case set through the test page specifically includes: when the test page receives a use case selection instruction, determining a test case corresponding to the use case selection instruction; based on the test case corresponding to the use case selection instruction, determining a target test case to be tested in the test case set.

[0007] According to a paging method for automated testing provided in the present application, determining the test case corresponding to the use case selection instruction specifically includes: determining the test case corresponding to the use case selection instruction based on a pre-set mapping table and the use case selection instruction, wherein the mapping table includes a mapping relationship between multiple use case selection instructions and multiple test cases.

[0008] According to a page-based method for automated testing provided in the present application, after determining a target test case to be tested from the test case set through the test page, the method further includes: performing automated testing on the test page based on the target test case when the test page receives an instruction to perform automated testing.

[0009] According to a paging method for automated testing provided by the present application, automated testing is performed on the test page based on the target test case, specifically comprising: converting the target test case into an XML-formatted target test case, wherein the XML-formatted target test case is a test case that meets the testing requirements of the testng open source testing framework; and based on the XML-formatted target test case, automated testing is performed on the test page through the testng open source testing framework.

[0010] According to a paging method for automated testing provided in the present application, automated testing is performed on the test page based on the target test case, specifically including: presetting a run time; and based on the target test case, performing automated testing on the test page according to the run time.

[0011] According to a paging method for automated testing provided by the present application, the test package is scanned to obtain a test case set, which specifically includes: scanning the test package to obtain multiple test methods; based on the multiple test methods, querying multiple test case data corresponding to the multiple test methods in a MySQL database respectively; based on the multiple test case data, obtaining multiple test cases; based on the multiple test cases, obtaining the test case set.

[0012] The present application also provides a page-based device for automated testing, which includes: a first module for acquiring a test package and scanning the test package to obtain a test case set; a second module for displaying the test case set on a pre-created test page; a third module for determining a target test case to be tested from the test case set through the test page; and a fourth module for displaying the test results corresponding to the target test case on the test page.

[0013] The present application also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the paging method for implementing any of the above-mentioned automated tests through the computer program.

[0014] The present application also provides a computer-readable storage medium, wherein the computer-readable storage medium includes a stored program, wherein when the program is run, the paging method for implementing any of the above-mentioned automated tests is executed.

[0015] The present application also provides a computer program product, including a computer program, wherein when the computer program is executed by a processor, the paging method for automated testing as described in any one of the above is implemented.

[0016] The paging method, device, storage medium and electronic device of automated testing provided by the present application display a test case set on a pre-created test page, determine a target test case to be tested from the test case set through the test page, and display the test result corresponding to the target test case on the test page. Since the test case set includes test cases in various forms, it is possible to display test cases in various forms through the test page, making it convenient for users to run test cases in various forms and display test results, without the need to redevelop a new test interface, thereby reducing the test cost of automated testing. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0018] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0019] Figure 1 is a schematic diagram of a hardware environment of an interaction method of a smart device according to an embodiment of the present application;

[0020] Figure 2 It is a flowchart of the page-based method for automated testing provided by this application;

[0021] Figure 3 It is a flowchart of determining a target test case to be tested from a test case set through a test page provided by the present application;

[0022] Figure 4This is a flow chart of automated testing on a test page based on target test cases provided by this application;

[0023] Figure 5 This is a flow chart of scanning a test package to obtain a test case set provided by the present application;

[0024] Figure 6 It is a structural schematic diagram of the paging device for automated testing provided by the present application;

[0025] Figure 7 It is a schematic diagram of the structure of the electronic device provided in this application. DETAILED DESCRIPTION

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

[0027] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0028] According to one aspect of an embodiment of the present application, a page method for automated testing is provided. The page method for automated testing is widely used in smart home (Smart Home), smart home, smart home device ecology, smart residential (Intelligence House) ecology and other whole-house intelligent digital control application scenarios. Optionally, in this embodiment, the page method for automated testing can be applied to Figure 1 In the hardware environment composed of the terminal device 102 and the server 104 shown in FIG. Figure 1As shown, the server 104 is connected to the terminal device 102 via a network, and can be used to provide services (such as application services, etc.) for the terminal or a client installed on the terminal. A database can be set on the server or independently of the server to provide data storage services for the server 104. Cloud computing and / or edge computing services can be configured on the server or independently of the server to provide data computing services for the server 104.

[0029] The network may include but is not limited to at least one of the following: wired network, wireless network. The wired network may include but is not limited to at least one of the following: wide area network, metropolitan area network, local area network, and the wireless network may include but is not limited to at least one of the following: WIFI (Wireless Fidelity), Bluetooth. The terminal device 102 may be but is not limited to a PC, a mobile phone, a tablet computer, a smart air conditioner, a smart range hood, a smart refrigerator, a smart oven, a smart stove, a smart washing machine, a smart water heater, a smart washing device, a smart dishwasher, a smart projection device, a smart TV, a smart clothes drying rack, a smart curtain, a smart audio and video, a smart socket, a smart speaker, a smart fresh air device, a smart kitchen and bathroom device, a smart bathroom device, a smart sweeping robot, a smart window cleaning robot, a smart mopping robot, a smart air purification device, a smart steamer, a smart microwave oven, a smart kitchen treasure, a smart purifier, a smart water dispenser, a smart door lock, etc.

[0030] It should be noted that the page-based method for automated testing provided by the present application can provide a basis for automated testing in the scenario of smart home\intelligent home, by displaying a test case set on a pre-created test page, determining the target test case to be tested from the test case set through the test page, and displaying the test results corresponding to the target test case on the test page. Since the test case set includes test cases in various forms, it is possible to display test cases in various forms through the test page, making it convenient for users to run test cases in various forms and display test results, without the need to redevelop a new test interface, thereby reducing the test cost of automated testing.

[0031] Figure 2 It is a flowchart of the page-based method for automated testing provided by this application.

[0032] In order to further introduce the page method of automated testing provided by this application, Figure 2 Provide explanation.

[0033] In an exemplary embodiment of the present application, Figure 2 It can be seen that the paging method for automated testing may include steps 210 to 240, and each step will be introduced below.

[0034] In step 210, a test package is obtained and scanned to obtain a test case set.

[0035] In step 220, the test case set is displayed on a pre-created test page.

[0036] In one embodiment, a test package may include multiple test cases, wherein the test case may be a @test test case. During the application process, the test package may be scanned to obtain a test case set under the test package, and the test case set containing multiple forms of test cases may be displayed on the test page. In this embodiment, by displaying various forms of test cases on the test page, it is convenient for users to perform automated testing directly on the test page based on various forms of test cases without redeveloping a new test interface, thereby reducing the test cost of automated testing.

[0037] In another embodiment, the test page is pre-created. In one example, the test page can be a page that finds the corresponding test case through the test class under the test package and displays the test case.

[0038] In one embodiment, a test page may be created. The test page may be a page that can be displayed on the front end during the automated test. It should be noted that the test page may be a page that can find the corresponding test case through the test class under the test package and display the test case.

[0039] In another embodiment, based on the testng open source testing framework, code can be written in the background to obtain test cases for various types of automated testing, that is, test cases in various forms. Further, the written test cases can be displayed through the test page and task timing regression can be created.

[0040] In step 230, a target test case to be tested is determined from the test case set through the test page.

[0041] In step 240, the test results corresponding to the target test case are displayed on the test page.

[0042] In one embodiment, a target test case that a user wants to test can be determined from a test case set. After the target test case is determined, the target test case can be displayed on a test page, and automated testing can be performed on the test page, and the test results corresponding to the target test case can be displayed. In this embodiment, the test results corresponding to the target test case are directly displayed on the test page, which can facilitate users to intuitively obtain the test results, thereby improving the user's experience and satisfaction.

[0043] It is understandable that the target test case can be any form of test case determined by the user, which can be directly automated on the test page. This avoids the need to redevelop a new test interface when performing automated testing based on new test cases, thereby reducing the test cost of automated testing.

[0044] The paging method of automated testing provided by the present application displays a test case set on a pre-created test page, determines the target test case to be tested from the test case set through the test page, and displays the test results corresponding to the target test case on the test page. Since the test case set includes test cases in various forms, it is possible to display test cases in various forms through the test page, making it convenient for users to run test cases in various forms and display test results without redeveloping a new test interface, thereby reducing the test cost of automated testing.

[0045] Figure 3 This is a flow chart of determining a target test case to be tested from a test case set through a test page provided by the present application.

[0046] In order to further introduce the page method of automated testing provided by this application, Figure 3 Provide explanation.

[0047] In an exemplary embodiment of the present application, Figure 3 It can be seen that determining the target test case to be tested from the test case set through the test page may include step 310 and step 320, and each step will be introduced below.

[0048] In step 310, when the test page receives a use case selection instruction, a test case corresponding to the use case selection instruction is determined;

[0049] In step 320, based on the test case corresponding to the case selection instruction, a target test case to be tested is determined in the test case set.

[0050] In one embodiment, in a scenario where a user wants to test a target test case, it is necessary to determine the target test case. During the application process, the user can initiate a test case selection instruction. When the test page receives the test case selection instruction, the test case corresponding to the test case selection instruction can be determined, and based on the test case corresponding to the test case selection instruction, the target test case that the user wants to test can be screened out from the test case set. Through this embodiment, any test case can be determined as a target test case based on the user's needs, and automated testing can be performed based on the target test case.

[0051] In another exemplary embodiment of the present application, determining the test case corresponding to the use case selection instruction may be implemented in the following manner:

[0052] Based on a preset mapping table and a use case selection instruction, a test case corresponding to the use case selection instruction is determined, wherein the mapping table includes a mapping relationship between a plurality of use case selection instructions and a plurality of test cases.

[0053] In one embodiment, the mapping table can be understood as a table including mapping relationships between different use case selection instructions and different test cases. For example, in the mapping table, the test case corresponding to the use case selection instruction A can be a1; the test case corresponding to the use case selection instruction B can be b1. In one example, when the user initiates the use case selection instruction A, the test case corresponding to the use case selection instruction A can be found through the mapping table as a1. Furthermore, based on the test case being a1, the target test case to be tested can be screened out in the test case set.

[0054] In another exemplary embodiment of the present application, continue with Figure 2 The above embodiment is used as an example for explanation. After determining the target test case to be tested from the test case set through the test page (corresponding to step 230), the page method of automated testing may further include the following steps:

[0055] When the test page receives an instruction to perform an automated test, the automated test is performed on the test page based on the target test case.

[0056] In one embodiment, when an automated test instruction is received, it indicates that the corresponding target test case needs to be called for automated testing. It should be noted that automated testing may include interface testing and page testing, etc. In this embodiment, the specific form of automated testing is not limited.

[0057] In one embodiment, automated testing can be performed on the test page in a data-driven manner based on test cases and the testng open source testing framework.

[0058] In one example, test case data and @test test method can be selected on the test page, and the background can organize the test content into a testng.xml file. Among them, testng.xml can integrate third-party report plug-ins such as extentReport, so that test reports on automated testing can be generated more conveniently.

[0059] In another example, Java can call the xml of the testng open source testing framework to execute the testng.xml file for testing, and output the corresponding test results in the form of a test report, so that users can obtain test reports on automated testing in a timely and convenient manner, thereby improving user experience and satisfaction.

[0060] In another exemplary embodiment of the present application, based on the target test case, automated testing is performed on the test page, which can be implemented in the following manner:

[0061] Convert the target test case into an XML format target test case, wherein the XML format target test case is a test case that meets the test requirements of the testng open source test framework;

[0062] Based on the target test cases in XML format, automated testing is performed on the test page through the testng open source testing framework.

[0063] In one embodiment, the target test case can be converted into an XML format target test case. It should be noted that the XML format target test case can be considered as a test case that can meet the test requirements of the testng open source test framework. That is, the XML format target test case can be run through the testng open source test framework to achieve automated testing.

[0064] In one example, the target test case can be directly converted into a file in XML format through the background, and further, the testng open source test framework is called to perform all tests on the file in XML format, thereby realizing automated testing.

[0065] It should be noted that the page-based method of automated testing provided in this application can conveniently insert any desired test using background code without modifying the front-end test page, that is, it can implement background coding test cases, and the front-end test page can display and execute test cases to achieve the purpose of automated testing.

[0066] In addition, the page-based method of automated testing provided by the present application can achieve the purpose of loose coupling, and various forms of testng test methods can be added without the need for complex development. It can easily support page automated testing, various non-http tests, and input and output json string tests.

[0067] In yet another embodiment, the page-based method for automated testing may also generate a test report for the automated testing after the target test case is automated tested, and display the test report on the test page.

[0068] In one embodiment, the extentReport report display driven by the testng open source test framework can be used to save development costs.

[0069] In this embodiment, in order to facilitate users to view the results of automated testing in a timely manner, during the application process, a test report on the automated test can be generated after the automated test is completed, and the test report can be displayed on the test page. Through this embodiment, users can conveniently obtain test reports on automated testing in a timely and convenient manner, thereby improving user experience and satisfaction.

[0070] Figure 4 This is a flowchart of automated testing on a test page based on target test cases provided by this application.

[0071] In order to further introduce the page method of automated testing provided by this application, Figure 4 Describes the process of performing automated testing on the test page based on target test cases.

[0072] In an exemplary embodiment of the present application, Figure 4 It can be seen that, based on the target test case, performing automated testing on the test page may include step 410 and step 420, and each step will be introduced below.

[0073] In step 410, the running time is preset.

[0074] In step 420, based on the target test case, automated testing is performed on the test page according to the runtime.

[0075] In one embodiment, the running time can be preset, wherein the running time can be adjusted according to the actual situation, and the specific time of the running time is not limited in this embodiment. Further, when it is monitored that the current time reaches the preset running time, an automated test can be performed on the test page based on the test case. Through this embodiment, automated testing can be performed regularly, so as to better meet the requirements of users and improve the user experience and satisfaction.

[0076] Figure 5 This is a flow chart of scanning a test package to obtain a test case set provided by the present application.

[0077] The following will be combined Figure 5 The process of scanning the test package to obtain the test case set is explained.

[0078] In an exemplary embodiment of the present application, Figure 5It can be seen that scanning the test package to obtain the test case set may include steps 510 to 540, and each step will be introduced below.

[0079] In step 510, the test package is scanned to obtain multiple test methods.

[0080] In one embodiment, test cases may be written through the background of the testng open source testing framework, and multiple test cases belonging to the same automated testing category may be determined as a test package.

[0081] In another embodiment, a test package can also be customized, and multiple test cases can be written under the test package through the background of the testng open source test framework. It can be understood that the multiple test cases written are test cases belonging to the same automated test category.

[0082] It should be noted that since test cases can be displayed on the test page, when a new test case is added, it can also be displayed on the test page in real time without having to search for the new test case in the background, so that the test case can be run quickly, which improves the scalability of the test process.

[0083] Furthermore, after obtaining the test package, the test package may be scanned to obtain multiple test methods.

[0084] In step 520, based on the multiple test methods, multiple test case data corresponding to the multiple test methods are queried in the MySQL database respectively.

[0085] In step 530, a plurality of test cases are obtained based on a plurality of test case data.

[0086] In step 540, a test case set is obtained based on the multiple test cases.

[0087] In one embodiment, the test case data of the test case can be stored in a MySQL database. During the application process, multiple test case data corresponding to multiple test methods can be queried in the MySQL database respectively based on multiple test methods. In this embodiment, storing the test case data constituting the test case in the MySQL database can facilitate the addition, deletion, modification and verification of the test case data. In addition, new test cases can be obtained more conveniently based on the added, deleted, modified and verified test case data, thereby facilitating various forms of automated testing.

[0088] In another embodiment, the test package may be scanned to obtain test case data stored in a MySQL database. Furthermore, based on the test case data, test cases may be obtained by adding annotations.

[0089] In yet another embodiment, after obtaining a plurality of test cases, the plurality of test cases may be aggregated to obtain a test case set.

[0090] It can be understood that the aforementioned embodiments can be executed individually or in combination of multiple embodiments. In the present application, no specific limitation is imposed on the execution method of the embodiments.

[0091] It should be noted that based on the page-based method of automated testing provided in this application, a page-based testing platform of the testng open source testing framework can be easily and quickly established, thereby saving manpower and material resources in the process of running various types of automated tests, and it has strong scalability, that is, any form of test code can be written in the background, and it can be run and regressed on the test page.

[0092] Among them, in the page-based testing platform, it can be composed of the testng open source testing framework and the test page. The testng open source testing framework and the test page can be communicated and connected, so as to realize the transmission of data and signals.

[0093] According to the full description, the page-based method for automated testing provided by the present application displays a test case set on a pre-created test page, determines the target test case to be tested from the test case set through the test page, and displays the test results corresponding to the target test case on the test page. Since the test case set includes test cases in various forms, it is possible to display test cases in various forms through the test page, making it convenient for users to run test cases in various forms and display test results without redeveloping a new test interface, thereby reducing the test cost of automated testing.

[0094] Based on the same inventive concept, the present application also provides a paging method for automated testing.

[0095] The following is a description of the paging device for automated testing provided by the present application. The paging device for automated testing described below and the paging method for automated testing described above can be referenced to each other.

[0096] Figure 6 It is a structural schematic diagram of the paging device for automated testing provided in this application.

[0097] In an exemplary embodiment of the present application, Figure 6 It can be known that the paging device for automated testing may include a first module 610 to a fourth module 640 , and each module will be introduced below.

[0098] The first module 610 may be configured to obtain a test package and scan the test package to obtain a test case set;

[0099] The second module 620 may be configured to display the test case set on a pre-created test page;

[0100] The third module 630 may be configured to determine a target test case to be tested from the test case set through the test page;

[0101] The fourth module 640 may be configured to display the test result corresponding to the target test case on the test page.

[0102] In another exemplary embodiment of the present application, the third module 630 may determine the target test case to be tested from the test case set through the test page in the following manner:

[0103] In the case where the test page receives a use case selection instruction, determining a test case corresponding to the use case selection instruction;

[0104] Based on the test case corresponding to the case selection instruction, a target test case to be tested is determined in the test case set.

[0105] In another exemplary embodiment of the present application, the third module 630 may determine the test case corresponding to the use case selection instruction in the following manner:

[0106] Based on a preset mapping table and a use case selection instruction, a test case corresponding to the use case selection instruction is determined, wherein the mapping table includes a mapping relationship between a plurality of use case selection instructions and a plurality of test cases.

[0107] In another exemplary embodiment of the present application, the third module 630 may also be configured to:

[0108] When the test page receives an instruction to perform an automated test, the automated test is performed on the test page based on the target test case.

[0109] In another exemplary embodiment of the present application, the third module 630 may implement automated testing on the test page based on the target test case in the following manner:

[0110] Convert the target test case into an XML format target test case, wherein the XML format target test case is a test case that meets the test requirements of the testng open source test framework;

[0111] Based on the target test cases in XML format, automated testing is performed on the test page through the testng open source testing framework.

[0112] In another exemplary embodiment of the present application, the third module 630 may implement automated testing on the test page based on the target test case in the following manner:

[0113] Preset running time;

[0114] Based on the target test cases, automated testing is performed on the test page according to the runtime.

[0115] In another exemplary embodiment of the present application, the first module 610 may scan the test package to obtain the test case set in the following manner:

[0116] Scan the test package to obtain multiple test methods;

[0117] Based on multiple test methods, query multiple test case data corresponding to multiple test methods in the MySQL database respectively;

[0118] Based on multiple test case data, multiple test cases are obtained;

[0119] Based on multiple test cases, a test case set is obtained.

[0120] Figure 7 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 7 As shown, the electronic device may include: a processor 710, a communication interface 720, a memory 730 and a communication bus 740, wherein the processor 710, the communication interface 720 and the memory 730 communicate with each other through the communication bus 740. The processor 710 may call the logic instructions in the memory 730 to execute the page method of the automated test, and the page method of the automated test includes: obtaining a test package, scanning the test package, and obtaining a test case set; displaying the test case set on a pre-created test page; determining a target test case to be tested from the test case set through the test page; and displaying the test result corresponding to the target test case on the test page.

[0121] In addition, the logic instructions in the above-mentioned memory 730 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art, and the computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk.

[0122] On the other hand, the present application also provides a computer program product, which may include a computer program, which may be stored on a computer-readable storage medium, and when the computer program is executed by a processor, the computer can execute the page-based method of automated testing provided by the above methods. The page-based method of automated testing includes: obtaining a test package, scanning the test package, and obtaining a test case set; displaying the test case set on a pre-created test page; determining a target test case to be tested from the test case set through the test page; and displaying the test results corresponding to the target test case on the test page.

[0123] On the other hand, the present application also provides a computer-readable storage medium, which may include a stored program, wherein the program, when running, executes the page-based method of automated testing provided by the above methods. The page-based method of automated testing includes: obtaining a test package, scanning the test package, and obtaining a test case set; displaying the test case set on a pre-created test page; determining a target test case to be tested from the test case set through the test page; and displaying the test result corresponding to the target test case on the test page.

[0124] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0125] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0126] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A page-based method for automated testing, It is characterized in that The paging method of the automated test includes: Obtain a test package and scan the test package to obtain a test case set; Displaying the test case set on a pre-created test page; Determine a target test case to be tested from the test case set through the test page; The test results corresponding to the target test case are displayed on the test page.

2. The page-based method for automated testing according to claim 1, It is characterized in that Determining the target test case to be tested from the test case set through the test page specifically includes: In the case where the test page receives a use case selection instruction, determining a test case corresponding to the use case selection instruction; Based on the test case corresponding to the use case selection instruction, a target test case to be tested is determined in the test case set.

3. The page-based method for automated testing according to claim 2, It is characterized in that The determining of the test case corresponding to the use case selection instruction specifically includes: Based on a preset mapping table and the use case selection instruction, a test case corresponding to the use case selection instruction is determined, wherein the mapping table includes a mapping relationship between a plurality of use case selection instructions and a plurality of test cases.

4. The paging method for automated testing according to any one of claims 1 to 3, It is characterized in that After determining the target test case to be tested from the test case set through the test page, the method further includes: When the test page receives an instruction to perform an automated test, an automated test is performed on the test page based on the target test case.

5. The page-based method for automated testing according to claim 4, It is characterized in that The step of performing automated testing on the test page based on the target test case specifically includes: Convert the target test case into an XML-formatted target test case, wherein the XML-formatted target test case is a test case that meets the test requirements of the testng open source test framework; Based on the target test case in XML format, automated testing is performed on the test page through the testng open source testing framework.

6. The page-based method for automated testing according to claim 4, It is characterized in that The step of performing automated testing on the test page based on the target test case specifically includes: Preset running time; Based on the target test case, an automated test is performed on the test page according to the runtime.

7. The paging method for automated testing according to any one of claims 1 to 6, It is characterized in that The scanning of the test package to obtain a test case set specifically includes: Scanning the test package to obtain multiple test methods; Based on the multiple test methods, query the MySQL database for multiple test case data corresponding to the multiple test methods respectively; Based on the plurality of test case data, obtaining a plurality of the test cases; Based on the multiple test cases, the test case set is obtained.

8. A paging device for automated testing, It is characterized in that The paging device of the automated test includes: The first module is used to obtain a test package and scan the test package to obtain a test case set; The second module is used to display the test case set on a pre-created test page; A third module is used to determine a target test case to be tested from the test case set through the test page; The fourth module is used to display the test results corresponding to the target test case on the test page.

9. A computer-readable storage medium, It is characterized in that The computer-readable storage medium includes a stored program, wherein the program executes the paging method for automated testing according to any one of claims 1 to 7 when running.

10. An electronic device comprising a memory and a processor, It is characterized in that The memory stores a computer program, and the processor is configured to execute the paging method for automated testing according to any one of claims 1 to 7 through the computer program.