User interface testing method and apparatus, electronic device, and readable storage medium
By acquiring and analyzing the execution methods and environment information of user interface test cases, the problem of traditional testing platforms being unable to flexibly specify the test environment is solved, thus realizing flexible and convenient user interface testing.
Patent Information
- Application Number
- CN202211056929.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-31
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2042-08-31
AI Technical Summary
Traditional automated testing platforms cannot specify the environment of the test page at multiple dimensions during recording, resulting in a less flexible and convenient user interface testing process.
This paper provides a user interface testing method. By acquiring test cases, analyzing and processing them to obtain the test case execution method and test environment information, determining the environment selection information, and performing test processing based on this information, the test code results are finally analyzed to obtain the user interface test results.
It achieves flexibility and simplicity in the user interface testing process, and can flexibly set the test environment according to different test environments and execution methods, thereby improving testing efficiency.
Smart Images

Figure CN115292196B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to, but are not limited to, the technical field of data processing, and in particular to a user interface testing method and device, electronic equipment and computer readable storage medium. BACKGROUND
[0002] The purpose of user interface testing is to ensure that the user interface will provide corresponding access or browsing functions for users through the functions of the test object, and to ensure that the user interface meets the industry standards. In the actual testing process, the iterative process workflow using the agile development mode is usually a loop process, and multiple test environments are usually used in different versions. The traditional automated testing platform can only switch the environment for the entry page link during recording, and cannot specify the environment for the test page in multiple dimensions, which makes the user interface testing process not flexible and simple enough. SUMMARY
[0003] The following is a summary of the subject matter described in detail herein. This summary is not intended to limit the scope of the claims.
[0004] In order to solve the problems mentioned in the background art, the embodiments of the present application provide a user interface testing method, device, electronic equipment and computer readable storage medium, which makes the user interface testing process more flexible and simple.
[0005] In a first aspect, the embodiments of the present application provide a user interface testing method, which comprises:
[0006] Obtaining a test case;
[0007] Performing first analysis and processing on the test case to obtain a case execution mode and test environment information corresponding to the case execution mode;
[0008] Performing determination processing on the test environment information to obtain environment selection information;
[0009] According to the case execution mode and the environment selection information, performing test processing on the test case to obtain a test code result;
[0010] Performing second analysis and processing on the test code result to obtain a user interface test result.
[0011] According to the user interface test method provided in the embodiments of the present application, the following beneficial effects are achieved. Firstly, the test case to be tested is acquired. Then, the test case to be tested is subjected to first analysis processing to obtain a case execution mode and test environment information corresponding to the case execution mode. Then, the test environment information is subjected to determination processing to obtain environment selection information. Then, the test case to be tested is subjected to test processing according to the case execution mode and the environment selection information to obtain test code results. Finally, the test code results are subjected to second analysis processing to obtain user interface test results. Through the above technical solution, the test environment for case execution can be flexibly set, and the test process of the user interface is more flexible and simple.
[0012] According to some embodiments of the present application, the first analysis processing of the test case to be tested to obtain the case execution mode and the test environment information corresponding to the case execution mode comprises:
[0013] The test case to be tested is subjected to conversion processing to obtain a test script to be tested.
[0014] The test script to be tested is subjected to interpretation processing to obtain the case execution mode and the test environment information corresponding to the case execution mode.
[0015] According to some embodiments of the present application, the determination processing of the test environment information to obtain the environment selection information comprises:
[0016] The test environment information is subjected to first judgment processing. In a case where the test environment information comprises step specified test environment information, the step specified test environment information is determined as the environment selection information.
[0017] In a case where the test environment information does not comprise the step specified test environment information, the test environment information is subjected to second judgment processing to determine whether the test environment information comprises case specified test environment information.
[0018] In a case where the test environment information comprises case specified test environment information, the case specified test environment information is determined as the environment selection information.
[0019] In a case where the test environment information does not comprise the step specified test environment information and the case specified test environment information, project specified environment information comprised in the test environment information is determined as the environment selection information.
[0020] According to some embodiments of the present application, the test processing of the test case to be tested according to the case execution mode and the environment selection information to obtain test code results comprises:
[0021] In a case that the case execution mode is a single case execution mode, the test code result is obtained by performing a single execution process on the test case according to the environment selection information;
[0022] In a case that the case execution mode is a batch execution mode, the test code result is obtained by performing a common execution process on the test case according to the environment selection information;
[0023] In a case that the case execution mode is a serial execution mode, the test code result is obtained by performing a sequential execution process on the test case according to the environment selection information.
[0024] According to some embodiments of the present application, before the test process is performed on the test case according to the case execution mode and the environment selection information, the method further comprises:
[0025] creating a timing regression task;
[0026] triggering the test process on the test case in a case that time reaches a specified time of the timing regression task.
[0027] According to some embodiments of the present application, the test case is obtained by:
[0028] creating a project and setting a plurality of test environments on a test platform;
[0029] creating the test case and setting a corresponding case recording environment; wherein the test case comprises a test page;
[0030] setting an operation step of the test page.
[0031] According to some embodiments of the present application, the second analysis process on the test code result obtains a user interface test result, comprising:
[0032] performing a feasibility analysis on the test code result to obtain a first analysis result;
[0033] performing a stability analysis on the test code result to obtain a second analysis result;
[0034] integrating the first analysis result and the second analysis result to obtain the user interface test result.
[0035] In a second aspect, the embodiments of the present application further provide a user interface test device, comprising:
[0036] a first processing module configured to obtain a test case;
[0037] a second processing module, configured to perform first analysis processing on the to-be-tested case to obtain a case execution mode and test environment information corresponding to the case execution mode;
[0038] a third processing module, configured to perform determination processing on the test environment information to obtain environment selection information;
[0039] a fourth processing module, configured to perform test processing on the to-be-tested case according to the case execution mode and the environment selection information to obtain a test code result;
[0040] a fifth processing module, configured to perform second analysis processing on the test code result to obtain a user interface test result.
[0041] In a third aspect, an electronic device is provided, which includes a memory, a processor, and a computer program stored in the memory and capable of running on the processor. When the processor executes the computer program, the user interface test method in the first aspect is implemented.
[0042] In a fourth aspect, a computer readable storage medium is provided, which stores computer executable instructions for implementing the user interface test method in the first aspect.
[0043] Other features and advantages of the present application will be further described in the following description, and will become apparent from the description, or be learned through practice of the present application. The objects and other advantages of the present application will be realized and achieved by particularly pointed out in the description, claims, and drawings. BRIEF DESCRIPTION OF DRAWINGS
[0044] The accompanying drawings are included to provide a further understanding of the technical solutions of the present application, constitute a part of the specification, and are used to explain the technical solutions of the present application together with the embodiments of the present application, and do not limit the technical solutions of the present application.
[0045] Figure 1 is a flowchart of a user interface test method provided by an embodiment of the present application;
[0046] Figure 2 is a flowchart of analysis processing on a to-be-tested case in a user interface test method provided by an embodiment of the present application;
[0047] Figure 3 is a flowchart of determination processing on test environment information in a user interface test method provided by an embodiment of the present application;
[0048] Figure 4is a flowchart of a process of testing a case to be tested in a user interface testing method provided by an embodiment of the present application;
[0049] Figure 5 is a flowchart of a user interface testing process provided by another embodiment of the present application;
[0050] Figure 6 is a flowchart of a process of obtaining a case to be tested in a user interface testing method provided by an embodiment of the present application;
[0051] Figure 7 is a flowchart of a process of analyzing a test code result in a user interface testing method provided by an embodiment of the present application
[0052] Figure 8 is a schematic diagram of a user interface testing apparatus provided by an embodiment of the present application;
[0053] Figure 9 is a schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0054] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and should not be used to limit the present application.
[0055] It should be noted that, although the functional modules are divided in the apparatus schematic diagram, and the logical order is shown in the flowchart, in some cases, the steps shown or described can be performed in a manner different from the module division in the apparatus or the order in the flowchart. The terms "first", "second", and the like in the specification and claims and the above-described drawings are used to distinguish similar objects, and do not necessarily describe a specific order or sequence.
[0056] It should be noted that, unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the present application belongs. The terms used herein are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.
[0057] The embodiments of the present application can acquire and process related data based on artificial intelligence technology. Artificial intelligence (AI) is the use of digital computers or computer-controlled machines to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0058] AI is a new technical science of theories, methods, techniques and application systems for simulating, extending and expanding human intelligence; artificial intelligence is a branch of computer science, artificial intelligence attempts to understand the essence of intelligence, and produce a new intelligent machine that can react in a similar way to human intelligence, the research in this field includes robots, language recognition, image recognition, natural language processing and expert systems, etc. Artificial intelligence can simulate the information process of human consciousness and thinking. Artificial intelligence is also a theory, method, technique and application system for simulating, extending and expanding human intelligence by using a digital computer or a digital computer controlled machine, perceiving the environment, acquiring knowledge and using knowledge to obtain the best results.
[0059] The basic technology of artificial intelligence generally includes technologies such as sensors, special artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction system, mechatronics, etc. Artificial intelligence software technology mainly includes computer vision technology, robot technology, biometric technology, speech processing technology, natural language processing technology, and machine learning / deep learning, etc. several major directions.
[0060] Artificial intelligence is AI, AI is a theory, method, technique and application system for simulating, extending and expanding human intelligence by using a digital computer or a digital computer controlled machine, perceiving the environment, acquiring knowledge and using knowledge to obtain the best results.
[0061] The server involved in artificial intelligence technology can be a standalone server, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms, etc. Basic cloud computing services.
[0062] The application provides a user interface test method and device, electronic equipment and computer readable storage medium, first, the test case is obtained; then the test case is analyzed and processed to obtain the case execution mode and the test environment information corresponding to the case execution mode; then the test environment information is determined to obtain the environment selection information; then the test case is tested according to the case execution mode and the environment selection information to obtain the test code result; finally, the test code result is analyzed and processed to obtain the user interface test result; through the above technical solution, the test environment of the case execution can be flexibly set, and the test process of the user interface is more flexible and simple.
[0063] The user interface test method provided in the embodiments of the present application relates to the technical field of data processing. The user interface test method provided in the embodiments of the present application can be applied to a terminal, can be applied to a server end, and can also be software running in the terminal or the server end. In some embodiments, the terminal can be a smart phone, a tablet computer, a notebook computer, a desktop computer, etc.; the server end can be configured as a separate physical server, can be configured as a server cluster or a distributed system formed by multiple physical servers, can also be configured as a cloud server providing basic cloud computing services such as cloud service, cloud database, cloud computing, cloud function, cloud storage, network service, cloud communication, middleware service, domain name service, security service, CDN, and big data and artificial intelligence platform; and the software can be an application for implementing the user interface test method, but is not limited to the above forms.
[0064] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as a program module. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in a distributed computing environment, in which tasks are performed by remote processing devices connected by a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media, including storage devices.
[0065] It should be noted that in each specific embodiment of the present application, when relevant processing needs to be performed according to user information, user behavior data, user history data, and user location information, etc. related to the identity or characteristics of the user, the user's permission or consent will be obtained first, and the collection, use and processing of the data will comply with relevant laws, regulations and standards of the country and region. In addition, when the embodiments of the present application need to obtain sensitive personal information of the user, the separate permission or separate consent of the user will be obtained through a pop-up window or a jump to a confirmation page, and after obtaining the separate permission or separate consent of the user, the necessary user-related data for enabling the embodiments of the present application to normally run will be obtained.
[0066] The embodiments of the present application will be further described below with reference to the accompanying drawings.
[0067] As Figure 1 shown, Figure 1is a flowchart of a user interface testing method provided by an embodiment of the present application, which includes but is not limited to steps S100-S500.
[0068] In step S100, a case to be tested is acquired.
[0069] In step S200, a first analysis processing is performed on the case to be tested to obtain a case execution mode and test environment information corresponding to the case execution mode.
[0070] In step S300, a determination processing is performed on the test environment information to obtain environment selected information.
[0071] In step S400, a test processing is performed on the case to be tested according to the case execution mode and the environment selected information to obtain a test code result.
[0072] In step S500, a second analysis processing is performed on the test code result to obtain a user interface test result.
[0073] It should be noted that, first, the case to be tested is acquired; then, a first analysis processing is performed on the case to be tested to obtain a case execution mode and test environment information corresponding to the case execution mode; then, a determination processing is performed on the test environment information to obtain environment selected information; then, a test processing is performed on the case to be tested according to the case execution mode and the environment selected information to obtain a test code result; finally, a second analysis processing is performed on the test code result to obtain a user interface test result; through the above technical solution, the test environment of the case execution can be flexibly set, and the test process of the user interface is more flexible and simple.
[0074] It should be noted that, the case to be tested is a case that needs to be tested in the user interface; for example, the case to be tested can be an operation of inputting an account and password and then clicking to log in; or can be clicking a trigger button on the user interface; or can be triggering a scroll display on the user interface; or can be clicking to upload a file.
[0075] It should be noted that the user interface refers to the overall design of the man-machine interaction, operation logic, and interface aesthetics of the software. Good user interface design not only makes the software personalized and tasteful, but also makes the operation of the software comfortable, simple, free, and fully reflects the positioning and characteristics of the software. The user interface is the medium for interaction and information exchange between the system and the user, which realizes the conversion between the internal form of information and the form acceptable by humans. The user interface is the software designed for the interaction between users and hardware, which enables users to conveniently and efficiently operate hardware to achieve two-way interaction and complete the work they want to do with hardware. The user interface is defined broadly and includes human-computer interaction and graphical user interface. There is a user interface in any field that involves information exchange between humans and machines.
[0076] It can be understood that the first analysis and processing of the test case can obtain the corresponding case execution mode and the test environment information corresponding to the case execution mode; different cases can have different execution modes, and each case has a corresponding test environment during execution.
[0077] It should be noted that the determination and processing of the test environment information can obtain the environment selection information; then the test processing of the test case according to the case execution mode and the environment selection information can obtain the test code result. Finally, the second analysis and processing of the test code result can obtain the user interface test result.
[0078] In some embodiments, as shown in Figure 2 The step S200 can include, but is not limited to, steps S210 to S220.
[0079] Step S210, converting the test case to obtain a test script;
[0080] Step S220, interpreting the test script to obtain the case execution mode and the test environment information corresponding to the case execution mode.
[0081] It should be noted that in the first analysis and processing of the test case, the test case can be first converted to obtain a test script, and then the test script is interpreted to obtain the case execution mode and the test environment information corresponding to the case execution mode.
[0082] It is worth noting that the conversion of the test case can be obtained by the test script; the script is an extension of the batch file, which is a program saved in pure text. Generally, the computer script program is a combination of a series of computer operation control actions, and a certain logic branch can be realized in it. Simply put, the script is a text command, which can be seen (such as opening and viewing, editing with notepad). When the script program is executed, it is translated into machine recognizable instructions by a system interpreter, and executed in sequence. Because the script has an additional translation process when it is executed, its execution efficiency is slightly lower than that of the binary program. Scripts can be called and executed temporarily by application programs. Various scripts are widely used in web design because scripts can not only reduce the size of the web page and improve the browsing speed, but also enrich the performance of the web page, such as animation, sound, etc. For example, when the email address on the web page is clicked, the email software can be automatically called, which is realized by the script function. Because of these characteristics of the script, it is often used by some people with ulterior motives. For example, some commands that damage the computer system are added to the script, so that when the user browses the web page, the system of the user will be attacked once the script is called. Therefore, users should choose the security level according to the trust degree of the accessed web page, especially for those illegal web pages, do not easily allow the use of scripts. Through the "security settings" dialog box, you can easily disable and enable scripts by selecting the various settings under the "script" option.
[0083] It is worth noting that the interpretation of the test script can obtain the case execution mode and the test environment information corresponding to the case execution mode; for example, the script code of the test script can be analyzed to obtain the corresponding case execution mode and the test environment information corresponding to the case execution mode.
[0084] In some embodiments, as shown in Figure 3 The above step S300 can include but is not limited to steps S310-S340.
[0085] Step S310, the first judgment processing of the test environment information, in the case of step specified test environment information included in the test environment information, the step specified test environment information is determined as the environment selected information;
[0086] Step S320, in the case of step specified test environment information not included in the test environment information, the second judgment processing of the test environment information is performed to determine whether the test environment information includes the case specified test environment information;
[0087] Step S330, in the case that the test environment information includes the case specified test environment information, determining the case specified test environment information as the environment selected information;
[0088] Step S340, in the case that the test environment information does not include the step specified test environment information and the case specified test environment information, determining the project specified environment information included in the test environment information as the environment selected information.
[0089] It should be noted that, in the process of determining the test environment information, first, the test environment information is subjected to a first judgment processing, in the case that the test environment includes the step specified test environment information, the step specified test environment information is determined as the environment selected information; in the case that the test environment information does not include the step specified test environment information, the test environment information is subjected to a second judgment processing, which can determine whether the test environment information includes the case specified test environment information; in the case that the test environment information includes the case specified test environment information, the case specified test environment information is determined as the environment selected information; in the case that the test environment does not include the step specified test environment information and the case specified test environment information, the project specified environment information included in the test environment information is determined as the environment selected information.
[0090] It should be noted that, in the process of determining the test environment information, multiple judgment processing is performed, and different case specified test environment information has different priority; in the embodiments of the present application, the priority of the step specified test environment information is higher than that of the case specified test environment information, and the priority of the case specified test environment information is higher than that of the project specified environment information. First, the test environment information is subjected to a first judgment processing to determine whether the test environment information includes the step specified test environment information, in the case that the test environment information includes the step specified test environment information, the step specified test environment information is determined as the environment selected information; in the case that the test environment information does not include the step specified test environment information, it is further determined whether the test environment information includes the case specified test environment information, if the test environment information includes the case specified test environment information, the case specified test environment information is determined as the environment selected information; if the test environment information does not include the case specified test environment information, the project specified environment information included in the test environment information is determined as the environment selected information.
[0091] It can be understood that the test environment information at least includes the project specified environment information, and can also include the step specified test environment information and the case specified test environment information; and the priority of the step specified test environment information is the highest, then the case specified test environment information, and the priority of the project specified environment information is the lowest.
[0092] It is worth noting that through the above setting, the function of the test environment is specified from the project, case, and step dimensions, which facilitates flexible response to various complex test scenarios; and the step dimension supports specifying a test environment that can solve the problem that certain functions can only run in a specific test environment due to data and other reasons.
[0093] In some embodiments, as shown in Figure 4 The step S400 can include, but is not limited to, the step S410 and the step S430.
[0094] The step S410, in the case of the single-case execution mode, performs separate execution processing on the test case according to the environment selection information to obtain the test code result.
[0095] The step S420, in the case of the batch execution mode, performs common execution processing on the test case according to the environment selection information to obtain the test code result.
[0096] The step S430, in the case of the serial execution mode, performs sequential execution processing on the test case according to the environment selection information to obtain the test code result.
[0097] It should be noted that in the process of testing the test case, the case execution mode is first confirmed, in the case of the single-case execution mode, separate execution processing is performed on the test case according to the environment selection information, thereby obtaining the test code result; in the case of the batch execution mode, common batch execution processing is performed on the test case according to the environment selection information, thereby obtaining the test code result; in the case of the serial execution mode, sequential execution is performed on the test case according to the environment selection information, and the corresponding test code result is also obtained.
[0098] It can be understood that in the process of testing the test case, the case execution mode is first confirmed, in the case of the single-case execution mode, separate execution processing is performed on the test case according to the environment selection information; for example, in the case of the step specified test environment information as the environment selection information, separate execution processing is performed on the test case according to the step specified test environment information, thereby obtaining the corresponding test code result; in the case of the case specified test environment information as the environment selection information, separate execution processing is performed on the test case according to the case specified test environment information, and the corresponding test code result can also be obtained.
[0099] It can be understood that the platform supports single case execution, batch execution and serial execution of test cases. If the recorded case needs to be debugged, a test case can be executed individually; if the test scene does not require the order of case execution, batch execution can be set, without distinguishing the execution order, and the cases to be tested are executed together; if the test scene requires the test cases to be executed in sequence, serial execution can be set, and the execution order can be set to meet various business scenarios that the test cases need to cover.
[0100] In some embodiments, as shown in FIG. 1 1, Figure 5 The step S340 can include, but is not limited to, the step S350 and the step S360.
[0101] The step S350 creates a timing regression task.
[0102] The step S360 triggers the test processing of the test cases to be tested when the time reaches the specified time of the timing regression task.
[0103] It should be noted that a timing regression task can also be created, and when the time reaches the specified time of the timing regression task, the test processing of the test cases to be tested is triggered. For example, a timing regression task can be created, and the time of the timing regression task is set to 10 minutes. When the waiting time after the previous test reaches 10 minutes, the test processing of the test cases to be tested is started again, and the test processing of the test cases to be tested can be performed again through batch execution, so that the user interface test work can be automatically completed.
[0104] In some embodiments, as shown in FIG. 1, Figure 6 The step S100 can include, but is not limited to, the step S1 10, the step S120 and the step S130.
[0105] The step S1 10 creates a project on the test platform and sets multiple test environments.
[0106] The step S120 creates test cases to be tested and sets the corresponding case recording environment; wherein the test cases to be tested include test pages.
[0107] The step S130 sets the operation steps of the test pages.
[0108] It should be noted that the project is created on the test platform and multiple test environments are set; the test cases to be tested are created and the corresponding case recording environment is set; wherein the test cases to be tested include test pages; finally, the operation steps of the test pages are set and processed, so that the test cases to be tested are set accordingly.
[0109] Exemplarily, a project is created on a test platform, and multiple sets of test environments are set. A case is created, and a test environment specified for case recording, a page to be tested, a login account and password are set. The platform can display the page to be tested when it enters the case editing page, and automatically log in, reducing the operation steps of the test personnel. Page elements of operations and test modes performed on the page elements, such as clicking, inputting, asserting, uploading files, and executing functions, are set. For complex operations, the browser can be operated through preset functions, such as setting a date with a fixed time interval, and operating a rich text editor.
[0110] In some embodiments, as shown in Figure 7 The step S500 can include, but is not limited to, a step S510, a step S520, and a step S530.
[0111] The step S510 is to analyze the test code result for feasibility to obtain a first analysis result.
[0112] The step S520 is to analyze the test code result for stability to obtain a second analysis result.
[0113] The step S530 is to integrate the first analysis result and the second analysis result to obtain a user interface test result.
[0114] It should be noted that in the process of the second analysis processing of the test code result, first, the test code result is analyzed for feasibility to obtain a first analysis result; then, the test code result is analyzed for stability to obtain a second analysis result; finally, the first analysis result and the second analysis result are integrated to obtain a user interface test result.
[0115] It can be understood that the feasibility analysis is to analyze the test result in the user interface test process, and analyze whether the expected effect can be achieved in the test process. If the expected effect can be achieved, it proves that the case to be tested is feasible. The stability is to detect the stability of the user interface test, and detect whether the expected test result can stably appear. If the expected test result can stably appear, it proves that the stability of the test process of the case to be tested is high. Finally, the first analysis result obtained by the feasibility analysis and the second analysis result obtained by the stability analysis are combined to obtain the user interface test result.
[0116] In addition, as shown in Figure 8 An embodiment of the present application further provides a user interface test device 10, which comprises:
[0117] A first processing module 100 is configured to obtain a case to be tested.
[0118] The second processing module 200 is configured to perform first analysis processing on the to-be-tested case to obtain a case execution mode and test environment information corresponding to the case execution mode.
[0119] The third processing module 300 is configured to perform determination processing on the test environment information to obtain environment selection information.
[0120] The fourth processing module 400 is configured to perform test processing on the to-be-tested case according to the case execution mode and the environment selection information to obtain a test code result.
[0121] The fifth processing module 500 is configured to perform second analysis processing on the test code result to obtain a user interface test result.
[0122] It should be noted that, first, the to-be-tested case is obtained; then, first analysis processing is performed on the to-be-tested case to obtain a case execution mode and test environment information corresponding to the case execution mode; then, determination processing is performed on the test environment information to obtain environment selection information; then, test processing is performed on the to-be-tested case according to the case execution mode and the environment selection information to obtain a test code result; finally, second analysis processing is performed on the test code result to obtain a user interface test result; through the above technical solution, the test environment of the case execution can be flexibly set, and the test process of the user interface is more flexible and simple.
[0123] It should be noted that the to-be-tested case is a case that needs to be tested on the user interface; for example, the to-be-tested case can be an operation of inputting an account and a password and then clicking to log in; or can be clicking a trigger button on the user interface; or can be triggering a scroll display on the user interface; or can be clicking to upload a file.
[0124] It's important to clarify that the user interface (UI) refers to the overall design of software's human-computer interaction, operational logic, and aesthetic appeal. A good UI design not only makes software more personalized and sophisticated but also ensures comfortable, simple, and intuitive operation, fully reflecting the software's positioning and characteristics. The UI serves as the medium for interaction and information exchange between the system and the user, facilitating the conversion between the internal form of information and a human-readable format. The UI is software designed to facilitate communication between the user and hardware, enabling users to operate the hardware conveniently and efficiently to achieve two-way interaction and complete desired tasks. The definition of a UI is broad, encompassing both human-computer interaction and graphical user interfaces (GUIs). UIs exist in any field involving information exchange between humans and machines.
[0125] It is understandable that by performing the first analysis on the test cases, we can obtain the corresponding case execution method and the test environment information corresponding to the case execution method; different cases can have different execution methods, and each case will have a corresponding test environment during the execution process.
[0126] The specific implementation of this user interface testing device is basically the same as the specific embodiment of the user interface testing method described above, and will not be repeated here.
[0127] In addition, such as Figure 9 As shown, one embodiment of this application also provides an electronic device 700, which includes: a memory 720, a processor 710, and a computer program stored on the memory 720 and executable on the processor 710.
[0128] The processor 710 and memory 720 can be connected via a bus or other means.
[0129] The non-transient software program and instructions required to implement the user interface testing method of the above embodiments are stored in the memory 720. When executed by the processor 710, the user interface testing methods of the above embodiments are executed, for example, the methods described above are executed. Figure 1 Method steps S100 to S500 Figure 2 Method steps S210 to S220, Figure 3 Method steps S310 to S340 in the text Figure 4 Method steps S410 to S430, Figure 5 Method steps S350 to S360 in the textFigure 6 Method steps S110 to S130 and Figure 7 Method steps S510 to S530.
[0130] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0131] Furthermore, one embodiment of this application also provides a computer-readable storage medium storing computer-executable instructions that are executed by a processor 710 or a controller, for example, by a processor 710 in the above-described device embodiment, causing the processor 710 to perform the user interface testing method in the above-described embodiment, for example, performing the above-described... Figure 1 Method steps S100 to S500 Figure 2 Method steps S210 to S220, Figure 3 Method steps S310 to S340 in the text Figure 4 Method steps S410 to S430, Figure 5 Method steps S350 to S360 in the text Figure 6 Method steps S110 to S130 and Figure 7 Method steps S510 to S530.
[0132] The above embodiments can be used in combination, and modules with the same name in different embodiments may be the same or different.
[0133] The foregoing has described specific embodiments of this application; other embodiments are within the scope of the appended claims. In some cases, the actions or steps described in the claims may be performed in a different order than those shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily have to follow the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0134] The various embodiments in this application are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the embodiments of apparatus, devices, and computer-readable storage media are basically similar to the method embodiments, so the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0135] The device, the equipment, the computer readable storage medium and the method provided by the embodiments of the present application are corresponding, therefore, the device, the equipment, the nonvolatile computer storage medium also has similar beneficial technical effects as the corresponding method, since the beneficial technical effects of the method have been described in detail above, therefore, the beneficial technical effects of the corresponding device, equipment, computer storage medium will not be described here.
[0136] In the 1990s, it was quite obvious to distinguish whether an improvement in a technology was in hardware (e.g., improvement in circuit structures of diodes, transistors, switches, etc.) or in software (improvement in method flow). However, as technology has evolved, many improvements in method flow today can be considered as direct improvements in hardware circuit structures. Designers almost always obtain the corresponding hardware circuit structures by programming the improved method flow into hardware circuits. Therefore, it cannot be said that an improvement in a method flow cannot be implemented by hardware entity modules. For example, a programmable logic device (PLD) (e.g., a field programmable gate array (FPGA)) is an integrated circuit whose logic function is determined by user programming of the device. A digital system is "integrated" on a PLD by the designer programming it, rather than by asking a chip manufacturer to design and fabricate a custom integrated circuit chip. Moreover, instead of manually fabricating integrated circuit chips, this programming is now mostly implemented by "logic compiler" software, which is similar to software compilers used in program development, and the original code to be compiled is written in a specific programming language, which is called a hardware description language (HDL), and there are many such languages, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc., and the most commonly used are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should be aware that, as long as the method flow is logically programmed in the above-mentioned hardware description languages and programmed into an integrated circuit, a hardware circuit implementing the logical method flow can be easily obtained.
[0137] The controller can be implemented in any suitable way, for example, the controller can take the form of a microprocessor or processor and a computer readable medium storing computer readable program code, such as software or firmware, executable by the (micro)processor, logic gates, switches, an application specific integrated circuit (ASIC), a programmable logic controller and an embedded microcontroller, examples of which include but are not limited to the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20 and Silicone Labs C8051F320, the memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also know that, in addition to being implemented in pure computer readable program code, the controller can also be implemented to perform the same functions in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers and embedded microcontrollers, etc. by logically programming the method steps. Therefore, such a controller can be considered as a hardware component, and the means included therein for implementing various functions can also be considered as structures within the hardware component. Alternatively, the means for implementing various functions can even be considered as both a software module implementing a method and a structure within a hardware component.
[0138] The systems, apparatuses, modules or units illustrated by the above embodiments can be specifically implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer can be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0139] For the sake of description, the above apparatuses are described in various units by functions respectively. Of course, the functions of each unit can be implemented in the same or multiple software and / or hardware in the implementation of the embodiments of the present application.
[0140] Those skilled in the art will understand that the embodiments of the present application can be provided as a method, a system or a computer program product. Therefore, the embodiments of the present application can take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware aspects. Moreover, the embodiments of the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0141] The specification and drawings are illustrative and are not to be construed as limiting. Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure belongs. It will be apparent to those skilled in the art that various modifications and variations can be made to the present disclosure without departing from the spirit or scope of the disclosure. Thus, it is intended that the present disclosure cover the modifications and variations of this disclosure provided they come within the scope of the appended claims and their equivalents. Figure 1 one or more processes and / or blocks to implement the functions described herein. Figure 2 one or more processes and / or blocks to implement the functions described herein.
[0142] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instructions which implement the functions specified in the flowchart or flowsheets Figure 3 one or more processes and / or blocks to implement the functions described herein. Figure 4 one or more processes and / or blocks to implement the functions described herein.
[0143] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart or flowsheets Figure 5 one or more processes and / or blocks to implement the functions described herein. Figure 6 Figure 7 Figure 1 Figure 2 Figure 3 Figure 4 Figure 5 Figure 6 Figure 7 Figure 1 Figure 2 Figure 3 Figure 4 Figure 5 Figure 6 Figure 7 Figure 1 Figure 2 Figure 3 Figure 4 Figure 5 one or more processes and / or blocks to implement the functions described herein.
[0144] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0145] The memory can include non-persistent memory and / or persistent memory, such as flash memory or other non-volatile memory, random access memory (RAM), etc. in a computer-readable medium. The memory is an example of computer-readable media.
[0146] Computer-readable media includes permanent and non-permanent, movable and non-movable media, which can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible by a computing device. According to the definition herein, computer-readable media does not include transitory media such as modulated data signals and carriers.
[0147] It should also be noted that the terms "comprising", "including", or any other variant thereof are intended to cover non-exclusive inclusion, so that processes, methods, articles or devices including a series of elements not only include those elements, but also include other elements not explicitly listed, or inherent to such processes, methods, articles or devices. Without more limitations, the element defined by the statement "including a" does not exclude the presence of other identical elements in the process, method, article or device including the element.
[0148] In the embodiments of the present application, "at least one" means one or more, and "multiple" means two or more. The association relationship between the associated objects is described by "and / or", which means that there can be three kinds of relationships, for example, A and / or B, which can represent the cases of A alone, A and B together, and B alone. Wherein A, B can be singular or plural. The character " / " generally represents that the associated objects before and after are in an "or" relationship. "At least one of the following" and the like means any combination of these items, including any combination of single or multiple items. For example, at least one of a, b and c can represent: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, c can be single or multiple.
[0149] Embodiments of the present application can be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, and the like, that perform particular tasks or implement particular abstract data types. Embodiments of the present application can also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules can be located in both local and remote computer storage media including memory storage devices.
[0150] Various embodiments in the present application are described with progressive manner, and the same or similar parts among various embodiments can be referred to each other. Each embodiment focuses on the difference from other embodiments. Especially, the system embodiments are described simply because they are basically similar to the method embodiments, and the related parts can be referred to the description of the method embodiments.
[0151] The above only describes the embodiments of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present application shall be included in the scope of the claims of the present application.
Claims
1. A user interface testing method characterized by, The method comprises: acquiring a test case; performing first analysis processing on the test case to obtain a case execution mode and test environment information corresponding to the case execution mode; performing determination processing on the test environment information to obtain environment selection information; performing test processing on the test case according to the case execution mode and the environment selection information to obtain a test code result; performing second analysis processing on the test code result to obtain a user interface test result; wherein the determination processing on the test environment information to obtain environment selection information comprises: performing first determination processing on the test environment information, and in the case that the test environment information comprises step-specified test environment information, determining the step-specified test environment information as the environment selection information; in the case that the test environment information does not comprise the step-specified test environment information, performing second determination processing on the test environment information to determine whether the test environment information comprises case-specified test environment information; in the case that the test environment information comprises case-specified test environment information, determining the case-specified test environment information as the environment selection information; in the case that the test environment information does not comprise the step-specified test environment information and the case-specified test environment information, determining project-specified environment information comprised in the test environment information as the environment selection information; the second analysis processing on the test code result to obtain a user interface test result comprises: performing feasibility analysis on the test code result to obtain a first analysis result; performing stability analysis on the test code result to obtain a second analysis result; integrating the first analysis result and the second analysis result to obtain the user interface test result.
2. The user interface testing method of claim 1, wherein, the first analysis processing on the test case to obtain a case execution mode and test environment information corresponding to the case execution mode comprises: performing conversion processing on the test case to obtain a test script; performing interpretation processing on the test script to obtain the case execution mode and the test environment information corresponding to the case execution mode.
3. The user interface testing method of claim 1, wherein, the test processing on the test case according to the case execution mode and the environment selection information to obtain a test code result comprises: in the case that the case execution mode is a single-case execution mode, performing separate execution processing on the test case according to the environment selection information to obtain the test code result; in the case that the case execution mode is a batch execution mode, performing common execution processing on the test case according to the environment selection information to obtain the test code result; in the case that the case execution mode is a serial execution mode, performing sequential execution processing on the test case according to the environment selection information to obtain the test code result.
4. The user interface testing method of claim 1, wherein, before the test processing on the test case according to the case execution mode and the environment selection information, the method further comprises: creating a timing regression task; In a case where a time reaches a specified time of the timing regression task, a test process on the test case to be tested is triggered.
5. The user interface testing method of claim 1, wherein, The test case to be tested is obtained by: creating a project and setting multiple test environments on a test platform; creating the test case to be tested and setting a corresponding case recording environment; wherein the test case to be tested comprises a test page; setting operation steps of the test page.
6. A user interface testing device, characterized by The device comprises: a first processing module configured to obtain a test case to be tested; a second processing module configured to perform first analysis processing on the test case to be tested to obtain a case execution mode and test environment information corresponding to the case execution mode; a third processing module configured to perform determination processing on the test environment information to obtain environment selection information; a fourth processing module configured to perform test processing on the test case to be tested according to the case execution mode and the environment selection information to obtain a test code result; a fifth processing module configured to perform second analysis processing on the test code result to obtain a user interface test result; The determination processing on the test environment information to obtain the environment selection information comprises: performing first determination processing on the test environment information, and in a case where the test environment information comprises step specified test environment information, determining the step specified test environment information as the environment selection information; in a case where the test environment information does not comprise the step specified test environment information, performing second determination processing on the test environment information to determine whether the test environment information comprises case specified test environment information; in a case where the test environment information comprises case specified test environment information, determining the case specified test environment information as the environment selection information; in a case where the test environment information does not comprise the step specified test environment information and the case specified test environment information, determining project specified environment information comprised in the test environment information as the environment selection information. The second analysis processing on the test code result to obtain the user interface test result comprises: performing feasibility analysis on the test code result to obtain a first analysis result; performing stability analysis on the test code result to obtain a second analysis result; integrating the first analysis result and the second analysis result to obtain the user interface test result.
7. An electronic device comprising: A memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the user interface test method according to any one of claims 1 to 5 when executing the computer program.
8. A computer-readable storage medium storing computer-executable instructions, the computer-executable instructions comprising: The computer executable instructions are used to execute the user interface test method according to any one of claims 1 to 5.
Citation Information
Patent Citations
User interface testing method and device
CN106897207A
Code testing method and device, equipment and storage medium
CN112069057A