国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

Table of Contents
About the author
Introduction
1. Current status of UI automation
2. The introduction of behavior-driven development BDD
3. Current application of AI in UI automation
4. AI fully automatically writes effective test scripts
5. System Implementation
Home Technology peripherals AI Let AI write effective UI automation with real-time debugging

Let AI write effective UI automation with real-time debugging

Mar 15, 2024 pm 03:46 PM
ai Ctrip

About the author

Thales Fu, senior R&D manager at Ctrip, is committed to finding better ways to combine AI and engineering to solve real-life problems.

Introduction

In the rapidly iterative software development cycle, automated testing of user interface (UI) has become the key to improving efficiency and ensuring product quality. However, as applications become increasingly complex, traditional UI automation methods gradually reveal their limitations. AI-driven UI automation is here, but it still faces accuracy and reliability challenges. In this context, this article proposes an innovative perspective: through real-time debugging technology, the effectiveness of UI automation scripts written by AI can be significantly improved.

This problem is not just a technical challenge, it is related to how to speed up the delivery of software while ensuring software quality. This article will explore how real-time debugging can help AI understand and execute UI test scripts more accurately, and how this method can bring revolutionary changes to software development.

1. Current status of UI automation

UI automation has experienced considerable development, starting from the simple recording and playback tools. to today’s complex scripting framework. Despite the continuous advancement of technology, traditional UI automation methods still face challenges when dealing with rapidly changing application interfaces. As applications become more complex and dynamic, traditional approaches may not be enough. Therefore, engineers are looking for more flexible and reliable solutions to improve the efficiency and reliability of UI automation. A new generation of UI automation tools and technologies are emerging to

According to industry surveys, manually writing test scripts is inefficient and takes a lot of time to re-work when updates are applied. Research shows that maintaining UI automation test scripts may account for 60% to 70% of the entire testing work. In an agile development environment, it can take more than 100 hours to rewrite and test existing automation scripts for each application update. This high maintenance cost highlights the inefficiency and resource consumption of traditional UI automation methods.

2. The introduction of behavior-driven development BDD

Behavior-driven development (BDD) is an agile software development practice that encourages software More effective communication between a project’s developers, testers, and non-technical stakeholders. Cucumber is a popular tool for implementing BDD methodology, which allows team members to write explicit, executable test cases using natural language.

Cucumber uses a domain-specific language (DSL) called Gherkin, which is extremely easy to read and allows non-technical people to understand the purpose and content of the test. Test scenarios are written in the form of a series of Given-When-Then statements, which clearly describe how the system should respond under specific conditions.

For example, the shopping cart function of an online shopping website may have the following Gherkin scenario:

Let AI write effective UI automation with real-time debugging

## This approach leverages natural language description capabilities to promote better communication and understanding between technical and non-technical teams. At the same time, the natural language test scenario also plays the role of project documentation, helping new team members quickly understand the project functions. This enables non-technical personnel to directly participate in the test case writing and verification process, ensuring that development work is closely aligned with business needs.

But it also has limitations. Although the test scenario is written in natural language, the implementation (step definition) behind each step still requires technical personnel to write it in a programming language. This means implementing test logic can involve complex coding efforts. As applications grow and change, maintaining and updating corresponding test steps can become tedious. Especially when the UI changes frequently, the relevant step definitions also need to be updated accordingly. There are also flexibility and adaptability limitations: Cucumber test scripts rely on predefined steps and structures, which can limit the flexibility of the test. For some complex test scenarios, implementing specific test logic may require creative ways to circumvent the limitations of the framework.

Let AI write effective UI automation with real-time debugging

3. Current application of AI in UI automation

In recent years, AI technology has been integrated In UI automation, especially after the emergence of large models represented by GPT, because it has its own code generation capabilities. The industry has also begun to try to directly generate Gherkin's test case description language into test code through large models.

Let AI write effective UI automation with real-time debugging

However, the test code generated by the current large model cannot fully meet expectations. There are several main problems: First, the generated script, because Syntax errors may prevent it from running; secondly, it may not accurately cover the checkpoints that the test case requires it to test. In our practice, the rate of success on the first try is no more than 5%.

After it fails to be generated, people will need to intervene to perform some remedial work. Including: debugging, modifying the use case to regenerate, or directly modifying the generated script.

Let AI write effective UI automation with real-time debugging

#And these tasks themselves also require a lot of manpower, which is contrary to the original intention of our system to automatically generate test scripts through AI.

4. AI fully automatically writes effective test scripts

In order to solve this problem, we have rethought the way AI generates test scripts the whole process.

Let AI write effective UI automation with real-time debugging

#We also consider people’s work together. People have done the debugging and modification work in the system, so can AI do this part of the work? Let the system run the generated code by itself, and let AI debug and modify the error codes it generates.

Therefore, we have adjusted the system design to allow AI to do these tasks autonomously instead of humans. In the end, for all the use cases of Ctrip's hotel order details page, 83.3% of the cases were successfully generated without anyone's participation. During the script generation process, bugs were discovered in 8% of the cases. We generated these use cases three times in a row, with success rates of 84.3%, 81.4% and 83.3% respectively. The system is stable and effective.

Let AI write effective UI automation with real-time debugging

The specific test cases and codes are as follows:

Let AI write effective UI automation with real-time debugging

First, you need to slide to the order details page and drop it User rights module, and then click on the booking optimization area to pop up the price floating layer.

Let AI write effective UI automation with real-time debugging

Then check to see if the fee details include Black Diamond VIP.

Let AI write effective UI automation with real-time debugging

The final generated test code is as follows:

Let AI write effective UI automation with real-time debugging

5. System Implementation

The core architecture diagram of the entire system is as follows. The core part of the system is a langchain framework program. It will access the large model, and we have equipped it with multiple tools, which are mainly divided into two categories, one is the tool for obtaining page information, and the other is the debugging tool.

Langchain will automatically use the page information acquisition tool to get the page data as needed to determine which specific control is needed for the current operation to generate code. Then use the debugging tool to actually execute the code on the mobile phone, and judge whether the code you generated is correct based on the debugging feedback.

Let AI write effective UI automation with real-time debugging

5.1 Prompt words

Yes After the basic architecture, we need prompt words to glue these tools together and let AI understand how it should work. Structurally, our prompt word contains several parts: first, tell the AI ??how it should think and work, secondly, tell it to debug each of its generated statements through Debug, tell it again what the output format is, and finally tell it The complete text of the use case to be handled by the AI.

For telling AI how it should think and work, the expansion includes the following parts: First, look at what modules are on the page, which module should be the step I want to operate, and what are in this module Controls and components, which control or component I want to operate currently, what action I want to operate, and what is the special syntax I can use, and then generate statements.

Let AI write effective UI automation with real-time debugging

5.2 Debugging Tools

Debugging Tools The essence is to remotely connect to the phone through the adb tool. After connecting, we can send the instructions generated by the AI ??to the mobile phone to run, and read the results after the operation and give them to the AI, allowing the AI ??to judge whether the instructions it generated are correct.

5.3 Page information acquisition tool

The ultimate purpose of the page information acquisition tool is to help AI determine the content to be operated as written in the BDD use case, and what is the ID of the specific control it wants to operate. Only with the ID can the subsequent content be generated based on the ID. Program instructions. In order to get the ID, we need a control and component library. The core of this library is the ID of each control and component and their description. With these two contents, AI can be helped to guess which control is needed based on the description of the control after reading the BDD use case.

To achieve this goal, we established a page control library. In addition to the ID and description of each control on the page, this library also contains the relationship between the page and components, and the relationship between components and controls. It can facilitate AI to query step by step.

Let AI write effective UI automation with real-time debugging

#The control library itself is generated based on our static analysis of the code through the job. However, in actual applications, because the controls currently displayed on the page will differ depending on the scene state, the controls on the page will be hidden in some scenarios. Therefore, the page information acquisition tool will intersect the currently existing controls on the page with the controls queried in the control library, thereby obtaining the controls actually displayed on the current page and their description information.

5.4 Further Split AI

Let AI write effective UI automation with real-time debugging

## After completing these tasks, AI can basically do the yellow part of the picture above, which is the human work. The generation success rate has also increased from 5% to 55%, but the 55% success rate is still not enough.

We further analyzed the failed cases. It was found that the main problem was the hallucination of the AI. Although the prompt words were relatively detailed, the AI ??sometimes did not process it as required, and sometimes talked nonsense on its own.

Our conclusion is that AI is given too much responsibility and it has too many things to consider. It’s not that it doesn’t have enough tokens, but that if it has to do too many things, it will be forgotten and unable to accurately complete the requirements. Therefore, we considered splitting, and still used the function of langchain. Since AI can complete functions through tools, why can't this tool itself be an AI?

Let AI write effective UI automation with real-time debugging

You can even split it again.

Let AI write effective UI automation with real-time debugging

Through these splits, we make the work that each AI needs to consider less and simpler, and also make it process more accurately. The final generation success rate increased to more than 80%.

6. Follow-up development

Currently, through our work, AI can be successfully used with about 80% success without human participation. It is exciting to generate automated test code at a high rate, but there are still many problems that need to be solved.

1) The cost of calling large models is still not low. Is there a better way to complete the work at a lower cost?

2) There are currently some operations or verifications that are difficult to handle. The success rate is 80% and there is still a lot of room for improvement. At present, people still need to review the generated results.

3) In addition, there is room for improvement in other aspects, which is worthy of our continued improvement.

The above is the detailed content of Let AI write effective UI automation with real-time debugging. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undress AI Tool

Undress AI Tool

Undress images for free

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

PHP Tutorial
1502
276
What is Ethereum? What are the ways to obtain Ethereum ETH? What is Ethereum? What are the ways to obtain Ethereum ETH? Jul 31, 2025 pm 11:00 PM

Ethereum is a decentralized application platform based on smart contracts, and its native token ETH can be obtained in a variety of ways. 1. Register an account through centralized platforms such as Binance and Ouyiok, complete KYC certification and purchase ETH with stablecoins; 2. Connect to digital storage through decentralized platforms, and directly exchange ETH with stablecoins or other tokens; 3. Participate in network pledge, and you can choose independent pledge (requires 32 ETH), liquid pledge services or one-click pledge on the centralized platform to obtain rewards; 4. Earn ETH by providing services to Web3 projects, completing tasks or obtaining airdrops. It is recommended that beginners start from mainstream centralized platforms, gradually transition to decentralized methods, and always attach importance to asset security and independent research, to

How to choose a free market website in the currency circle? The most comprehensive review in 2025 How to choose a free market website in the currency circle? The most comprehensive review in 2025 Jul 29, 2025 pm 06:36 PM

The most suitable tools for querying stablecoin markets in 2025 are: 1. Binance, with authoritative data and rich trading pairs, and integrated TradingView charts suitable for technical analysis; 2. Ouyi, with clear interface and strong functional integration, and supports one-stop operation of Web3 accounts and DeFi; 3. CoinMarketCap, with many currencies, and the stablecoin sector can view market value rankings and deans; 4. CoinGecko, with comprehensive data dimensions, provides trust scores and community activity indicators, and has a neutral position; 5. Huobi (HTX), with stable market conditions and friendly operations, suitable for mainstream asset inquiries; 6. Gate.io, with the fastest collection of new coins and niche currencies, and is the first choice for projects to explore potential; 7. Tra

Ethena treasury strategy: the rise of the third empire of stablecoin Ethena treasury strategy: the rise of the third empire of stablecoin Jul 30, 2025 pm 08:12 PM

The real use of battle royale in the dual currency system has not yet happened. Conclusion In August 2023, the MakerDAO ecological lending protocol Spark gave an annualized return of $DAI8%. Then Sun Chi entered in batches, investing a total of 230,000 $stETH, accounting for more than 15% of Spark's deposits, forcing MakerDAO to make an emergency proposal to lower the interest rate to 5%. MakerDAO's original intention was to "subsidize" the usage rate of $DAI, almost becoming Justin Sun's Solo Yield. July 2025, Ethe

What is Binance Treehouse (TREE Coin)? Overview of the upcoming Treehouse project, analysis of token economy and future development What is Binance Treehouse (TREE Coin)? Overview of the upcoming Treehouse project, analysis of token economy and future development Jul 30, 2025 pm 10:03 PM

What is Treehouse(TREE)? How does Treehouse (TREE) work? Treehouse Products tETHDOR - Decentralized Quotation Rate GoNuts Points System Treehouse Highlights TREE Tokens and Token Economics Overview of the Third Quarter of 2025 Roadmap Development Team, Investors and Partners Treehouse Founding Team Investment Fund Partner Summary As DeFi continues to expand, the demand for fixed income products is growing, and its role is similar to the role of bonds in traditional financial markets. However, building on blockchain

Ethereum (ETH) NFT sold nearly $160 million in seven days, and lenders launched unsecured crypto loans with World ID Ethereum (ETH) NFT sold nearly $160 million in seven days, and lenders launched unsecured crypto loans with World ID Jul 30, 2025 pm 10:06 PM

Table of Contents Crypto Market Panoramic Nugget Popular Token VINEVine (114.79%, Circular Market Value of US$144 million) ZORAZora (16.46%, Circular Market Value of US$290 million) NAVXNAVIProtocol (10.36%, Circular Market Value of US$35.7624 million) Alpha interprets the NFT sales on Ethereum chain in the past seven days, and CryptoPunks ranked first in the decentralized prover network Succinct launched the Succinct Foundation, which may be the token TGE

Solana and the founders of Base Coin start a debate: the content on Zora has 'basic value' Solana and the founders of Base Coin start a debate: the content on Zora has 'basic value' Jul 30, 2025 pm 09:24 PM

A verbal battle about the value of "creator tokens" swept across the crypto social circle. Base and Solana's two major public chain helmsmans had a rare head-on confrontation, and a fierce debate around ZORA and Pump.fun instantly ignited the discussion craze on CryptoTwitter. Where did this gunpowder-filled confrontation come from? Let's find out. Controversy broke out: The fuse of Sterling Crispin's attack on Zora was DelComplex researcher Sterling Crispin publicly bombarded Zora on social platforms. Zora is a social protocol on the Base chain, focusing on tokenizing user homepage and content

What is Zircuit (ZRC currency)? How to operate? ZRC project overview, token economy and prospect analysis What is Zircuit (ZRC currency)? How to operate? ZRC project overview, token economy and prospect analysis Jul 30, 2025 pm 09:15 PM

Directory What is Zircuit How to operate Zircuit Main features of Zircuit Hybrid architecture AI security EVM compatibility security Native bridge Zircuit points Zircuit staking What is Zircuit Token (ZRC) Zircuit (ZRC) Coin Price Prediction How to buy ZRC Coin? Conclusion In recent years, the niche market of the Layer2 blockchain platform that provides services to the Ethereum (ETH) Layer1 network has flourished, mainly due to network congestion, high handling fees and poor scalability. Many of these platforms use up-volume technology, multiple transaction batches processed off-chain

Why does Binance account registration fail? Causes and solutions Why does Binance account registration fail? Causes and solutions Jul 31, 2025 pm 07:09 PM

The failure to register a Binance account is mainly caused by regional IP blockade, network abnormalities, KYC authentication failure, account duplication, device compatibility issues and system maintenance. 1. Use unrestricted regional nodes to ensure network stability; 2. Submit clear and complete certificate information and match nationality; 3. Register with unbound email address; 4. Clean the browser cache or replace the device; 5. Avoid maintenance periods and pay attention to the official announcement; 6. After registration, you can immediately enable 2FA, address whitelist and anti-phishing code, which can complete registration within 10 minutes and improve security by more than 90%, and finally build a compliance and security closed loop.

See all articles