• bitcoinBitcoin(BTC)$80,469.002.66%
  • ethereumEthereum(ETH)$2,418.874.09%
  • tetherTether(USDT)$1.000.07%
  • binancecoinBNB(BNB)$714.581.77%
  • rippleXRP(XRP)$1.323.13%
  • usd-coinUSDC(USDC)$1.000.04%
  • solanaSolana(SOL)$96.533.51%
  • tronTRON(TRX)$0.318339-1.12%
  • Figure HelocFigure Heloc(FIGR_HELOC)$1.051.51%
  • zcashZcash(ZEC)$1,316.802.12%
  • HyperliquidHyperliquid(HYPE)$83.79-3.42%
  • dogecoinDogecoin(DOGE)$0.0769752.34%
  • moneroMonero(XMR)$635.04-1.20%
  • USDSUSDS(USDS)$1.000.05%
  • whitebitWhiteBIT Coin(WBT)$77.793.07%
  • chainlinkChainlink(LINK)$11.613.83%
  • leo-tokenLEO Token(LEO)$9.350.42%
  • cardanoCardano(ADA)$0.1989213.71%
  • stellarStellar(XLM)$0.1675112.17%
  • bitcoin-cashBitcoin Cash(BCH)$289.154.55%
  • nearNEAR Protocol(NEAR)$4.03-0.61%
  • uniswapUniswap(UNI)$7.642.37%
  • daiDai(DAI)$1.000.02%
  • Ethena USDeEthena USDe(USDE)$1.000.08%
  • RainRain(RAIN)$0.006159-1.05%
  • litecoinLitecoin(LTC)$56.202.88%
  • CantonCanton(CC)$0.1025913.16%
  • avalanche-2Avalanche(AVAX)$8.781.19%
  • suiSui(SUI)$0.931.45%
  • USD1USD1(USD1)$1.000.03%
  • tether-goldTether Gold(XAUT)$4,106.312.14%
  • the-open-networkGram (prev. Toncoin)(GRAM)$1.16-1.21%
  • hedera-hashgraphHedera(HBAR)$0.0731843.31%
  • quant-networkQuant(QNT)$205.365.65%
  • Global DollarGlobal Dollar(USDG)$1.000.04%
  • shiba-inuShiba Inu(SHIB)$0.0000051.31%
  • BittensorBittensor(TAO)$236.442.66%
  • paypal-usdPayPal USD(PYUSD)$1.000.05%
  • crypto-com-chainCronos(CRO)$0.0524312.21%
  • Ripple USDRipple USD(RLUSD)$1.000.03%
  • EthenaEthena(ENA)$0.1814700.30%
  • Ondo US Dollar YieldOndo US Dollar Yield(USDY)$1.150.13%
  • okbOKB(OKB)$111.252.01%
  • Circle USYCCircle USYC(USYC)$1.140.01%
  • pepePepe(PEPE)$0.000005-1.90%
  • aaveAave(AAVE)$133.371.52%
  • OndoOndo(ONDO)$0.4106751.71%
  • Pump.funPump.fun(PUMP)$0.004328-2.38%
  • MemeCoreMemeCore(M)$0.83-1.65%
  • BlackRock USD Institutional Digital Liquidity FundBlackRock USD Institutional Digital Liquidity Fund(BUIDL)$1.000.00%
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

OpenAI’s Enterprise Sales Take Majority as Brockman Sees IPO Readiness – Unite.AI

Cat Wu to Lead Product Management for OpenAI’s Core Products – Unite.AI


Credit: Source link

ShareTweetSendSharePin

Related Posts

OpenAI’s Enterprise Sales Take Majority as Brockman Sees IPO Readiness – Unite.AI
AI & Technology

OpenAI’s Enterprise Sales Take Majority as Brockman Sees IPO Readiness – Unite.AI

November 5, 2026
Cat Wu to Lead Product Management for OpenAI’s Core Products – Unite.AI
AI & Technology

Cat Wu to Lead Product Management for OpenAI’s Core Products – Unite.AI

November 5, 2026
Amodei Wins Dismissal of Direct Copyright Claim with Leave to Amend – Unite.AI
AI & Technology

Amodei Wins Dismissal of Direct Copyright Claim with Leave to Amend – Unite.AI

November 5, 2026
Snap Has More Than 30 Million Paid Subscribers Across Snapchat+ And Other Plans
AI & Technology

Snap Has More Than 30 Million Paid Subscribers Across Snapchat+ And Other Plans

November 4, 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
NBC Nightly News with Tom Llamas Full Episode – Oct. 5

NBC Nightly News with Tom Llamas Full Episode – Oct. 5

October 31, 2026
Amazon earnings live: Q3 earnings miss sends stock lower – Yahoo Finance

Amazon earnings live: Q3 earnings miss sends stock lower – Yahoo Finance

October 29, 2026
So… this was supposed to save the planet?

So… this was supposed to save the planet?

October 31, 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!