Interface jumping method, electronic equipment, storage medium and program product
Through the automated interface jump method, the interface jump logic analysis and consistency analysis are used to solve the problem of inefficient manual operation in interface testing, and efficient and accurate interface jump is achieved.
Patent Information
- Application Number
- CN202411976139.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-05-02
AI Technical Summary
During the interface testing process, testers need to manually operate the interface of the software application, which is prone to human errors, time-consuming and labor-intensive, and inefficient.
Provide an interface jump method, by obtaining trigger elements, marking interface mapping, marking element mapping and testing knowledge, perform interface jump logic analysis, automatically control software applications to perform interface jumps, and conduct consistency analysis to ensure the correctness of jumps.
Automatic interface jump is realized, reducing human errors, improving testing efficiency, and ensuring the accuracy and reliability of interface jump through consistency analysis.
Smart Images

Figure CN119917408A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical fields of computer software, and more particularly to an interface jump method, electronic device, storage medium, and program product. Background Art
[0002] With the development of software applications, the functions of software applications are no longer the only focus of users. The usability, aesthetics and stability of the interface have gradually become key factors. The change in user focus has promoted the development of interface testing technology to ensure that the interface of software applications can provide a good user experience.
[0003] User Interface Testing usually refers to the testing of the user interface of a software application to ensure that the layout, color, font and other visual elements of the software application interface meet the design requirements, and that the functional components of the interface elements such as buttons, text boxes, drop-down menus, etc. can work properly. Interface testing not only focuses on the appearance of the interface, but also involves the usability and user experience of the interface.
[0004] During the interface testing process, testers are usually required to manually operate the interface of the software application, such as manually entering data on the interface, manually clicking controls, etc. Manual operation is prone to human errors and is time-consuming, labor-intensive, and inefficient. Summary of the invention
[0005] The present disclosure provides an interface jump method, electronic equipment, storage medium and program product.
[0006] According to one aspect of the present disclosure, there is provided an interface jump method, comprising: In response to an interface jump test of the software application, obtaining a trigger element for triggering the interface jump; Acquire a marking interface after marking the elements in the pre-jump interface to which the trigger element belongs, a marking element mapping for storing the correspondence between the elements and the markings in the marking interface, and test knowledge of the interface jump test; Performing interface jump logic analysis on the trigger element, the marking interface, the marking element mapping and the test knowledge of the interface jump test to obtain the trigger element marking and the jump process; The software application is controlled to perform interface jump according to the trigger element tag and the jump process to obtain a post-jump interface.
[0007] According to at least one embodiment of the present disclosure, the interface jump method further includes, after obtaining the post-jump interface: Obtaining the interface jump rule of the trigger element; An interface jump consistency analysis is performed on the trigger element, the marking interface, the post-jump interface and the interface jump rule to obtain an analysis result.
[0008] According to the interface jump method of at least one embodiment of the present disclosure, the interface jump consistency analysis of the trigger element, the marking interface, the post-jump interface and the interface jump rule includes: Determine the target interface according to the trigger element, the marked interface and the interface jump rule; Determine whether the redirected interface is consistent with the target interface.
[0009] According to at least one embodiment of the present disclosure, the interface jump method further includes, after obtaining the analysis result: When the analysis result is that the jump is successful, a subsequent interface jump test is performed on the software application; When the analysis result is a jump failure, the failure information is obtained or the marking interface after marking the elements in the pre-jump interface to which the trigger element belongs, the marking element mapping for storing the correspondence between the elements and the marks in the marking interface, and the test knowledge of the interface jump test are obtained until the termination condition is met.
[0010] According to at least one embodiment of the present disclosure, the interface jump method further includes, after obtaining the failure information: Obtaining repair suggestions for the software application based on the failure information; and / or The software application is updated based on the failure information.
[0011] According to the interface jump method of at least one embodiment of the present disclosure, the step of obtaining a trigger element for triggering the interface jump in response to an interface jump test of a software application includes: Obtaining test cases for the software application; In response to the interface jump test in the test case, a trigger element that triggers the interface jump is obtained.
[0012] According to the interface jump method of at least one embodiment of the present disclosure, the step of obtaining the test case of the software application includes: Obtaining a user interface, requirements document, and knowledge base of the software application; Processing the user interface, the requirement document and the knowledge base to obtain test cases for the software application; Optionally, the knowledge base includes: One or more of the interface knowledge, interaction knowledge, layout knowledge, domain knowledge and fault knowledge related to the software application.
[0013] According to the interface jump method of at least one embodiment of the present disclosure, the step of obtaining a marked interface after marking the elements in the pre-jump interface to which the trigger element belongs, a marked element mapping for storing the correspondence between the elements and the markings in the marked interface, and the test knowledge of the interface jump test includes: obtaining the marked element mapping from a mapping library according to the marked interface; or analyzing the marked interface to obtain the marked element mapping; Optionally, the obtaining of the marked interface after marking the elements in the pre-jump interface to which the trigger element belongs, the marked element mapping for storing the correspondence between the elements and the marks in the marked interface, and the test knowledge of the interface jump test, includes: obtaining the marked interface from an interface library according to the pre-jump interface; or obtaining the interface elements of the pre-jump interface; marking the interface elements respectively on the pre-jump interface to obtain the marked interface; Optionally, controlling the software application to perform interface jump according to the trigger element tag and the jump process includes: installing the software application on a simulator; and controlling the software application on the simulator to perform interface jump according to the trigger element tag and the jump process.
[0014] According to another aspect of the present disclosure, an electronic device is provided, comprising: a memory storing execution instructions; and a processor executing the execution instructions stored in the memory, so that the processor executes the interface jump method of any embodiment of the present disclosure.
[0015] According to another aspect of the present disclosure, a readable storage medium is provided, wherein the readable storage medium stores execution instructions, and when the execution instructions are executed by a processor, the interface jump method of any embodiment of the present disclosure is implemented.
[0016] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, wherein when the computer program is executed by a processor, the interface jump method of any embodiment of the present disclosure is implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The accompanying drawings illustrate exemplary embodiments of the present disclosure and together with the description serve to explain the principles of the present disclosure. These drawings are included to provide a further understanding of the present disclosure and are incorporated in and constitute a part of this specification.
[0018] Figure 1 This is a flow chart of an interface jump method provided by an embodiment of the present disclosure. Figure 1 .
[0019] Figure 2This is a flow chart of an interface jump method provided by an embodiment of the present disclosure. Figure 2 .
[0020] Figure 3 yes Figure 2 Flowchart of the consistency analysis method in the interface jump method shown.
[0021] Figure 4 This is a flow chart of an interface jump method provided by an embodiment of the present disclosure. Figure 3 .
[0022] Figure 5 This is a flow chart of an interface jump method provided by an embodiment of the present disclosure. Figure 4 .
[0023] Figure 6 This is a flow chart of an interface jump method provided by an embodiment of the present disclosure. Figure 5 .
[0024] Figure 7 yes Figure 1 The flowchart of the element acquisition method in the interface jump method shown.
[0025] Figure 8 yes Figure 7 The flowchart of the use case acquisition method in the element acquisition method shown.
[0026] Fig. 9 This is a flow chart of an interface jump method provided by an embodiment of the present disclosure. Figure 6 .
[0027] Fig.10 This is a flow chart of an interface jump method provided by an embodiment of the present disclosure. Figure 7 .
[0028] Fig.11 This is a flow chart of an interface jump method provided by an embodiment of the present disclosure. Figure 8 .
[0029] Fig.12 yes Figure 1 The flowchart of the marking interface acquisition method in the interface jump method shown.
[0030] Fig.13 yes Figure 1 The flowchart of the simulation jump method in the interface jump method shown.
[0031] Fig.14 It is a schematic flow chart of an interface jump method according to an embodiment of the present disclosure.
[0032] Fig.15 It is a schematic block diagram of the structure of an interface jump device according to another embodiment of the present disclosure.
[0033] Fig.16 It is a schematic block diagram of the structure of an electronic device according to yet another embodiment of the present disclosure. DETAILED DESCRIPTION
[0034] The present disclosure is further described in detail below in conjunction with the accompanying drawings and examples. It is understood that the specific examples described herein are only used to explain the relevant content, rather than to limit the present disclosure. It should also be noted that, for ease of description, only the parts related to the present disclosure are shown in the accompanying drawings.
[0035] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in the present disclosure can be combined with each other. The technical solution of the present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0036] Taking the interface testing of an e-commerce website as an example, the tester needs to manually check whether the "shopping cart" function is normal. The inspection process includes multiple steps such as adding products, updating quantities, deleting products, and checking the total price. The tester needs to click on the elements of the "shopping cart" function interface one by one. If the test needs to cover multiple scenarios such as different product combinations, quantity changes, and discount codes, the tester will have to perform these operations repeatedly. Due to the complex jump process and cumbersome steps, manual testing is inefficient, and it is very easy to cause human errors such as missed tests or mistests due to negligence during frequent execution, resulting in inaccurate test results.
[0037] To this end, the present disclosure proposes an interface jump method, electronic device, storage medium and program product, which can be implemented through software testing tools set on electronic devices such as mobile phones, tablet computers, computers, servers, etc.
[0038] For the convenience of description and to make the technical solutions of the specific implementation methods of the present disclosure easier to understand, before describing the interface jump method implemented by the present disclosure, the technical terms involved in the specific implementation methods of the present disclosure are explained as follows: A simulator is a software tool that simulates the operation of a real device or system in a virtual environment, thereby enabling testing based on software tools without relying on physical hardware.
[0039] Figure 1 FIG. 1 is a schematic diagram showing the overall flow of an interface jump method M100 according to an embodiment of the present disclosure. Figure 1 The interface jump method shown includes steps S110 to S140. The method can be executed by electronic devices such as mobile phones, tablet computers, and servers.
[0040] Specifically, Figure 1 The methods shown include: Step S110, in response to the interface jump test of the software application, obtaining a trigger element for triggering the interface jump.
[0041] In some embodiments of the present disclosure, the software application in step S110 refers to an application that needs to be tested for interface jumps, and the software application can be a desktop application, a mobile application, or a Web application, etc. Among them, the desktop application can be specifically office software, image processing software, video editing software, or software development tools, etc.; the mobile application can be specifically instant messaging software, social media software, e-commerce software, navigation software, financial software, or real estate software, etc.; the Web application can be specifically an online collaboration tool or an online learning platform, etc.
[0042] The trigger element in step S110 refers to a component in the user interface of the software application that can respond to user interaction and cause the interface to change. The trigger element can be a button, link, menu item, icon, gesture area, card or list item, etc.
[0043] Step S120, obtaining a marked interface after marking the elements in the pre-jump interface to which the triggering element belongs, a marked element mapping for storing the correspondence between the elements and the marks in the marked interface, and test knowledge of the interface jump test.
[0044] In some embodiments of the present disclosure, the pre-jump interface in step S120 refers to the initial interface (source interface) of the software application for interface jump testing; the test knowledge of the interface jump test in step S120 is the test knowledge for interface jump of the pre-jump interface, which may include domain knowledge related to software application functions or business logic, interface design knowledge about basic principles of pre-jump interface design, layout specifications and design patterns, interface interaction knowledge about specifications and expected behaviors of user interaction with the pre-jump interface, common rules and design patterns for displaying error messages, warnings and instructions in the pre-jump interface, error handling and instruction information knowledge of design patterns, domain knowledge related to software applications, etc.
[0045] Step S130, performing interface jump logic analysis on the test knowledge of the trigger element, the marking interface, the marking element mapping and the interface jump test to obtain the trigger element marking and the jump process.
[0046] In some embodiments of the present disclosure, the process of performing interface jump logic analysis through step S130 may include: obtaining the trigger element tag of the trigger element according to the tag element mapping; performing interface jump logic analysis on the trigger element according to the tag interface and test knowledge, and deriving the jump process.
[0047] Step S130 can be implemented by a large language model, that is, the test knowledge of the trigger element, the markup interface, the markup element mapping and the interface jump test is input into the large language model; the large language model can be a publicly available model such as BERT, GPT series, RoBERTa, etc. In particular, in order to ensure that the large language model can obtain the required information by analyzing the trigger element, the markup interface, the markup element mapping and the test knowledge, the large language model can be fine-tuned in advance. Fine-tuning training refers to the process of adjusting the model parameters of the large language model using relevant training data as samples; the relevant training data may include multiple data pairs consisting of training trigger elements, training markup interfaces, training mappings and training related mappings, as well as training trigger element tags and training jump processes. The fine-tuning training process is to input the sample into the large language model, and the large language model outputs the analysis result; thereafter, the loss between the analysis result and the corresponding training trigger tag and training jump process is calculated, and the model parameters of the large language model are optimized with the purpose of reducing the loss. After multiple rounds of iterations, the analysis result output by the large language model can eventually be close to the expected training trigger tag and training jump process, thereby improving the analysis accuracy of the large language model.
[0048] Step S130 can directly input the trigger element, marking interface, marking element mapping and test knowledge into the large language model, or can integrate the trigger element, marking interface, marking element mapping and test knowledge and then input them into the large language model; the above integration process can be performed based on a relevant prompt template, which can be fixed and can also be updated by the user or the large language model.
[0049] Step S140, controlling the software application to perform interface jump according to the trigger element tag and the jump process to obtain a post-jump interface.
[0050] In some embodiments of the present disclosure, step S140 can implement interface jumps through a simulator, and the simulator can be specifically a system simulator, which is used to simulate and simulate the operation and behavior of the system in the real world to predict and analyze the performance of the system under different conditions. The system simulator can be a computer system simulator that can simulate the hardware architecture and software environment of a computer; the system simulator can also be a mobile device simulator that can simulate the hardware architecture and software environment of mobile devices such as smartphones and tablets. Taking the simulator of the Android system as an example, the simulator can simulate different models of Android phones, including hardware characteristics such as screen size, resolution, sensors, and various versions of the Android system.
[0051] The interface jump method provided by the present disclosure controls the software application to perform interface jump after obtaining the trigger element mark and jump process through interface jump analysis, thereby realizing automatic interface jump. The method does not require the tester to manually operate the application interface, and solves the problem that the tester needs to manually operate the interface of the software application during interface testing in the prior art, and manual operation is prone to human errors, and is time-consuming, labor-intensive, and inefficient.
[0052] In some embodiments of the present disclosure, after the jump interface is obtained through step S140, the tester can verify the jump interface to ensure that the content and function of the jump interface meet expectations. The verification process includes but is not limited to the following aspects: verifying whether the layout and style of the jump interface are correct; verifying whether all elements (such as text, pictures, forms, etc.) on the jump interface are fully loaded and displayed normally; verifying whether the functions (such as form submission, data query, etc.) work as expected; verifying whether the error handling mechanism (such as whether there is an appropriate error prompt when illegal data is entered) is effective, etc.
[0053] Furthermore, the interface jump method provided in the embodiment of the present disclosure may further include the following steps after step S140: Figure 2 Steps S150 to S160 are shown.
[0054] Step S150, obtaining the interface jump rule of the trigger element.
[0055] In some embodiments of the present disclosure, the interface jump rules in step S150 are relevant rules for navigating from the pre-jump interface of the software application to the post-jump interface. The interface jump rules can help the large language model verify whether the interface jump meets expectations, and may include the following contents: the expected target interface of the jump, the path rules that the interface jump should follow, the triggering conditions of the interface jump, etc.
[0056] Step S160, performing interface jump consistency analysis on the trigger element, the marked interface, the post-jump interface and the interface jump rule to obtain an analysis result.
[0057] In some embodiments of the present disclosure, the interface jump consistency analysis in step S160 refers to checking and verifying the interface jump behavior to ensure the consistency of jump logic, path and performance. Step S160 can use a large language model to perform the interface jump consistency analysis process. The large language model used can be Figure 1 In particular, in order to improve the accuracy of the interface jump consistency analysis of the large language model in step S160, the large language model used in step S160 can also be Figure 1 The model after the large language model is fine-tuned in step S130 shown in FIG. Figure 1The fine-tuning process of the large language model in step S130 is similar.
[0058] In particular, in order to make the large language model for step S160 and Figure 1 The tasks of the two steps of step S130 shown have good effects, and the large language model can also be jointly fine-tuned based on mixing the samples related to step S160 and step S130.
[0059] The analysis results in step S160 may include correct jump, that is, the jump operation meets expectations, the interface after the jump is the same as the expected target interface, the target interface can be correctly loaded and meets the functional and visual requirements; jump failure, that is, the jump operation does not reach the expected target page, it may be that the target page does not exist, the Uniform Resource Locator (URL) is wrong or the page content does not meet expectations; jump delay, etc., that is, the jump occurs correctly, but the interface loading or response time is too long, exceeding the expected time limit, affecting the user experience.
[0060] Steps S150 to S160 implement interface jump consistency analysis through a large language model, which can solve the problems of low efficiency and easy errors in manually implementing interface jump verification.
[0061] Regarding step S160, in some embodiments of the present disclosure, it may include: Figure 3 Steps S161 to S162 are shown.
[0062] Step S161, determining the target interface according to the trigger element, the marked interface and the interface jump rule.
[0063] In some implementations of the present disclosure, step S161 may search for interface jump rules based on the trigger element and the marker interface to determine the target interface.
[0064] Step S162, determining whether the interface after the jump is consistent with the target interface.
[0065] The jump target consistency analysis can be implemented through step S161 and step S162.
[0066] In addition to the above jump target consistency analysis, the interface jump consistency analysis in step S160 may also include a trigger element function consistency analysis, an interface state consistency analysis, an interaction rule consistency analysis, and the like.
[0067] When the jump analysis result obtained in step S160 is that the jump is successful, the interface jump method provided by the embodiment of the present disclosure may also include the following steps: Figure 4 Step S170 shown.
[0068] Step S170, performing a subsequent interface jump test on the software application.
[0069] In some embodiments of the present disclosure, the process of performing subsequent interface jump test on the software application in step S170 is similar to Figure 1 The steps S110 to S140 are similar. Specifically, when the analysis result obtained in step S160 is that the jump is successful, the current pre-jump interface when the jump is successful can be replaced with the current post-jump interface, and then step S110 is performed again.
[0070] When the analysis result is that the jump is successful, the subsequent interface jump test of the software application is performed through step S170, which can ensure that the software application meets the expected standards in terms of function, performance, user experience, security and compatibility, thereby improving the overall quality of the software application. Through continuous jump, verification and improvement, problems of the software application can be discovered and repaired in a timely manner, ensuring the stability and reliability of the software application.
[0071] When the analysis result obtained through step S160 is a jump failure, in order to improve user experience and reliability, the interface jump method provided in the embodiment of the present disclosure can also perform jump retries again through steps S120 to S140 until the end condition is reached. The end condition can be set based on the number of retries, that is, when the number of retries reaches the preset maximum value, the retries are stopped; the end condition can also be set based on the retry time, that is, when the total time used for retries exceeds the retry time and the jump is still not successful, the retries are stopped, etc.
[0072] When the analysis result obtained in step S160 is that the jump fails, the interface jump method provided by the embodiment of the present disclosure may also include the following steps: Figure 5 Step S180 is shown.
[0073] Step S180, obtaining failure information.
[0074] In some embodiments of the present disclosure, the failure information in step S180 may include: target page error (i.e., the interface after the jump does not exist or cannot be accessed), page loading failure (i.e., the interface after the jump is blank or incomplete due to network problems, server errors or resource loading failures, etc.), permission or authentication problems (i.e., interface redirection or error prompts due to failure to log in or insufficient permissions), jump logic error (i.e., the jump does not occur as expected, may jump to the wrong interface or the jump conditions do not meet the requirements), page element error (i.e., jump interface elements such as buttons, forms, pictures, etc. fail to display or load correctly), and other information.
[0075] When the analysis result is a jump failure, obtaining failure information through step S180 can facilitate effective diagnosis and resolution of the interface jump failure problem.
[0076] After obtaining the failure information in step S180, the interface jump method provided by the present disclosure may further include: Figure 6 Steps S190 to S200 are shown.
[0077] Step S190, obtaining repair suggestions for the software application according to the failure information.
[0078] In some implementations of the present disclosure, the repair suggestion obtained through step S190 is a specific solution or operation step proposed for the interface jump failure.
[0079] When the failure information includes a target page error, the repair suggestions obtained through step S190 may include checking the target URL, updating the routing configuration, checking the server status, etc.; when the failure information includes a page loading failure, the repair suggestions obtained through step S190 may include optimizing the interface loading speed, adding a loading timeout retry mechanism, checking the server performance, etc.; when the failure information includes permission or authentication issues, the repair suggestions obtained through step S190 may include checking the permission verification logic, improving the authentication process, optimizing the user experience, etc.; when the failure information includes a jump logic error, the repair suggestions obtained through step S190 may include reviewing the jump conditions, debugging the jump code, testing different scenarios, etc.; when the failure information includes a page element error, the repair suggestions obtained through step S190 may include checking the HTML structure, verifying the Cascading Style Sheets (CSS) loading, checking the dynamic content loading, etc.
[0080] Step S200: updating the software application according to the failure information.
[0081] In some embodiments of the present disclosure, the specific process of updating the software application through step S200 may include: searching for failure-related code from the code of the software application according to the failure information; and modifying the failure-related code. The process of searching for failure-related code may locate the specific code through log analysis, static code review, automated testing, performance monitoring, etc. with the help of automated tools, intelligent systems, and other tools.
[0082] In some embodiments of the present disclosure, after obtaining the failure information, step S190 and step S200 may be performed simultaneously. Figure 6 As shown; you can also only perform step S190 or step S200. When the interface jump method provided by the present disclosure only includes step S190 or step S200, the interface jump process is the same as Figure 6 The similarities shown are not repeated here one by one.
[0083] Providing repair suggestions after obtaining the failure information through step S190 helps to effectively solve the problem, ensure the long-term stable operation of the software application and optimize the user experience. Updating the software application after obtaining the failure information through step S200 can improve the maintainability and quality of the software application and improve the updating efficiency of the software application.
[0084] Regarding step S110, in some embodiments of the present disclosure, Figure 7 As shown, it may include step S111 to step S112.
[0085] Step S111, obtaining test cases of software applications.
[0086] In some embodiments of the present disclosure, the test case in this step may be pre-generated or generated in real time; the test case may be manually generated or generated by a use case generation model, etc. The test case may only include an interface jump test. In order to achieve a comprehensive test of the software application, in addition to the interface jump test, it may also include a functional module test (verifying the input and output of each functional module and the correctness of the business logic), a compatibility test (inspecting the operation of the software application in different hardware and software environments), a performance test (evaluating the performance indicators such as the response time and throughput of the software application), etc.
[0087] The interface jump test in the test case can cover many aspects such as test objectives (functional and user experience verification), environment (software and hardware), steps (operation, path, data verification), data (input and expected output) and pass / fail criteria (functionality, performance, user experience).
[0088] Step S112, in response to the interface jump test in the test case, obtaining a trigger element that triggers the interface jump.
[0089] In some implementations of the present disclosure, step S112 may acquire a trigger element according to a test target in a test case.
[0090] Since the test cases provide clear, detailed, and structured test steps and expected results, the elements that require interface jump testing can be efficiently identified based on the test cases, ensuring that the jump function can be effectively verified.
[0091] Regarding step S111, in some embodiments of the present disclosure, it may include the following steps: Figure 8 Step S1111 and step S1112 are shown.
[0092] Step S1111, obtaining the user interface, requirement document and knowledge base of the software application.
[0093] In some embodiments of the present disclosure, the user interface of the software application may be obtained through step S120 by traversing each user interface of the software application and taking screenshots during the traversal; or may be obtained through files such as product requirement documents and development documents.
[0094] The requirement document in step S1111 is a document that describes the functions, performance, design constraints and user requirements of the software application, and may include an introduction (outlining the background, objectives, scope of the document, and the scope of application and target audience of the document), functional requirements (describing the various functions that the software application should perform, and clarifying the behavior of the software application and user interaction), non-functional requirements (specifying the performance, usability, security and other requirements of the software application), user interface requirements (describing the interface design for the interaction between the software application and the user, including the interface layout and control functions), interface requirements (defining the interaction method and interface specifications between the software application and other external systems or modules), data requirements (specifying the data structure, storage method and data exchange format used by the software application), architecture and technical requirements (outlining the technical architecture of the software application and the required technology stack, platform and tools), constraints (listing the resources, regulations and environmental restrictions that must be followed during development and deployment) and acceptance criteria (defining how to verify whether the software application meets all requirements and standards after development is completed).
[0095] The knowledge base in step S1111 is used to help the large language model understand the specific circumstances of use case generation, thereby generating more accurate and effective test cases.
[0096] Step S1112, processing the user interface, requirement document and knowledge base to obtain test cases for the software application.
[0097] In some embodiments of the present disclosure, the large language model used in step S1112 can be Figure 1 Step S130 and / or Figure 2 In particular, in order to improve the accuracy of the test case generated by the large language model in step S1112, the large language model used in step S1112 can also be used for Figure 1 Step S130 and / or Figure 2 The model after fine-tuning the large language model in step S160 shown in FIG. Figure 1 Step S130 and / or Figure 2 The fine-tuning process of the large language model in step S160 is similar.
[0098] In particular, in order to make the large language model for step S1112, Figure 2 Step S160 and Figure 1The tasks of the three steps of step S130 shown in the figure all have good effects, and the large language model can also be jointly fine-tuned based on mixing the samples related to step S1112, step S160 and step S130.
[0099] Automatically generating test cases for software applications through steps S1111 to S1112 can improve the comprehensiveness and generation efficiency of test cases.
[0100] In some embodiments of the present disclosure, the knowledge in the knowledge base in step S1111 may include one or more of interface knowledge, interaction knowledge, layout knowledge, domain knowledge and fault knowledge. Among them, interface knowledge refers to all information related to the interface of the software application, including the design principles, components, styles, visual elements and their functions of the interface; interaction knowledge refers to the interaction mode and interaction process between the user and the software application, and how to design the interface so that the user can smoothly and efficiently operate with the software application; layout knowledge refers to how the various elements in the user interface are laid out and organized to ensure the usability, visual balance and user experience of the interface; domain knowledge refers to the professional knowledge related to the field or industry corresponding to the software application, which is used to help understand the background, business needs and actual needs of the software application function; fault knowledge refers to information related to the fault of the software application, including known defects, error modes, common causes of software application faults and how to diagnose and repair these problems, such as rendering abnormality knowledge (such as white screen, flash back, freeze, etc.), interface abnormality knowledge (such as occlusion, dislocation, incompleteness, etc.), data abnormality knowledge (such as the house area is 0, the price is the number of pages, etc.), interaction abnormality knowledge (such as no response when clicking, the filter bar is not fixed to the top after filtering, etc.).
[0101] Regarding step S120, in some embodiments of the present disclosure, Fig. 9 As shown, the following steps may be included: Gets a tag element mapping from a mapping library according to the tag interface.
[0102] In some embodiments of the present disclosure, the mapping library in this step may be pre-set, that is, the content stored in the mapping library is pre-marked for the user interface in the software application, and the mapping relationship is obtained based on the marked interface. The marked element mapping in step S120 can be obtained through this step, and the acquisition method of other information other than the marked element mapping obtained in step S120 can be used. Figure 1 The step S120 shown is similar.
[0103] This step obtains the marker element mapping from the mapping library, which can reduce the mapping acquisition time and improve the efficiency of software jump.
[0104] Regarding step S120, in some embodiments of the present disclosure, Fig.10 As shown, the following steps may be included: The tag interface is analyzed to obtain a tag element mapping.
[0105] In some embodiments of the present disclosure, this step may be performed by analyzing the marking interface through an image recognition tool, and establishing a marking element mapping based on visual similarity or coordinates.
[0106] This step obtains the marker element mapping through interface analysis, which can improve the efficiency and accuracy of mapping acquisition.
[0107] Regarding step S120, in some embodiments of the present disclosure, Fig.11 As shown, the following steps may be included: Get the marker interface from the interface library according to the interface before the jump.
[0108] In some embodiments of the present disclosure, the interface library in this step may be pre-set, that is, the content stored in the interface library is stored after the user interface in the software application is marked in advance to obtain the marked interface. The marked interface in step S120 can be obtained through this step, and the method for obtaining other information other than the marked interface in step S120 is the same as Figure 1 The step S120 shown is similar.
[0109] This step obtains the marker interface from the interface library, which can reduce the interface acquisition time and improve the efficiency of software jump.
[0110] Regarding step S120, in some embodiments of the present disclosure, Fig.12 As shown, it may include step S121 and step S122.
[0111] Step S121, obtaining the interface elements of the interface before the jump.
[0112] In some implementations of the present disclosure, step S121 may obtain the interface element through an element selector (ie, rules and syntax for selecting and locating elements), an interface parsing tool, or the like.
[0113] Step S122, marking the interface elements on the interface before the jump to obtain a marked interface.
[0114] In some embodiments of the present disclosure, step S122 may use unique identifiers, comments, custom attributes, etc. to mark the interface elements to obtain a marked interface. Among them, the unique identifier may use a serial number, an ID of the interface element, etc. In the process of marking the interface elements, it may also include processes such as dividing the area to which the interface elements belong. The division process may be implemented based on the position coordinates in the description information of the interface elements, which is not limited here.
[0115] By marking the interface elements on the interface before the jump through steps S121 and S122, the accuracy of interface element recognition and control can be improved.
[0116] Regarding step S140, in some embodiments of the present disclosure, it may include: Fig.13 Steps S141 to S142 are shown.
[0117] Step S141, installing the software application on the simulator.
[0118] In some embodiments of the present disclosure, step S141 can simulate different device configurations through a simulator to implement a virtual device; the simulator can be for different platforms, and each platform can also be for different device configurations. The process of installing the software application through step S141 may include: obtaining an application installation package of the software application; loading the set virtual device on the simulator; providing the application installation package to the simulator, and installing it on the simulator.
[0119] Step S142, controlling the software application on the simulator to perform interface jump according to the trigger element tag and the jump process.
[0120] In some implementations of the present disclosure, step S142 may be performed by controlling a simulator through an automated control tool such as a command line control tool, an automated testing framework, or the like to perform an interface jump.
[0121] Steps S141 to S142 simulate the user's behavior through the simulator to achieve interface jump, which can automatically control the software application in the simulator and improve the software jump efficiency.
[0122] In some embodiments of the present disclosure, Figure 1 The step S120 shown in FIG. Figure 8 The knowledge content contained in the knowledge base in step S1111 shown can be fixed, and the knowledge content can also be updated by personnel such as quality assurance engineers of software applications as needed. The knowledge content can also be updated based on feedback from software jumps, etc., which is not limited here.
[0123] The interface jump method provided by the present disclosure can realize the automatic generation of interface test cases, multi-terminal simulated jumps, verification and feedback of problems and even the ability to repair problems through a large language model, which can reduce the manpower and material resources and errors required for software testing and improve the efficiency of software testing. In addition, after the relevant personnel determine the user interface and requirement documents of the software application, the method can automatically generate test cases; after the developer prepares the code of the software application, the code can be packaged into a software installation package, and the automatic jump and verification process can be performed based on the software installation package; after that, the relevant results can be fed back to the developer or the software application can be automatically repaired. The above-mentioned automation process can improve the efficiency of software testing and the efficiency of software application iteration, and solves the problem that the software testing can only be started after the development joint debugging is completed in the prior art, and the test needs to be executed serially, and the test feedback time is long.
[0124] Fig.14 An exemplary flow chart of an implementation of the interface jump method according to the present disclosure is shown.
[0125] Fig.14 In the flowchart shown, taking the software application as a real estate application, the interface before the jump as a login interface, including a user name and password input box, a "forgot password" link, a "register" button, and a "login" button as an example, the interface jump process may include: Step S310, in response to the real estate application interface jump test, obtain the trigger element "forgot password" that triggers the interface jump.
[0126] Step S320, obtaining a marked interface after marking the elements in the interface before the jump of the trigger element, a marked element mapping for storing the correspondence between the elements and the marks in the marked interface, and test knowledge of the interface jump test.
[0127] In some embodiments of the present disclosure, all interfaces of the real estate application can be marked in advance, and the marked interface can be stored in the interface library. This step is directly obtained from the interface library; or the interface before the jump can be marked in real time after obtaining the trigger element to obtain the marked interface.
[0128] Step S330, analyzing the trigger element, the marking interface, the marking element mapping and the interface jump logic test knowledge of the interface jump test to obtain the trigger element marking and the jump process.
[0129] In some embodiments of the present disclosure, the jump process in this step usually involves the system guiding the user to complete the password reset process after the user clicks the "Forgot Password" link on the interface before the jump. The process can be specifically as follows: the user clicks the "Forgot Password" link; after clicking, the system loads a new interface or pops up a pop-up window, which usually includes prompt information, input boxes, submit buttons, etc.
[0130] Step S340, controlling the software application to perform interface jump according to the trigger element tag and the jump process to obtain a post-jump interface.
[0131] In some embodiments of the present disclosure, taking the trigger element as a "forgot password" link as an example, when the jump is correct, the interface after the jump may be a password retrieval interface, and when the jump is incorrect, the interface after the jump may be a "interface not found" prompt.
[0132] Based on any of the above implementations, the present disclosure also provides an interface jump device.
[0133] Fig.15 It is a schematic block diagram of the structure of an interface jump device according to an embodiment of the present disclosure.
[0134] like Fig.15 As shown, the interface jump device includes: The element acquisition module 110 is used to acquire a trigger element for triggering an interface jump in response to an interface jump test of a software application.
[0135] The input acquisition module 120 is used to obtain a marked interface after marking the elements in the pre-jump interface to which the triggering element belongs, a marked element mapping for storing the correspondence between the elements and the marks in the marked interface, and test knowledge of the interface jump test.
[0136] The model analysis module 130 is used to perform interface jump logic analysis on the test knowledge of the trigger element, the marked interface, the marked element mapping and the interface jump test to obtain the trigger element mark and the jump process.
[0137] The interface jump module 140 is used to control the software application to perform interface jump according to the trigger element mark and the jump process to obtain the post-jump interface.
[0138] Each of the above modules can be implemented by a computer program module. Fig.15 The interface jump device shown can be implemented based on a computer program module architecture.
[0139] The implementation process of the functions and effects of each module in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, which will not be repeated here.
[0140] The execution subject of the interface jump method in the specific implementation manner of the present disclosure may be an electronic device such as a mobile phone, a tablet computer, or a server.
[0141] Therefore, based on any one of the above embodiments, the present disclosure further provides an electronic device, which can execute the interface jump method of any one of the embodiments described above in the present disclosure.
[0142] Fig.161 is a schematic block diagram of the structure of an electronic device 1000 according to an embodiment of the present disclosure.
[0143] The hardware structure of the electronic device 1000 can be implemented using a bus architecture. The bus architecture can include any number of interconnected buses and bridges, depending on the specific application and overall design constraints of the hardware. The bus 1100 connects various circuits including one or more processors 1200, memory 1300 and / or hardware modules together. The bus 1100 can also connect various other circuits 1400 such as peripherals, voltage regulators, power management circuits, external antennas, etc.
[0144] The bus 1100 may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Component (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the figure only uses one connecting line, but does not mean that there is only one bus or one type of bus.
[0145] The present disclosure also provides a readable storage medium, in which a computer program is stored, and the computer program is used to implement the above method when executed by a processor. "Readable storage medium" can be any device that can contain, store, communicate, propagate or transmit a program for use in an instruction execution system, device or equipment or in combination with these instruction execution systems, devices or equipment. More specific examples of readable storage media include the following: an electrical connection portion (electronic device) with one or more wirings, a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and editable read-only memory (EPROM or flash memory), an optical fiber device, and a portable read-only memory (CDROM), etc.
[0146] The present disclosure also provides a computer program product. The method of the present disclosure can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instruction is loaded and executed, the process or function of the present disclosure is executed in whole or in part.
[0147] The computer program or instructions may be stored in a readable storage medium or transmitted from one readable storage medium to another readable storage medium, for example, the computer program or instructions may be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired or wireless means. The readable storage medium may be any available medium that can be accessed or a data storage device such as a server, data center, etc. that integrates one or more available media. The available medium may be a magnetic medium, such as a floppy disk, a hard disk, or a magnetic tape; it may also be an optical medium, such as a digital video disk; it may also be a semiconductor medium, such as a solid state drive. The computer readable storage medium may be a volatile or non-volatile storage medium, or may include both volatile and non-volatile types of storage media.
[0148] Those skilled in the art will appreciate that the embodiments of the present disclosure may be provided as methods, systems, or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present disclosure may 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.
[0149] The present disclosure is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the present disclosure. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0150] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0151] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0152] In the description of this specification, the description with reference to the terms "one embodiment / method", "some embodiments / methods", "example", "specific example", or "some examples" etc. means that the specific features, structures, or characteristics described in conjunction with the embodiment / method or example are included in at least one embodiment / method or example of the present disclosure. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment / method or example. Moreover, the specific features, structures, or characteristics described may be combined in any one or more embodiments / methods or examples in a suitable manner. In addition, those skilled in the art may combine and combine different embodiments / methods or examples described in this specification and features of different embodiments / methods or examples, unless they are contradictory.
[0153] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of the present disclosure, "plurality" means at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0154] Those skilled in the art should understand that the above embodiments are only for the purpose of clearly illustrating the present disclosure, and are not intended to limit the scope of the present disclosure. For those skilled in the art, other changes or modifications may be made based on the above disclosure, and these changes or modifications are still within the scope of the present disclosure.
Claims
1. An interface jump method, characterized in that: include: In response to an interface jump test of the software application, obtaining a trigger element for triggering the interface jump; Acquire a marking interface after marking the elements in the pre-jump interface to which the trigger element belongs, a marking element mapping for storing the correspondence between the elements and the markings in the marking interface, and test knowledge of the interface jump test; Performing interface jump logic analysis on the trigger element, the marking interface, the marking element mapping and the test knowledge of the interface jump test to obtain the trigger element marking and the jump process; as well as The software application is controlled to perform interface jump according to the trigger element tag and the jump process to obtain a post-jump interface.
2. The interface jump method according to claim 1, characterized in that: After obtaining the redirected interface, the method further includes: Obtaining the interface jump rule of the trigger element; and An interface jump consistency analysis is performed on the trigger element, the marking interface, the post-jump interface and the interface jump rule to obtain an analysis result.
3. The interface jump method according to claim 2, characterized in that: The performing interface jump consistency analysis on the trigger element, the marked interface, the post-jump interface and the interface jump rule includes: Determine the target interface according to the trigger element, the marked interface and the interface jump rule; and Determine whether the redirected interface is consistent with the target interface.
4. The interface jump method according to claim 2, characterized in that: After obtaining the analysis result, the method further includes: When the analysis result is that the jump is successful, performing a subsequent interface jump test on the software application; and When the analysis result is a jump failure, the failure information is obtained or the marking interface after marking the elements in the pre-jump interface to which the trigger element belongs, the marking element mapping for storing the correspondence between the elements and the marks in the marking interface, and the test knowledge of the interface jump test are obtained until the termination condition is met.
5. The interface jump method according to claim 4, characterized in that: After the acquisition failure information, the method further includes: Obtaining repair suggestions for the software application based on the failure information; and / or The software application is updated based on the failure information.
6. The interface jump method according to any one of claims 1 to 5, characterized in that: The step of obtaining a trigger element for triggering an interface jump in response to an interface jump test of a software application includes: Obtaining test cases for the software application; In response to the interface jump test in the test case, a trigger element that triggers the interface jump is obtained.
7. The interface jump method according to claim 6, characterized in that: The obtaining of the test case of the software application comprises: Obtaining a user interface, requirements document, and knowledge base of the software application; Processing the user interface, the requirement document and the knowledge base to obtain test cases for the software application; Optionally, the knowledge base includes: One or more of interface knowledge, interaction knowledge, layout knowledge, domain knowledge and fault knowledge related to the software application; Optionally, the step of obtaining a marked interface after marking elements in the pre-jump interface to which the trigger element belongs, a marked element mapping for storing correspondences between elements and marks in the marked interface, and test knowledge of the interface jump test includes: Obtaining the tag element mapping from a mapping library according to the tag interface; or, Analyzing the marking interface to obtain the marking element mapping; Optionally, the step of obtaining a marked interface after marking elements in the pre-jump interface to which the trigger element belongs, a marked element mapping for storing correspondences between elements and marks in the marked interface, and test knowledge of the interface jump test includes: Acquire the marked interface from the interface library according to the interface before the jump; or, Acquire the interface elements of the interface before the jump; mark the interface elements on the interface before the jump respectively to obtain the marked interface; Optionally, controlling the software application to perform interface jump according to the trigger element tag and the jump process includes: installing the software application on the simulator; The software application on the simulator is controlled to perform interface jump according to the trigger element tag and the jump process.
8. An electronic device, characterized in that: include: A memory storing execution instructions; as well as A processor, wherein the processor executes the execution instructions stored in the memory, so that the processor executes the interface jump method according to any one of claims 1 to 7.
9. A readable storage medium, characterized in that: The readable storage medium stores execution instructions, which are used to implement the interface jump method described in any one of claims 1 to 7 when executed by the processor.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the interface jump method described in any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Operation method and device based on graphical user interface, equipment and medium
CN121255059A