iconLogo
Published:2025/12/3 19:45:02

JSONATG: Java JSON ライブラリを爆速(ばくそく)テスト!🚀

  1. 超要約: Java JSON ライブラリのテストを、AI(エーアイ)が自動でやってくれるスゴ技だよ!✨

  2. ギャル的キラキラポイント✨

    • ● LLM(大規模言語モデル)を使って、テストケースを賢く生成するんだって!🧠
    • ● Java JSON ライブラリに特化(とっか)してるから、ピンポイントでバグを見つけられる!🔍
    • ● マルチエージェント(色んな役割のエージェント)が協力(きょうりょく)して、高品質なテストを作るよ!👯‍♀️
  3. 詳細解説

    • 背景: Java の JSON ライブラリは、Web サービスとかアプリで超重要(ちょうじゅうよう)!でも、テストが大変(たいへん)だし、バグがあるとヤバい💦
    • 方法: LLM を使って、JSON ライブラリのテストを自動で作っちゃうシステム、それが JSONATG!JSON データとか、Java オブジェクト(もの)の関係(かんけい)をちゃんと理解(りかい)してるから、スゴイテストができる!
    • 結果: 既存(きぞん)の方法より、もっとたくさんのコードをテストできるし、バグも見つけやすいんだって!😎
    • 意義(ここがヤバい♡ポイント): JSONATG を使うと、アプリの品質(ひんしつ)がめっちゃ上がるし、開発(かいはつ)も楽になる!企業(きぎょう)も、もっと儲かるかもね!💰
  4. リアルでの使いみちアイデア💡

    • Web サービス開発(かいはつ)で、JSON データのやり取りのテストに使えるね!
    • スマホアプリ開発(かいはつ)で、API(アプリと繋(つな)がる部分)との連携(れんけい)テストに使えるよ!

続きは「らくらく論文」アプリで

Multi-agent Assisted Automatic Test Generation for Java JSON Libraries

Sinan Wang / Zhiyuan Zhong / Shaojin Wen / Yepang Liu

JSON is a widely used format for data exchange between applications. In the Java ecosystem, JSON libraries serve as fundamental toolkits for processing JSON data, powering real-world applications such as web services, Android apps, or data management systems. However, without effective quality assurance methods such as automatic test generation (ATG), developers risk introducing subtle data inconsistency bugs, compatibility issues, and even security vulnerabilities. These flaws can affect billions of end users and potentially cause severe financial losses. Recently, large language models (LLMs) have shown strong potential in enhancing ATG. However, existing LLM-based methods like TitanFuzz and YanHui lack specialization in the JSON domain. For Java JSON libraries (JJLs), effective test cases should capture the constraints between formatted data and application programs, leaving critical aspects of quality assurance unaddressed. To fill this gap, we propose JsonATG, a multi-agent ATG system that generates diverse bug-triggering tests for JJLs. With historical bug information as seeds, JsonATG introduces a code summarization agent and a test validation agent into the generation pipeline to produce new and valid test cases. It applies agent-generated program mutation rules tailored specifically for the structural and semantic characteristics of JJLs, such as data streaming operations, serialization formats, and data-binding patterns. The generated tests are further refined through post-processing to ensure syntactic and semantic correctness. Our experiments show that JsonATG achieves higher coverage than two state-of-the-art LLM-based test generation methods on the widely used JSON library. With a \$25 budget, we reported 59 bugs (including non-crashing functional bugs) in fastjson, of which 47 were confirmed and 28 have already been fixed.

cs / cs.SE