• bitcoinBitcoin(BTC)$85,945.001.05%
  • ethereumEthereum(ETH)$2,742.990.62%
  • tetherTether(USDT)$1.000.00%
  • binancecoinBNB(BNB)$786.45-0.54%
  • rippleXRP(XRP)$1.543.34%
  • usd-coinUSDC(USDC)$1.000.01%
  • solanaSolana(SOL)$117.300.50%
  • tronTRON(TRX)$0.3455930.46%
  • zcashZcash(ZEC)$1,532.09-0.89%
  • Figure HelocFigure Heloc(FIGR_HELOC)$1.010.00%
  • HyperliquidHyperliquid(HYPE)$95.46-0.06%
  • dogecoinDogecoin(DOGE)$0.0979924.80%
  • moneroMonero(XMR)$573.690.07%
  • whitebitWhiteBIT Coin(WBT)$86.430.26%
  • chainlinkChainlink(LINK)$12.93-1.05%
  • USDSUSDS(USDS)$1.000.00%
  • RainRain(RAIN)$0.013452-4.62%
  • cardanoCardano(ADA)$0.2455801.48%
  • leo-tokenLEO Token(LEO)$8.980.47%
  • stellarStellar(XLM)$0.209676-0.71%
  • nearNEAR Protocol(NEAR)$4.6110.72%
  • bitcoin-cashBitcoin Cash(BCH)$270.851.65%
  • uniswapUniswap(UNI)$8.73-1.83%
  • Ethena USDeEthena USDe(USDE)$1.00-0.02%
  • avalanche-2Avalanche(AVAX)$10.81-4.69%
  • CantonCanton(CC)$0.1182473.30%
  • litecoinLitecoin(LTC)$60.33-0.14%
  • daiDai(DAI)$1.000.00%
  • USD1USD1(USD1)$1.00-0.03%
  • suiSui(SUI)$1.01-0.92%
  • hedera-hashgraphHedera(HBAR)$0.0941404.68%
  • the-open-networkGram (prev. Toncoin)(GRAM)$1.42-0.25%
  • BittensorBittensor(TAO)$319.8212.46%
  • shiba-inuShiba Inu(SHIB)$0.0000063.70%
  • Global DollarGlobal Dollar(USDG)$1.000.01%
  • crypto-com-chainCronos(CRO)$0.0653242.80%
  • MemeCoreMemeCore(M)$1.32-12.76%
  • paypal-usdPayPal USD(PYUSD)$1.00-0.01%
  • tether-goldTether Gold(XAUT)$4,327.45-0.94%
  • okbOKB(OKB)$122.260.04%
  • Circle USYCCircle USYC(USYC)$1.140.01%
  • Ripple USDRipple USD(RLUSD)$1.000.01%
  • BitwayBitway(BTW)$0.86-1.03%
  • BlackRock USD Institutional Digital Liquidity FundBlackRock USD Institutional Digital Liquidity Fund(BUIDL)$1.000.00%
  • Ondo US Dollar YieldOndo US Dollar Yield(USDY)$1.150.01%
  • aaveAave(AAVE)$141.39-3.19%
  • mantleMantle(MNT)$0.663.71%
  • Pump.funPump.fun(PUMP)$0.0046134.52%
  • EthenaEthena(ENA)$0.209149-5.84%
  • OndoOndo(ONDO)$0.429021-5.75%
TradePoint.io
  • Main
  • AI & Technology
  • Stock Charts
  • Market & News
  • Business
  • Finance Tips
  • Trade Tube
  • Blog
  • Shop
No Result
View All Result
TradePoint.io
No Result
View All Result

TestART: Achieving 78.55% Pass Rate and 90.96% Coverage with a Co-Evolutionary Approach to LLM-Based Unit Test Generation and Repair

August 11, 2024
in AI & Technology
Reading Time: 5 mins read
A A
TestART: Achieving 78.55% Pass Rate and 90.96% Coverage with a Co-Evolutionary Approach to LLM-Based Unit Test Generation and Repair
ShareShareShareShareShare

Unit testing aims to identify and resolve bugs at the earliest stages by testing individual components or units of code. This process ensures software reliability and quality before the final product is delivered. Traditional methods of unit test generation, such as search-based, constraint-based, and random-based techniques, have been utilized to automate the creation of unit tests. These methods aim to maximize the coverage of software components, thereby minimizing the chances of undetected bugs. However, the manual creation and maintenance of unit tests are time-consuming and labor-intensive, necessitating the development of automated solutions.

The primary challenge in automated unit test generation lies in the limitations of existing methods. Large Language Models (LLMs), such as ChatGPT, have shown significant potential in generating unit tests. However, these models often fall short due to their inability to create valid test cases consistently. Common issues include compilation errors caused by insufficient context, runtime errors resulting from inadequate feedback mechanisms, and repetitive loops during self-repair attempts, which hinder the models from producing high-quality test cases. These limitations highlight the need for more robust and reliable methods to leverage LLMs’ strengths while addressing their inherent weaknesses.

Existing automated unit test generation tools, including those based on search-based software testing (SBST) and LLMs, offer various approaches to tackle these challenges. SBST tools like EvoSuite employ evolutionary algorithms to create test cases that aim to improve code coverage. However, the tests generated by these tools often differ significantly from human-written tests, making them difficult to read, understand, and modify. On the other hand, while more aligned with human-like reasoning, LLM-based methods still need help with issues such as invalid context handling and low pass rates. These existing methods need to be revised to ensure the development of a more effective solution.

Researchers from Nanjing University and Huawei Cloud Computing Technologies Co., Ltd. have introduced a novel approach called TestART. This method enhances LLM-based unit test generation through a co-evolutionary process integrating automated generation with iterative repair. TestART is designed to overcome the limitations of LLMs by incorporating template-based repair techniques and prompt injection mechanisms. These innovations guide the model’s subsequent generation processes, helping to avoid repetition and enhance the overall quality of the generated test cases.

TestART operates by first generating initial unit test cases using the ChatGPT-3.5 model. These initial test cases are then subjected to a rigorous repair process that addresses common issues such as compilation errors, runtime failures, and assertion errors. The repair process employs fixed templates tailored to correct the mistakes typically produced by LLM-generated tests. Once repaired, the test cases are recompiled and executed, with coverage information being extracted to provide feedback for further refinement. This iterative process continues until the test cases meet the desired quality standards, focusing on achieving higher coverage and accuracy.

The effectiveness of TestART has been demonstrated through extensive experiments conducted on the widely adopted Defects4J benchmark, which includes 8192 focal methods extracted from five Java projects. The results of these experiments show that TestART significantly outperforms existing methods, including EvoSuite and ChatUniTest. Specifically, TestART achieved a pass rate of 78.55% for the generated test cases, approximately 18% higher than the pass rates of both the ChatGPT-4.0 model and the ChatUniTest method based on ChatGPT-3.5. TestART achieved an impressive line coverage rate of 90.96% on the focal methods that passed the test, exceeding EvoSuite by 3.4%. These results underscore TestART’s superior ability to produce high-quality unit test cases by effectively harnessing the power of LLMs while addressing their inherent flaws.

In conclusion, TestART, by addressing the limitations of existing LLM-based methods, achieves higher pass rates and better coverage, making it a valuable tool for software developers seeking to ensure the reliability and quality of their code. The research conducted by the team from Nanjing University and Huawei Cloud Computing Technologies Co., Ltd. demonstrates the potential of combining LLMs with co-evolutionary repair processes to produce more effective and reliable unit tests. With a pass rate of 78.55% and a coverage rate of 90.96%, TestART sets a new standard for automated unit test generation.


Check out the Paper. All credit for this research goes to the researchers of this project. Also, don’t forget to follow us on Twitter and join our Telegram Channel and LinkedIn Group. If you like our work, you will love our newsletter..

Don’t Forget to join our 48k+ ML SubReddit

Find Upcoming AI Webinars here



Sana Hassan, a consulting intern at Marktechpost and dual-degree student at IIT Madras, is passionate about applying technology and AI to address real-world challenges. With a keen interest in solving practical problems, he brings a fresh perspective to the intersection of AI and real-life solutions.

YOU MAY ALSO LIKE

Peloton Has Made A Foldable (Treadmill)

OpenAI Faces Lawsuit From British Columbia Over Tumbler Ridge Shooting


Credit: Source link

ShareTweetSendSharePin

Related Posts

Peloton Has Made A Foldable (Treadmill)
AI & Technology

Peloton Has Made A Foldable (Treadmill)

September 22, 2026
OpenAI Faces Lawsuit From British Columbia Over Tumbler Ridge Shooting
AI & Technology

OpenAI Faces Lawsuit From British Columbia Over Tumbler Ridge Shooting

September 22, 2026
NVIDIA Introduces SoL-Pi: Auto-Research Loops That Cut Coding Agent Token Traffic by Up to 49%
AI & Technology

NVIDIA Introduces SoL-Pi: Auto-Research Loops That Cut Coding Agent Token Traffic by Up to 49%

September 22, 2026
SpaceXAI Releases Grok 4.7: A Larger Base Model at the Same / Price as Grok 4.6
AI & Technology

SpaceXAI Releases Grok 4.7: A Larger Base Model at the Same $2/$6 Price as Grok 4.6

September 22, 2026
Next Post
6-year-old battling heart condition gets dream job as police officer

6-year-old battling heart condition gets dream job as police officer

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Search

No Result
View All Result
Tech company discloses first-of-its-kind A.I. cyberattack against a government

Tech company discloses first-of-its-kind A.I. cyberattack against a government

September 15, 2026
Norway’s King Harald V dead at 89, son takes throne

Norway’s King Harald V dead at 89, son takes throne

September 22, 2026
Woman accused of photographing Lindsay Clancy jurors charged with witness intimidation

Woman accused of photographing Lindsay Clancy jurors charged with witness intimidation

September 19, 2026

About

Learn more

Our Services

Legal

Privacy Policy

Terms of Use

Bloggers

Learn more

Article Links

Contact

Advertise

Ask us anything

©2020- TradePoint.io - All rights reserved!

Tradepoint.io, being just a publishing and technology platform, is not a registered broker-dealer or investment adviser. So we do not provide investment advice. Rather, brokerage services are provided to clients of Tradepoint.io by independent SEC-registered broker-dealers and members of FINRA/SIPC. Every form of investing carries some risk and past performance is not a guarantee of future results. “Tradepoint.io“, “Instant Investing” and “My Trading Tools” are registered trademarks of Apperbuild, LLC.

This website is operated by Apperbuild, LLC. We have no link to any brokerage firm and we do not provide investment advice. Every information and resource we provide is solely for the education of our readers. © 2020 Apperbuild, LLC. All rights reserved.

No Result
View All Result
  • Main
  • AI & Technology
  • Stock Charts
  • Market & News
  • Business
  • Finance Tips
  • Trade Tube
  • Blog
  • Shop

© 2023 - TradePoint.io - All Rights Reserved!