Processing method, device and storage medium for interface automation testing

By analyzing and writing the target information of the interface test cases, generating the use case description data and displaying it on the interface, it solves the problem of content management and maintenance of script test cases, realizes the visual management of interface test cases, and improves testing efficiency and flexibility.

CN112416751BActive Publication Date: 2024-12-31BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202011104883.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-10-15
Publication Date
2024-12-31
Estimated Expiration
2040-12-31

AI Technical Summary

Technical Problem

The content of script test cases in existing interface automation tests is not convenient for management and maintenance, resulting in increased testing complexity and maintenance difficulty.

Method used

By analyzing the initial script information containing multiple interface test cases, extracting the target information of each interface test case, writing it to the database, generating use case description data, displaying it in the target device interface, and executing the corresponding script information in response to user operations. Implement visual management of test cases.

Benefits of technology

It realizes the visual management and maintenance of interface test cases, which facilitates the operation and maintenance of test cases. Users can flexibly utilize and operate test case information, improving testing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112416751B_ABST
    Figure CN112416751B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a processing method, device and storage medium for interface automated testing. The method includes: parsing initial script information containing multiple interface test cases, extracting multiple target information of each interface test case; writing the multiple target information into corresponding field positions of a database, generating use case description data of multiple interface test cases, and displaying the use case description data on a target device interface; responding to a test command sent by a user to the target use case description data in the target device interface, executing the target script information corresponding to the target use case description data in the initial script information. The present disclosure visualizes multiple interface test cases in a test case script, so that a user can select a corresponding test case from the visualized interface test case for testing based on his or her own test requirements, and can facilitate the user to flexibly utilize and operate the information of the test case.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computers, and in particular to a processing method, device and storage medium for interface automation testing. Background Art

[0002] In order to ensure the correctness and stability of the service, testing of the backend service is essential. However, the current software iteration cycle is very fast, and service updates are very frequent. Pure manual verification can hardly meet the quality assurance requirements. Therefore, interface automation testing can help testers quickly verify the correctness of functions and conduct online service inspections. For example, test cases can be pre-written based on interface automation testing technology, and then the correctness of functions and online service inspections can be implemented based on the test cases.

[0003] In the related art, the test cases used in the interface automation test are usually generated by script writing. However, since the test cases based on script writing have certain professionalism, the content of the script test cases is usually complex and inconvenient to manage and maintain. Summary of the invention

[0004] The present disclosure provides a method, device and system for processing interface automated testing, so as to at least solve the problem in the related art that the content of script test cases is inconvenient to manage and maintain. The technical solution of the present disclosure is as follows:

[0005] According to a first aspect of an embodiment of the present disclosure, a method for processing an interface automated test is provided, comprising:

[0006] Parsing initial script information containing multiple interface test cases, and extracting multiple target information of each of the interface test cases;

[0007] Writing the plurality of target information into corresponding field positions of a database respectively, generating use case description data of the plurality of interface test cases, and displaying the use case description data on a target device interface;

[0008] In response to a test command sent by a user to the target use case description data in the target device interface, the target script information corresponding to the target use case description data in the initial script information is executed.

[0009] In some embodiments of the present disclosure, before parsing the initial script information containing multiple interface test cases and extracting multiple target information of each of the interface test cases, the method further includes:

[0010] In response to a submission event of the initial script information;

[0011] Start the listener set in the test case runner in the test framework;

[0012] After the plurality of target information are respectively written into the corresponding field positions of the database to generate the use case description data of the plurality of interface test cases, the method further includes:

[0013] Receive a write completion message fed back by the listening program;

[0014] Exit the test case runner in the test framework.

[0015] In some embodiments of the present disclosure, the parsing includes initial script information of multiple interface test cases, and extracting multiple target information of each of the interface test cases, including:

[0016] Matching the initial script information with preset name keywords;

[0017] If the match is successful, the class name and method name of each interface test case are extracted from the initial script information according to the name keyword.

[0018] In some embodiments of the present disclosure, the parsing includes initial script information of a plurality of interface test cases, extracting a plurality of target information of each of the interface test cases, and further includes:

[0019] Matching the initial script information with preset extended keywords;

[0020] If the match is successful, the extended information of each of the interface test cases is extracted from the initial script information according to the extended keywords.

[0021] In some embodiments of the present disclosure, after displaying the use case description data on the target device interface, the method further includes:

[0022] In response to a modification operation of the user on the use case description data in the target device interface, synchronously modifying corresponding information in the database according to the modification operation;

[0023] When it is detected that the use case description data stored in the database is inconsistent with the initial script information, a modification prompt message is sent.

[0024] According to a second aspect of an embodiment of the present disclosure, there is provided a processing device for interface automation testing, comprising:

[0025] A parsing module is configured to parse initial script information containing multiple interface test cases and extract multiple target information of each of the interface test cases;

[0026] A writing module is configured to write the plurality of target information into corresponding field positions of a database respectively, and generate use case description data of the plurality of interface test cases;

[0027] A display module, configured to display the use case description data on a target device interface;

[0028] The execution module is configured to execute the target script information corresponding to the target use case description data in the initial script information in response to a test command sent by a user to the target use case description data in the target device interface.

[0029] In some embodiments of the present disclosure, the device further comprises:

[0030] A start module, configured to start a listening program set in a use case running program in a test framework in response to a submission event of the initial script information before the parsing module parses the initial script information containing a plurality of interface test cases and extracts a plurality of target information of each of the interface test cases;

[0031] The processor module is configured so that the writing module writes the multiple target information into the corresponding field positions of the database respectively, generates the use case description data of the multiple interface test cases, receives the writing completion message fed back by the listening program, and exits the use case running program in the test framework.

[0032] In some embodiments of the present disclosure, the parsing module is specifically configured to:

[0033] Matching the initial script information with preset name keywords;

[0034] If the match is successful, the class name and method name of each interface test case are extracted from the initial script information according to the name keyword.

[0035] In some embodiments of the present disclosure, the parsing module is further specifically configured to:

[0036] Matching the initial script information with preset extended keywords;

[0037] If the match is successful, the extended information of each of the interface test cases is extracted from the initial script information according to the extended keywords.

[0038] In some embodiments of the present disclosure, the device further comprises:

[0039] A modification module, configured to respond to a modification operation of the user on the use case description data in the target device interface, and synchronously modify corresponding information in the database according to the modification operation;

[0040] The sending module is configured to send modification prompt information when it is detected that the use case description data stored in the database is inconsistent with the initial script information.

[0041] According to a third aspect of an embodiment of the present disclosure, another processing device for interface automation testing is provided, including:

[0042] processor;

[0043] a memory for storing instructions executable by the processor;

[0044] The processor is configured to execute the instructions to implement the processing method for interface automation testing described in the first aspect above.

[0045] According to the fourth aspect of an embodiment of the present disclosure, a storage medium is provided. When the instructions in the storage medium are executed by a processor of a processing device for interface automation testing, the processing device for interface automation testing can execute the processing method for interface automation testing described in the first aspect above.

[0046] According to a fifth aspect of an embodiment of the present disclosure, a computer program product is provided. When instructions in the computer program product are executed by a processor, the processing method for automatic interface testing described in the first aspect is executed.

[0047] The technical solution provided by the embodiments of the present disclosure brings at least the following beneficial effects:

[0048] By parsing the initial script information containing multiple interface test cases, extracting multiple target information of each interface test case, writing the multiple target information into the corresponding field positions of the database, generating the use case description data of multiple interface test cases, and displaying the use case description data on the target device interface, the visualization of the interface test case can be realized, which can facilitate the user to see and operate the information of the test case on the interface. For example, the use case logic and the operation use case status can be displayed using a visualized interface, which is convenient for the management and maintenance of the test case. In addition, the target script information corresponding to the target use case description data in the initial script information can be executed in response to the test command sent by the user to the target use case description data in the target device interface. It can be seen that the present disclosure visualizes multiple interface test cases in the test case script, so that the user can select the corresponding test case from the visualized interface test case for testing based on his own test needs, which can facilitate the user to flexibly use and operate the information of the test case.

[0049] 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

[0050] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.

[0051] Figure 1 The present invention is a flowchart of a method for processing an interface automation test according to an exemplary embodiment.

[0052] Figure 2a and 2b is an example diagram showing visualization of initial script information according to an exemplary embodiment.

[0053] Figure 3 The present invention is a flowchart of a method for processing an interface automation test according to another exemplary embodiment.

[0054] Figure 4 The figure is an example diagram showing a method for processing an interface automation test according to an exemplary embodiment.

[0055] Figure 5 The present invention is a block diagram of a processing device for interface automatic testing according to an exemplary embodiment.

[0056] Figure 6 The present invention is a block diagram of a processing device for interface automation testing according to another exemplary embodiment.

[0057] Figure 7 The present invention is a block diagram of a processing device for interface automatic testing according to yet another exemplary embodiment.

[0058] Figure 8 The invention is a block diagram of a processing device for interface automatic testing according to an exemplary embodiment. DETAILED DESCRIPTION

[0059] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.

[0060] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure 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 interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0061] Figure 1 It is a flowchart of a method for processing an interface automation test according to an exemplary embodiment. It should be noted that the method for processing an interface automation test in the embodiment of the present disclosure is used in a processing device for processing an interface automation test. For example, the processing device for processing an interface automation test may be a test tool software, and the test tool software is configured on an electronic device. Figure 1 As shown, the processing method of the interface automatic test includes the following steps.

[0062] In step S11, the initial script information including multiple interface test cases is parsed, and multiple target information of each interface test case is extracted.

[0063] It should be noted that the initial script information can be understood as a code script pre-written by the tester through a script case writing tool, and the code script can contain multiple interface test cases. Among them, the interface can be understood as an interface that can realize the service function, for example, the web page login function on a website is realized through an interface.

[0064] In this step, when the initial script information containing the interface test case is obtained, the initial script information can be parsed, and multiple target information of each interface test case can be extracted from the initial script information. Wherein, in the embodiment of the present disclosure, the target information may include but is not limited to the use case description, dependency, priority, grouping, use case status, execution order, class name and method name in the interface test case, and this information is the information actually used when testing. In the prior art, the target information can only be extracted from the script information of the test case when the test case is actually running. In the present disclosure, when the initial script information containing multiple interface test cases is obtained, before the test case script is executed, all target information of each interface test case is extracted from the initial script information based on static analysis, so that the extracted target information can be used to visualize the test case script later.

[0065] It should be noted that the target information of the interface test case can be extracted from the initial script information by using keyword matching. In some embodiments of the present disclosure, the initial script information can be matched with a preset name keyword. If the match is successful, the class name and method name of each interface test case are extracted from the initial script information according to the name keyword. Among them, since the class name and method name can locate a unique test case, the name keyword may include but is not limited to the class name keyword and the method name keyword.

[0066] It should also be noted that, in order to facilitate testers to view the test situation, the test case may also contain information for front-end display, for example, priority, use case status and operating environment, etc. are all custom annotations and can be expanded. Therefore, when parsing the initial script information, the initial script information can also be matched with the extended key, so that all useful information in the interface test case can be extracted from the initial script information. Specifically, in other embodiments of the present disclosure, the initial script information can also be matched with the preset extended keywords. If the match is successful, the extended information of each interface test case is extracted from the initial script information according to the extended keywords.

[0067] In step S12, multiple target information are written into corresponding field positions of the database respectively, use case description data of multiple interface test cases are generated, and the use case description data is displayed on the target device interface.

[0068] In the disclosed embodiment, the database can store the target information of the interface test case through a data table. The data table contains attribute names and attribute values ​​thereof, wherein the attribute may include a class name attribute and a method name attribute, or may also include extended attributes, wherein the extended attributes may include but are not limited to one or more of a use case description attribute, a dependency attribute, a priority attribute, a grouping attribute, a use case status attribute, an execution order attribute, and an operating environment attribute. As an example, the above-mentioned field position can be understood as a field in the data table for representing the attribute name.

[0069] In this step, after extracting multiple target information of each interface test case from the initial script information, the multiple target information of each interface test case can be respectively input into the corresponding field position of the database to generate the use case description data of each interface test case, and then the use case description data can be displayed on the target device interface. That is to say, the target information of all interface test cases parsed from the initial script information is integrated together by writing into the database to obtain the use case description data, and the use case description data is displayed on the target device interface, thereby realizing the visualization of the interface test case.

[0070] For example, Figure 2aAs shown, it is the initial script information containing interface test cases. Among them, the initial script information is a test case script for the login registration module, and the initial script information contains interface test cases for the registration function and interface test cases for the login function. Each test case contains its corresponding priority information, case status information, operating environment information, case description information and method name. The interface test case for the registration function and the interface test case for the login function share the same class name information. In this way, the interface test case for the registration function and the interface test case for the login function can be located by type and method name. In the present disclosure, all target information of the interface test case for the registration function and all target information of the interface test case for the login function can be parsed from the initial script information, and these target information can be written into the corresponding field positions of the database to form the following Figure 2b The use case description data shown in Figure 1. Figure 2b The first row of data shown can be represented as the names of the attributes in the data table, and the content under the column is the corresponding attribute value; Figure 2b The second row of data shown can represent all the target information of the interface test case of the registration function; Figure 2b The third row of data shown can represent all target information in the interface test case of the login function, that is, the generated use case description data includes two use case description data, namely, the use case description data corresponding to the interface test case for the login function and the use case description data corresponding to the interface test case for the registration function. It can be seen that the number of interface test cases included in the initial script information is consistent with the number of use case description data included in the use case description data.

[0071] In step S13, in response to a test command sent by a user to the target use case description data in the target device interface, the target script information corresponding to the target use case description data in the initial script information is executed.

[0072] Optionally, in some embodiments of the present disclosure, when the use case description data of multiple interface test cases are displayed on the target device interface, a control button corresponding to each use case description data in the use case description data can also be generated based on each interface test case in the initial script information, and each control button can be displayed on the target device interface near the corresponding use case description data, so that the user can realize the operation of the test case script by clicking the control button. For example, when a user triggers a control button corresponding to the target use case description data in the target device interface, the target script information corresponding to the target use case description data in the initial script information can be executed in response to a test command sent by the user to the target use case description data. Thus, multiple interface test cases in the test case script are visualized, so that the user can select the corresponding test case from the visualized interface test case for testing based on his own test requirements, which can facilitate the user to flexibly use and operate the information of the test case.

[0073] According to the processing method of interface automation test of the embodiment of the present disclosure, the initial script information containing multiple interface test cases can be parsed to extract multiple target information of each interface test case, and the multiple target information can be written into the corresponding field positions of the database respectively, to generate the use case description data of multiple interface test cases, and the use case description data can be displayed on the target device interface, so as to realize the visualization of the interface test case, which can facilitate the user to see and operate the information of the test case on the interface, for example, the use case logic and the operation use case status can be displayed using the visualized interface, so as to facilitate the management and maintenance of the test case. In addition, the target script information corresponding to the target use case description data in the initial script information can be executed in response to the test command sent by the user to the target use case description data in the target device interface. It can be seen that the present disclosure visualizes multiple interface test cases in the test case script, so that the user can select the corresponding test case from the visualized interface test case for testing based on his own test needs, which can facilitate the user to flexibly use and operate the information of the test case.

[0074] Figure 3 FIG. 1 is a flowchart of a method for processing an interface automation test according to another exemplary embodiment. Figure 3 As shown, the processing method of the interface automatic test includes the following steps.

[0075] In step S31, in response to a submission event of the initial script information, a listening program set in a use case running program in the test framework is started.

[0076] Optionally, after the tester has written the initial script information using the script writing tool software, the initial script information can be submitted to the processing device of the interface automation test of the embodiment of the present disclosure. The processing device of the interface automation test of the embodiment of the present disclosure can start the listening program set in the use case running program in the test framework in the processing device in response to the submission event for the initial script information. Among them, the listening program can be used to implement the work of persisting the test case, that is, writing the information of the use case into the database.

[0077] In step S32, the initial script information including multiple interface test cases is parsed, and multiple target information of each interface test case is extracted.

[0078] In an embodiment of the present disclosure, when a submission event for initial script information is monitored, the initial script information can be acquired, and the initial script information containing multiple interface test cases can be parsed to extract multiple target information of each interface test case.

[0079] In step S33, multiple target information are written into corresponding field positions of the database respectively to generate use case description data of multiple interface test cases.

[0080] In step S34, a write completion message fed back by the listening program is received, and the use case running program in the test framework is exited.

[0081] That is to say, after writing multiple target information into the corresponding field positions of the database and generating use case description data for multiple interface test cases, it can be determined whether a write completion message is received from the listening program. If so, it means that the database write operation has been completed. At this time, you can exit the use case running program in the test framework, so that you can get the use case information without actually executing the use case.

[0082] In step S35, the use case description data is displayed on the target device interface.

[0083] In step S36, in response to a test command sent by the user to the target use case description data in the target device interface, the target script information corresponding to the target use case description data in the initial script information is executed.

[0084] For example, Figure 4As shown, after the tester finishes writing the test case locally, he submits the code to the code management tool (such as gitlab, etc.). The submission event causes the code management tool to automatically trigger the listener to package and compile, which is the most core step. Because the test framework (such as TestNg, etc.) provides a TestContext object, it contains the use case description, dependencies, priorities, grouping and other information of each test case. However, in the prior art, this information can only be obtained when the use case is actually running, rather than statically parsed, so it is necessary to find a compromise so that it will not actually run the use case, but can get this information. The present disclosure customizes a listener (i.e., the above-mentioned listener) in the use case running program (such as testng.xml, etc.) provided by the test framework, which realizes the persistence of test cases, that is, the information of the use case is written into the database (such as class name, method name and other target information). After the listener program is compiled and triggered by the submission event, the use case running program will be executed. In the prior art, the original function of the use case running program is to run the use case, but in the present disclosure, the listener program will be executed before the use case running program runs the use case. The present disclosure utilizes the characteristics and exits the use case running program after the use case running program completes the work of the listener. In this way, the use case information can be obtained without actually executing the use case. All target information in the interface test case is connected to the database to generate the corresponding use case description data, and the use case description data is displayed on the target device interface to complete the use case persistence. Then, a message can be sent to the tester, and the tester can see the test case on the visual test platform interface. The displayed information includes use case description, online and offline status, priority and other information.

[0085] In some embodiments of the present disclosure, after the use case description data is displayed on the target device interface, in response to the user's modification operation on the use case description data in the target device interface, the corresponding information in the database can be synchronously modified according to the modification operation, and when it is detected that the use case description data stored in the database is inconsistent with the initial script information, a modification prompt information is sent. That is, when the use case description data is displayed on the target device interface, the user can modify the use case description data in the target device interface according to his or her own test requirements, and synchronize the modified data to the database. In the present disclosure, it is possible to regularly or periodically monitor whether the use case description data stored in the database is consistent with the initial script information. If it is inconsistent, it means that the visualized test case content has been modified, but the initial script information has not been modified. At this time, a modification prompt information can be sent to the device used to write the initial script information, so that the device makes corresponding modifications to the initial script information based on the modification prompt information, thereby realizing a scenario in which users can flexibly write test cases.

[0086] It can be seen that the disclosed embodiment separates the work of script writing and script persistence. Users only need to write test cases and submit the code to see the updated content on the platform without having to manually perform a persistence operation. This allows users to flexibly write test case scenarios and conveniently see and operate the use case information on the interface.

[0087] Figure 5 1 is a block diagram of a processing device for interface automation testing according to an exemplary embodiment. Figure 5 The device includes a parsing module 510, a writing module 520, a display module 530 and an execution module 540.

[0088] Specifically, the parsing module 510 is configured to parse the initial script information containing multiple interface test cases and extract multiple target information of each interface test case. In some embodiments of the present disclosure, the parsing module 510 is specifically configured to:

[0089] The initial script information is matched with the preset name keywords; if the match is successful, the class name and method name of each interface test case are extracted from the initial script information according to the name keywords.

[0090] In other embodiments of the present disclosure, the parsing module 510 is further specifically configured to: match the initial script information with a preset extended keyword; if the match is successful, extract the extended information of each interface test case from the initial script information according to the extended keyword.

[0091] The writing module 520 is configured to write multiple target information into corresponding field positions of the database respectively, and generate use case description data of multiple interface test cases.

[0092] The display module 530 is configured to display the use case description data on the target device interface.

[0093] The execution module 540 is configured to execute the target script information corresponding to the target use case description data in the initial script information in response to a test command sent by a user to the target use case description data in the target device interface.

[0094] In some embodiments of the present disclosure, Figure 6As shown, the processing device 500 for interface automated testing may also include: a startup module 550 and a processor module 560. The startup module 550 is configured to start a listening program set in a use case running program in the test framework in response to a submission event of the initial script information before the parsing module 510 parses the initial script information containing multiple interface test cases and extracts multiple target information of each interface test case; the processor module 560 is configured to receive a writing completion message fed back by the listening program after the writing module 520 writes multiple target information into corresponding field positions of the database and generates use case description data of multiple interface test cases, and then exit the use case running program in the test framework.

[0095] In some embodiments of the present disclosure, Figure 7 As shown, the processing device 500 for interface automated testing may further include: a modification module 570 and a sending module 580. The modification module 570 is configured to respond to a modification operation of the user on the use case description data in the target device interface, and synchronously modify the corresponding information in the database according to the modification operation; the sending module 580 is configured to send modification prompt information when it is detected that the use case description data stored in the database is inconsistent with the initial script information.

[0096] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0097] According to the processing device of the interface automation test of the embodiment of the present disclosure, the initial script information containing multiple interface test cases can be parsed to extract multiple target information of each interface test case, and the multiple target information can be written into the corresponding field positions of the database respectively, to generate the use case description data of multiple interface test cases, and the use case description data can be displayed on the target device interface, so as to realize the visualization of the interface test case, which can facilitate the user to see and operate the information of the test case on the interface, for example, the use case logic and the operation use case status can be displayed using the visualized interface, so as to facilitate the management and maintenance of the test case. In addition, the target script information corresponding to the target use case description data in the initial script information can be executed in response to the test command sent by the user to the target use case description data in the target device interface. It can be seen that the present disclosure visualizes multiple interface test cases in the test case script, so that the user can select the corresponding test case from the visualized interface test case for testing based on his own test needs, which can facilitate the user to flexibly use and operate the information of the test case.

[0098] Figure 8800 is a block diagram of a processing device for interface automation testing according to an exemplary embodiment. It should be noted that the processing device for interface automation testing may be an electronic device, and the electronic device may be installed with a client corresponding to a multimedia resource social platform. For example, the electronic device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0099] Reference Figure 8 , the electronic device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .

[0100] The processing component 802 generally controls the overall operation of the electronic device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.

[0101] The memory 804 is configured to store various types of data to support operations on the electronic device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0102] The power supply component 806 provides power to the various components of the electronic device 800. The power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 800.

[0103] The multimedia component 808 includes a touch screen that provides an output interface between the electronic device 800 and the user. In some embodiments, the touch screen may include a liquid crystal display (LCD) and a touch panel (TP). The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor can not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the electronic device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have a focal length and optical zoom capability.

[0104] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the electronic device 800 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.

[0105] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: home button, volume button, start button, and lock button.

[0106] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the electronic device 800. For example, the sensor assembly 814 can detect the open / closed state of the electronic device 800, the relative positioning of the components, such as the display and keypad of the electronic device 800, and the sensor assembly 814 can also detect the position change of the electronic device 800 or a component of the electronic device 800, the presence or absence of contact between the user and the electronic device 800, the orientation or acceleration / deceleration of the electronic device 800, and the temperature change of the electronic device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0107] The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0108] In an exemplary embodiment, the electronic device 800 can be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above-mentioned processing method for interface automation testing.

[0109] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by a processor 820 of an electronic device 800 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0110] A non-temporary computer-readable storage medium, when the instructions in the storage medium are executed by the processor of the electronic device 800, enables the electronic device 800 to execute the processing method of interface automation testing described in the above embodiment.

[0111] A computer program product, when instructions in the computer program product are executed by a processor of an electronic device 800, enables the electronic device 800 to execute a processing method for interface automation testing.

[0112] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0113] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A method for processing interface automated testing, characterized in that: include: In response to a submission event of the initial script information, a listening program set in a use case running program in the test framework is started; The listening program is used to implement the test case persistence work and write the test case information into the database; Parsing the initial script information containing multiple interface test cases, and extracting multiple target information of each of the interface test cases; Writing the multiple target information into corresponding field positions of the database respectively, generating use case description data of the multiple interface test cases, and displaying the use case description data on the target device interface; the number of use case description data included in the use case description data is consistent with the number of the interface test cases; In response to a test command sent by a user to the target use case description data in the target device interface, executing the target script information corresponding to the target use case description data in the initial script information; Wherein, after the multiple target information are written into the corresponding field positions of the database respectively to generate the use case description data of the multiple interface test cases, the method further includes: Receive a write completion message fed back by the listening program; Exit the test case runner in the test framework.

2. The method according to claim 1, characterized in that The parsing includes initial script information of a plurality of interface test cases, and extracting a plurality of target information of each of the interface test cases, including: Matching the initial script information with preset name keywords; If the match is successful, the class name and method name of each interface test case are extracted from the initial script information according to the name keyword.

3. The method according to claim 2, characterized in that The parsing includes initial script information of a plurality of interface test cases, extracting a plurality of target information of each of the interface test cases, and further includes: Matching the initial script information with preset extended keywords; If the match is successful, the extended information of each of the interface test cases is extracted from the initial script information according to the extended keywords.

4. The method according to any one of claims 1 to 3, characterized in that: After displaying the use case description data on the target device interface, the method further includes: In response to a modification operation of the user on the use case description data in the target device interface, synchronously modifying corresponding information in the database according to the modification operation; When it is detected that the use case description data stored in the database is inconsistent with the initial script information, a modification prompt message is sent.

5. A processing device for interface automation testing, characterized in that: include: A startup module is configured to start a listening program set in a test case running program in a test framework in response to a submission event of the initial script information; the listening program is used to implement the test case persistence work and write the test case information into a database; A parsing module, configured to parse the initial script information containing multiple interface test cases, and extract multiple target information of each of the interface test cases; A writing module is configured to write the plurality of target information into corresponding field positions of the database respectively, and generate use case description data of the plurality of interface test cases; The number of use case description data items contained in the use case description data is consistent with the number of the interface test cases; A display module, configured to display the use case description data on a target device interface; an execution module, configured to execute the target script information corresponding to the target use case description data in the initial script information in response to a test command sent by a user to the target use case description data in the target device interface; The processor module is configured so that the writing module writes the multiple target information into the corresponding field positions of the database respectively, generates the use case description data of the multiple interface test cases, receives the writing completion message fed back by the listening program, and exits the use case running program in the test framework.

6. The device according to claim 5, characterized in that The parsing module is specifically configured as follows: Matching the initial script information with preset name keywords; If the match is successful, the class name and method name of each interface test case are extracted from the initial script information according to the name keyword.

7. The device according to claim 6, characterized in that The parsing module is also specifically configured as follows: Matching the initial script information with preset extended keywords; If the match is successful, the extended information of each of the interface test cases is extracted from the initial script information according to the extended keywords.

8. The device according to any one of claims 5 to 7, characterized in that: Also includes: A modification module, configured to respond to a modification operation of the user on the use case description data in the target device interface, and synchronously modify corresponding information in the database according to the modification operation; The sending module is configured to send modification prompt information when it is detected that the use case description data stored in the database is inconsistent with the initial script information.

9. A processing device for interface automation testing, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the method for processing interface automation testing as described in any one of claims 1 to 4.

10. A storage medium, when instructions in the storage medium are executed by a processor of an interface automation test processing device, the interface automation test processing device can execute the interface automation test processing method according to any one of claims 1 to 4.

11. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the processing method for interface automation testing according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Control method based on unreal engine and related device

    CN109753276A

  • Method and device for generating test script and automatic test method

    CN110413524A

  • Test case management method and device, storage medium and electronic equipment

    CN111078580A

  • Test case generation method and device, computer equipment and storage medium

    CN111176996A

  • Test control program, test control device and test control method

    JP2019086846A