Automatic iOS development method and device based on artificial intelligence and readable storage medium
Through artificial intelligence-based methods, automatic analysis of UI design drafts, requirements documents and interface definition documents, and generate UI codes and test cases for iOS applications, solving the problems of lengthy cycles and high human participation in the iOS development process, and achieving efficient development process and code quality assurance.
Patent Information
- Application Number
- CN202510573164.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-06
- Publication Date
- 2025-08-12
AI Technical Summary
The existing iOS development process cycle is long and the manual participation is too high, resulting in a long development cycle, high labor costs and difficult to ensure the stability of code quality. The existing tools lack a unified and efficient full-process solution and cannot adapt to the market demand for rapid iteration.
Using an artificial intelligence-based method, the UI code is generated through the visual recognition model parsing UI design draft, the requirements analysis model processes the requirements document generation logical statements, the interface call model parsing interface defines the document generation call code, and inputs these codes into the template engine to generate test cases, replacing traditional manual interpretation and writing operations.
It significantly shortens the development cycle, improves the overall development efficiency of iOS applications from interface construction to functional implementation, avoids the efficiency loss caused by manual operations, and improves the stability and development efficiency of code quality.
Smart Images

Figure CN120469688A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of artificial intelligence technology, and in particular relates to an artificial intelligence-based iOS automation development method, device, and readable storage medium. Background Art
[0002] With the rapid development of the mobile internet, the iOS app market continues to expand, and users' demands for app functionality and user experience are becoming increasingly stringent, forcing developers to improve development efficiency and application quality. At the same time, artificial intelligence technology is experiencing explosive growth, with remarkable achievements in fields such as natural language processing and computer vision, bringing innovative opportunities to various industries. The iOS development community also hopes to use AI to break through the bottlenecks of traditional development models.
[0003] In the current iOS development process, developers manually parse the various attributes of design elements before writing UI code line by line. They rely on manual reading and comprehension of requirements documents to organize business logic and then write page logic code. When working with interfaces, they manually construct network request classes and data processing logic based on the interface documentation. Tracking operations also involve manually inserting relevant logic into the code. During testing, developers manually write test cases to perform functional tests on the app.
[0004] This traditional development approach presents significant problems. First, the development process is heavily reliant on manual labor, resulting in lengthy development cycles, high labor costs, and error-prone manual operations, making it difficult to ensure stable code quality. Second, existing tools only offer partial automation, lacking a unified and efficient full-process solution, making them unable to adapt to the rapidly iterating demands of the market. Faced with complex and ever-changing development requirements, the traditional model is no longer able to meet efficiency, cost, and quality control requirements, and innovative technological solutions are urgently needed for reform. Summary of the Invention
[0005] The purpose of the present invention is to provide an iOS automated development method based on artificial intelligence, aiming to solve the problems of the existing iOS development process cycle being lengthy and requiring too much manual participation.
[0006] The first aspect of the embodiments of the present application provides an iOS automated development method based on artificial intelligence, including:
[0007] Obtaining development foundation files, including UI design drafts, requirement documents, and interface definition documents, which are used to implement a specific function in the iOS environment;
[0008] Recognize the UI design draft based on the visual recognition model and generate UI code;
[0009] Process the requirement document based on the requirement parsing model to generate requirement implementation program statements;
[0010] Processing the interface definition document based on the interface call model to generate an interface call program statement;
[0011] The UI code, requirement implementation program statements and interface call program statements are input into a template engine to obtain a test case corresponding to the specific function.
[0012] Based on the artificial intelligence-based iOS automated development method provided in the first aspect of the embodiment of this application, optionally,
[0013] The development basic files also include: tracking point definition document;
[0014] The method further comprises:
[0015] Processing the buried point definition document based on the buried point processing model to generate buried point collection program statements;
[0016] The step of inputting the UI code, requirement implementation program statements, and interface call program statements into a template engine to obtain a test case corresponding to the specific function includes:
[0017] The UI code, the requirement implementation program statement interface call program statement and the tracking point collection program statement are input into the template engine to obtain the test case corresponding to the specific function.
[0018] Based on the artificial intelligence-based iOS automated development method provided in the first aspect of the embodiment of this application, optionally,
[0019] The UI design draft is a JSON file exported from the Figma platform;
[0020] The architecture of the visual recognition model is a feature extraction neural network model architecture that combines YOLO and ResNet.
[0021] Based on the artificial intelligence-based iOS automated development method provided in the first aspect of the embodiment of this application, optionally,
[0022] The requirement document is a Markdown file;
[0023] The architecture of the demand parsing model is a neural network model architecture that combines fine-tuned BERT and CRF models.
[0024] Based on the artificial intelligence-based iOS automated development method provided in the first aspect of the embodiment of this application, optionally,
[0025] The interface document is defined in OpenAPI 3.0 format;
[0026] The interface calling program statement includes the Request model class, the network calling method and the Model class setting.
[0027] Based on the artificial intelligence-based iOS automated development method provided in the first aspect of the embodiment of this application, optionally,
[0028] The tracking point definition document is a CSV file;
[0029] The method further comprises:
[0030] The location of the positioning method is defined through static code analysis, and the embedded point collection program statement is automatically inserted.
[0031] Based on the artificial intelligence-based iOS automated development method provided in the first aspect of the embodiment of this application, optionally,
[0032] The artificial intelligence-based iOS automated development method is integrated into a development tool plug-in or CI system middleware.
[0033] A second aspect of the embodiments of the present application provides an iOS automated development device based on artificial intelligence, including:
[0034] An acquisition unit is used to acquire development basic files, including UI design drafts, requirement documents, and interface definition documents, which are used to implement a specific function in the iOS environment;
[0035] A UI code generation unit, configured to recognize the UI design draft based on a visual recognition model and generate UI code;
[0036] A requirement realization program statement generating unit, configured to process the requirement document based on the requirement parsing model and generate a requirement realization program statement;
[0037] An interface call program statement generating unit, configured to process the interface definition document based on an interface call model and generate an interface call program statement;
[0038] The test case generation unit is used to input the UI code, requirement implementation program statement and interface call program statement into the template engine to obtain the test case corresponding to the specific function.
[0039] Based on the artificial intelligence-based iOS automation development device provided in the second aspect of the embodiment of this application, optionally,
[0040] The development basic files also include: tracking point definition document;
[0041] The device further includes: a point-of-use acquisition program statement generating unit, which is used to:
[0042] Processing the buried point definition document based on the buried point processing model to generate buried point collection program statements;
[0043] The test case generation unit is specifically used for:
[0044] The UI code, the requirement implementation program statement interface call program statement and the tracking point collection program statement are input into the template engine to obtain the test case corresponding to the specific function.
[0045] Based on the artificial intelligence-based iOS automation development device provided in the second aspect of the embodiment of this application, optionally,
[0046] The UI design draft is a JSON file exported from the Figma platform;
[0047] The architecture of the visual recognition model is a feature extraction neural network model architecture that combines YOLO and ResNet.
[0048] Based on the artificial intelligence-based iOS automation development device provided in the second aspect of the embodiment of this application, optionally,
[0049] The requirement document is a Markdown file;
[0050] The architecture of the demand parsing model is a neural network model architecture that combines fine-tuned BERT and CRF models.
[0051] Based on the artificial intelligence-based iOS automation development device provided in the second aspect of the embodiment of this application, optionally,
[0052] The interface document is defined in OpenAPI 3.0 format;
[0053] The interface calling program statement includes the Request model class, the network calling method and the Model class setting.
[0054] Based on the artificial intelligence-based iOS automation development device provided in the second aspect of the embodiment of this application, optionally,
[0055] The tracking point definition document is a CSV file;
[0056] The embedding point collection program statement generation unit is also used for:
[0057] The location of the positioning method is defined through static code analysis, and the embedded point collection program statement is automatically inserted.
[0058] A third aspect of the embodiments of the present application provides an iOS automated development device based on artificial intelligence, including:
[0059] CPU, memory, input and output interfaces, wired or wireless network interfaces, and power supply;
[0060] The memory is a transient storage memory or a persistent storage memory;
[0061] The central processing unit is configured to communicate with the memory and execute instruction operations in the memory on the device to perform a method as described in any one of the third embodiments of the present application.
[0062] A fourth aspect of the embodiments of the present application provides a computer-readable storage medium, characterized in that it includes instructions, which, when executed on a computer, enable the computer to execute the method described in any one of the first aspects of the embodiments of the present application.
[0063] It can be seen from the above technical solution that the embodiment of the present application has the following advantages: The embodiment of the present application provides an iOS automated development method based on artificial intelligence, including: obtaining development basic files, the development basic files including: UI design draft, requirement document and interface definition document; the UI design draft, requirement document and interface definition document are used to implement a specific function in the iOS environment; based on the visual recognition model, the UI design draft is identified to generate UI code; based on the requirement parsing model, the requirement document is processed to generate requirement implementation program statements; based on the interface call model, the interface definition document is processed to generate interface call program statements; the UI code, requirement implementation program statements and interface call program statements are input into the template engine to obtain test cases corresponding to the specific function. Based on the above method, the visual recognition model is used to automatically parse the UI design draft to generate UI code, the requirement analysis model is used to process the requirement document to generate logical statements, and the interface call model is used to parse the interface definition document to generate call code. This replaces the tedious operations of manually interpreting the element attributes of the design draft to write UI code, manually analyzing the requirement document to write logic, and writing interface call code one by one in traditional development. It transforms multiple time-consuming development links into automated processes, greatly shortens the development cycle, and avoids the efficiency loss caused by manual operations, significantly improving the overall development efficiency of iOS applications from interface construction to function implementation. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] To more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present application. A person of ordinary skill in the art can also derive other drawings based on the provided drawings without inventive effort. It should be understood that the drawings provided in this section are only used to better understand the present solution and do not constitute a limitation of the present application.
[0065] Figure 1 A flowchart of an embodiment of an artificial intelligence-based iOS automated development method provided in this application;
[0066] Figure 2 This is another flowchart of an embodiment of the artificial intelligence-based iOS automated development method provided by this application;
[0067] Figure 3 A schematic diagram of the function page provided by this application;
[0068] Figure 4 This is a structural diagram of an embodiment of the artificial intelligence-based iOS automated development method provided in this application. DETAILED DESCRIPTION
[0069] In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application are clearly and completely described below. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work should fall within the scope of protection of this application. At the same time, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0070] The terms "first," "second," "third," "fourth," and the like (if any) in the specification and claims of this application and in the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a particular order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" and "having," and any variations thereof, are intended to cover non-exclusive inclusions, e.g., a process, method, product, or apparatus comprising a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such process, method, product, or apparatus.
[0071] With the rapid development of the mobile internet, the iOS app market continues to expand, and users' demands for app functionality and user experience are becoming increasingly stringent, forcing developers to improve development efficiency and application quality. At the same time, artificial intelligence technology is experiencing explosive growth, with remarkable achievements in fields such as natural language processing and computer vision, bringing innovative opportunities to various industries. The iOS development community also hopes to use AI to break through the bottlenecks of traditional development models.
[0072] In the current iOS development process, developers manually parse the various attributes of design elements before writing UI code line by line. They rely on manual reading and comprehension of requirements documents to organize business logic and then write page logic code. When working with interfaces, they manually construct network request classes and data processing logic based on the interface documentation. Tracking operations also involve manually inserting relevant logic into the code. During testing, developers manually write test cases to perform functional tests on the app.
[0073] This traditional development approach presents significant problems. First, the development process is heavily reliant on manual labor, resulting in lengthy development cycles, high labor costs, and error-prone manual operations, making it difficult to ensure stable code quality. Second, existing tools only offer partial automation, lacking a unified and efficient full-process solution, making them unable to adapt to the rapidly iterating demands of the market. Faced with complex and ever-changing development requirements, the traditional model is no longer able to meet efficiency, cost, and quality control requirements, and innovative technological solutions are urgently needed for reform.
[0074] To solve the above problems, this application provides an iOS automation development method based on artificial intelligence, please refer to Figure 1 An embodiment of the artificial intelligence-based iOS automated development method provided in this application includes: steps 101 to 105.
[0075] 101. Obtain development basic files.
[0076] Specifically, the development basic files include: UI design draft, requirement document and interface definition document, which are used to implement a specific function in the iOS environment;
[0077] Collect the key foundational files required for iOS app development. These files contain core information for implementing specific functions and serve as the basis for subsequent automated development. The UI design draft, a graphical file created by a designer, demonstrates the interface layout and element styles (such as button shape, text box size, and color scheme) for a specific iOS app function. It serves as a visual reference for UI code generation. The requirements document, in text form, details the business logic, user interaction requirements, and functional features of a specific function. It serves as the source of business rules for generating the required implementation statements. The interface definition document specifies the interface information for data exchange between the application and external systems (such as servers), including the interface path, request method (such as GET and POST), parameter fields and their formats, and serves as the basis for generating interface call statements. The UI design draft, requirements document, and interface definition document are used together to implement a specific function in the iOS environment. The specific implementation form of a specific function can vary depending on the specific situation, such as logging in, retrieving specific resources, or redirecting to a specific page. The specific implementation is not specified here. During the actual implementation process, the development foundation files can be generated by different staff members and may also include other content such as tracking documents. The specific implementation is not specified here.
[0078] 102. Identify the UI design draft based on the visual recognition model and generate UI code.
[0079] Specifically, a pre-trained visual recognition model is used to analyze and understand UI design drafts, identifying various interface elements (such as buttons, text boxes, images, etc.) and their attributes (such as position, size, color, etc.) within the design draft. Based on this information, the corresponding iOS UI code is then automatically generated. Visual recognition models: Models trained using deep learning techniques, such as convolutional neural networks (CNNs), are capable of extracting and classifying features from images and identifying different elements within UI design drafts. In actual implementation, open source visual recognition models can be used, or customized training can be performed based on specific needs.
[0080] 103. Process the requirement document based on the requirement parsing model to generate requirement implementation program statements.
[0081] Specifically, the requirements parsing model is trained using natural language processing techniques, such as BERT. It can perform semantic analysis and information extraction on text, understanding the business rules within the requirements document. The requirements document is input into the requirements parsing model as a text file (such as TXT or DOCX). The model performs word segmentation, part-of-speech tagging, and syntactic analysis on the text to extract key information. This information is then converted into program statements to implement the requirements based on pre-set code templates and rules. General natural language processing models can be fine-tuned to adapt to specific requirements document styles.
[0082] 104. Process the interface definition document based on the interface call model to generate interface call program statements.
[0083] The interface calling model is used to parse the interface definition document, extract the relevant information of the interface (such as path, method, parameters, etc.), and then generate the iOS program statement for calling the interface based on this information.
[0084] The above steps 102 to 104 may be performed in any order and are not specifically limited here.
[0085] 105. Input the UI code, requirement implementation program statements and interface call program statements into the template engine to obtain the test case corresponding to the specific function.
[0086] Specifically, the UI code, requirement implementation program statements, and interface call program statements generated in the previous steps are used as input, and a template engine is used to generate a test case for the specific function according to a preset test case template.
[0087] A template engine is a tool that combines data and templates to generate text in a specific format. In this step, the template engine generates a test case by filling the input code information into the template based on the preset test case template. The template engine can use the XCTest template engine, which is an Apple-provided framework for unit testing and UI testing on platforms such as iOS and macOS.
[0088] It can be seen from the above technical solution that the embodiment of the present application has the following advantages: The embodiment of the present application provides an iOS automated development method based on artificial intelligence, including: obtaining development basic files, the development basic files including: UI design draft, requirement document and interface definition document; the UI design draft, requirement document and interface definition document are used to implement a specific function in the iOS environment; based on the visual recognition model, the UI design draft is identified to generate UI code; based on the requirement parsing model, the requirement document is processed to generate requirement implementation program statements; based on the interface call model, the interface definition document is processed to generate interface call program statements; the UI code, requirement implementation program statements and interface call program statements are input into the template engine to obtain test cases corresponding to the specific function. Based on the above method, the visual recognition model is used to automatically parse the UI design draft to generate UI code, the requirement analysis model is used to process the requirement document to generate logical statements, and the interface call model is used to parse the interface definition document to generate call code. This replaces the tedious operations of manually interpreting the element attributes of the design draft to write UI code, manually analyzing the requirement document to write logic, and writing interface call code one by one in traditional development. It transforms multiple time-consuming development links into automated processes, greatly shortens the development cycle, and avoids the efficiency loss caused by manual operations, significantly improving the overall development efficiency of iOS applications from interface construction to function implementation.
[0089] The above content describes the iOS automation development method based on artificial intelligence in this application. The following provides a more detailed embodiment that can be implemented. Please refer to Figure 2 The artificial intelligence-based iOS automation development method provided in this application includes steps 201 to 206.
[0090] 201. Obtain development basic files.
[0091] Specifically, obtain the development basic files, which include: UI design draft, requirement document and interface definition document; the UI design draft, requirement document and interface definition document are used to implement a specific function in the iOS environment. This step is the same as the previous step. Figure 1 The corresponding embodiments are similar in detail and will not be described in detail here.
[0092] This embodiment is to achieve Figure 3 The login function shown is used as an example for explanation. It can be understood that in the actual implementation process, the function implemented by developing the basic file can be any function and is not limited here.
[0093] 202. Identify the UI design draft based on the visual recognition model and generate UI code.
[0094] Specifically, the UI design draft is a JSON file exported by the Figma platform; it contains information such as the coordinates, size, color, font, layer structure, etc. of each page element. The architecture of the visual recognition model is a feature extraction neural network model architecture that combines YOLO and ResNet. The feature extraction neural network model architecture that combines YOLO (You Only Look Once) and ResNet (Residual Network) On the one hand, YOLO is fast and can quickly detect and locate elements in the UI design draft, achieve real-time feedback, and efficiently promote the visual recognition process. On the other hand, ResNet can learn deep-level features, extract rich and accurate feature information, and accurately grasp design details. The two complement each other's advantages, enhance the model's generalization ability, and can adapt to design drafts and platforms of different styles.
[0095] In the actual implementation process, the visual recognition model first parses each layer node, such as Button, Label, Image, etc., and determines the corresponding control type through its type identifier and border coordinates; extracts visual features such as color (such as background color #F6F6F6, text color #333333), font (such as SF Pro Text, bold, 28pt), spacing (such as upper and lower margins of 20pt), rounded corners, shadows, etc.; according to the UI component and style characteristics, it searches for the corresponding SwiftUI template and fills in the component properties and layout structure. For example, the model generates code as follows:
[0096] Text("Welcome Back")
[0097] .font(.system(size:28,weight:.bold))
[0098] .foregroundColor(Color(hex:"#333333"))
[0099] .padding(.bottom, 20)
[0100] As shown above, the system automatically identifies a title label and completes the font size, color and margins.
[0101] 203. Process the requirement document based on the requirement parsing model to generate requirement implementation program statements.
[0102] Specifically, the requirements document is a Markdown file written by the product manager in the following format:
[0103] ##Login page input box: email, password
[0104] - Click the login button to jump to the home page
[0105] -Click Forgot Password to enter the reset page
[0106] A fine-tuned BERT+CRF model is used to extract intent from the requirements document and parse the control interaction intent (such as click, jump, and state switching). Combined with the previously generated UI control binding events, the program statements are formed as follows:
[0107] (void)loginButtonTapped{
[0108] [self.view endEditing:YES];
[0109] [self.navigationControllerpushViewcontroller:[[HomeViewControlleralloc]
[0110] }
[0111] The requirements parsing model is a neural network architecture that combines a fine-tuned BERT and a CRF model. Fine-tuned BERT provides a deep understanding of the semantics of requirements documents, possessing strong contextual awareness and accurately grasping business intent. CRF excels at sequence labeling, accurately identifying key entities such as controls and actions and finding the globally optimal labeling. The combination of these two models offers strong adaptability, enabling rapid adaptation to new requirements formats and businesses.
[0112] 204. Process the interface definition document based on the interface call model to generate an interface call program statement.
[0113] The interface document is defined in OpenAPI 3.0 format;
[0114] Here is an example:
[0115] POST / login
[0116] {
[0117] "email":'string",
[0118] "password":"string"
[0119] }
[0120] The interface call model parses the path, method, and parameter fields in the interface document to generate the Request model class and network call method. At the same time, it automatically maps the interface response structure to the Model class, ultimately forming a program statement that defines the LoginRequest class and related properties. An example of a program statement is as follows:
[0121] @interfaceLoginRequest:NSObject
[0122] @property(nonatomic,copy)NSString*email;
[0123] @property(nonatomic,copy)NSString*password;
[0124] @end
[0125] 205. Process the burying point definition document based on the burying point processing model to generate burying point collection program statements.
[0126] For some situations where it is necessary to collect tracking data, the development basic files also include: tracking definition document.
[0127] The tracking point definition document is a CSV file; example:
[0128] EventID,Description,Trigger
[0129] login_button_click, click the login button, LoginViewController.loginButtonTapped
[0130] Use static code analysis to locate method definition locations and automatically insert embedded call points. The following example shows:
[0131] [TYAnalytics trackEvent:@"login button click"];
[0132] It is understandable that the tracking point processing model can be a deep learning model or composed of rule statements, which is not limited here.
[0133] 206. Input the UI code, the requirement implementation program statement interface call program statement, and the tracking point collection program statement into the template engine to obtain the test case corresponding to the specific function.
[0134] Specifically, the system uses the XCTest template engine to generate automated test code based on the generated UI layer structure and interaction path:
[0135] -(void)testLoginFlow{
[0136] XCUIApplication*app=[[XCUIApplication alloc]init];
[0137] [app.textFields["Email"]tap];
[0138] [app.textFields["Email"]typeText:@"test@example.com"];
[0139] [app.secureTextFields["Password"]tap];
[0140] [app.secureTextFields["Password"]typeText:@"123456"];
[0141] [app.buttons["Login"]tap];
[0142] XCTAssertTrue(app.staticTexts["Dashboard"].exists);
[0143] }
[0144] Based on the above process, a test case corresponding to the function is formed, which can be used for subsequent testing to determine whether the formed program statement meets the requirements. If so, it can be put into the actual implementation environment. If not, manual adjustments can be made based on the test case. The specific details are not limited here.
[0145] It can be seen from the above technical solution that the embodiment of the present application has the following advantages: The embodiment of the present application provides an iOS automated development method based on artificial intelligence, including: obtaining development basic files, the development basic files including: UI design draft, requirement document and interface definition document; the UI design draft, requirement document and interface definition document are used to implement a specific function in the iOS environment; based on the visual recognition model, the UI design draft is identified to generate UI code; based on the requirement parsing model, the requirement document is processed to generate requirement implementation program statements; based on the interface call model, the interface definition document is processed to generate interface call program statements; the UI code, requirement implementation program statements and interface call program statements are input into the template engine to obtain test cases corresponding to the specific function. Based on the above method, the visual recognition model is used to automatically parse the UI design draft to generate UI code, the requirement analysis model is used to process the requirement document to generate logical statements, and the interface call model is used to parse the interface definition document to generate call code. This replaces the tedious operations of manually interpreting the element attributes of the design draft to write UI code, manually analyzing the requirement document to write logic, and writing interface call code one by one in traditional development. It transforms multiple time-consuming development links into automated processes, greatly shortens the development cycle, and avoids the efficiency loss caused by manual operations, significantly improving the overall development efficiency of iOS applications from interface construction to function implementation.
[0146] The above content describes the artificial intelligence-based iOS automation development method provided by this application. To support the implementation of the above embodiment, this application also provides an artificial intelligence-based iOS automation development device. An embodiment of the artificial intelligence-based iOS automation development device provided in the second aspect of this application includes:
[0147] An acquisition unit 401 is configured to acquire development basic files, including a UI design draft, a requirements document, and an interface definition document, wherein the UI design draft, the requirements document, and the interface definition document are used to implement a specific function in an iOS environment.
[0148] A UI code generating unit 402 is configured to recognize the UI design draft based on a visual recognition model and generate UI code;
[0149] A requirement realization program statement generating unit 403 is configured to process the requirement document based on the requirement parsing model and generate a requirement realization program statement;
[0150] An interface calling program statement generating unit 404 is configured to process the interface definition document based on the interface calling model and generate an interface calling program statement;
[0151] The test case generating unit 405 is used to input the UI code, requirement realization program statement and interface call program statement into the template engine to obtain the test case corresponding to the specific function.
[0152] In this embodiment, the processes performed by each unit in the device are the same as those described above. Figure 1 The method flow described in the corresponding embodiment is similar and will not be repeated here.
[0153] Optionally,
[0154] The development basic files also include: tracking point definition document;
[0155] The device further includes: a point-of-use acquisition program statement generating unit, which is used to:
[0156] Processing the buried point definition document based on the buried point processing model to generate buried point collection program statements;
[0157] The test case generation unit is specifically used for:
[0158] The UI code, the requirement implementation program statement interface call program statement, and the tracking point collection program statement are input into the template engine to obtain the test case corresponding to the specific function.
[0159] Optionally,
[0160] The UI design draft is a JSON file exported from the Figma platform;
[0161] The architecture of the visual recognition model is a feature extraction neural network model architecture that combines YOLO and ResNet.
[0162] Optionally,
[0163] The requirement document is a Markdown file;
[0164] The architecture of the demand parsing model is a neural network model architecture that combines fine-tuned BERT and CRF models.
[0165] Optionally,
[0166] The interface document is defined in OpenAPI 3.0 format;
[0167] The interface calling program statement includes the Request model class, the network calling method and the Model class setting.
[0168] Optionally,
[0169] The tracking point definition document is a CSV file;
[0170] The embedding point collection program statement generation unit is also used for:
[0171] The location of the positioning method is defined through static code analysis, and the embedded point collection program statement is automatically inserted.
[0172] Figure 4 1 is a structural diagram of an artificial intelligence-based iOS automation development device 400 provided in an embodiment of the present application. The artificial intelligence-based iOS automation development device 400 may include one or more central processing units (CPU) 401 and a memory 405, in which one or more applications or data are stored.
[0173] In this embodiment, the specific functional module division in the central processing unit 401 may be similar to the functional module division of each unit described above, and will not be repeated here.
[0174] Memory 405 may be volatile storage or persistent storage. The program stored in memory 405 may include one or more modules, each of which may include a series of instruction operations on the server. Furthermore, the central processing unit 401 may be configured to communicate with memory 405 and execute the series of instruction operations in memory 405 on the artificial intelligence-based iOS automation development device 400.
[0175] The artificial intelligence-based iOS automation development device 400 may further include one or more power supplies 402 , one or more wired or wireless network interfaces 403 , and one or more input / output interfaces 407 .
[0176] The CPU 401 can execute the aforementioned Figure 1 The operations performed by the artificial intelligence-based iOS automated development method in the illustrated embodiment will not be described in detail here.
[0177] An embodiment of the present application also provides a computer storage medium for storing computer software instructions used for the above-mentioned test case generation method, which includes a program designed for executing an artificial intelligence-based iOS automation development method.
[0178] The artificial intelligence-based iOS automation development method can be the artificial intelligence-based iOS automation development method described in the aforementioned figures.
[0179] An embodiment of the present application also provides a computer program product, which includes computer software instructions, and the computer software instructions can be loaded by a processor to implement the process of the artificial intelligence-based iOS automation development method in any of the above figures.
[0180] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the equivalent transformation of circuits and the division of units are only a kind of logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0181] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0182] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0183] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions or improvements made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. An iOS automation development method based on artificial intelligence, characterized in that: include: Obtaining development foundation files, including UI design drafts, requirement documents, and interface definition documents, which are used to implement a specific function in the iOS environment; Recognize the UI design draft based on the visual recognition model and generate UI code; Process the requirement document based on the requirement parsing model to generate requirement implementation program statements; Processing the interface definition document based on the interface call model to generate an interface call program statement; The UI code, requirement implementation program statements and interface call program statements are input into a template engine to obtain a test case corresponding to the specific function.
2. The artificial intelligence-based iOS automation development method according to claim 1, characterized in that: The development basic files also include: tracking point definition document; The method further comprises: Processing the buried point definition document based on the buried point processing model to generate buried point collection program statements; The step of inputting the UI code, requirement implementation program statements, and interface call program statements into a template engine to obtain a test case corresponding to the specific function includes: The UI code, the requirement implementation program statement interface call program statement and the tracking point collection program statement are input into the template engine to obtain the test case corresponding to the specific function.
3. The iOS automation development method based on artificial intelligence according to claim 1, characterized in that: The UI design draft is a JSON file exported from the Figma platform; The architecture of the visual recognition model is a feature extraction neural network model architecture that combines YOLO and ResNet.
4. The artificial intelligence-based iOS automation development method according to claim 1, characterized in that: The requirement document is a Markdown file; The architecture of the demand parsing model is a neural network model architecture that combines fine-tuned BERT and CRF models.
5. The iOS automation development method based on artificial intelligence according to claim 1, characterized in that: The interface document is defined in OpenAPI 3.0 format; The interface calling program statement includes the Request model class, the network calling method and the Model class setting.
6. The artificial intelligence-based iOS automation development method according to claim 2, characterized in that: The tracking point definition document is a CSV file; The method further comprises: The location of the positioning method is defined through static code analysis, and the embedded point collection program statement is automatically inserted.
7. The artificial intelligence-based iOS automation development method according to claim 1, characterized in that: The artificial intelligence-based iOS automated development method is integrated into a development tool plug-in or CI system middleware.
8. An iOS automation development device based on artificial intelligence, characterized in that: include: An acquisition unit is used to acquire development basic files, including UI design drafts, requirement documents, and interface definition documents, which are used to implement a specific function in the iOS environment; A UI code generation unit, configured to recognize the UI design draft based on a visual recognition model and generate UI code; A requirement realization program statement generating unit, configured to process the requirement document based on the requirement parsing model and generate a requirement realization program statement; An interface call program statement generating unit, configured to process the interface definition document based on an interface call model and generate an interface call program statement; The test case generation unit is used to input the UI code, requirement implementation program statement and interface call program statement into the template engine to obtain the test case corresponding to the specific function.
9. An iOS automation development device based on artificial intelligence, characterized in that: include: CPU, memory, input and output interfaces, wired or wireless network interfaces, and power supply; The memory is a transient storage memory or a persistent storage memory; The central processing unit is configured to communicate with the memory and execute instructions in the memory on the device to perform the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that The method comprises instructions, which, when executed on a computer, cause the computer to perform the method according to any one of claims 1 to 7.