AI
New technique uses business semantics to catch logic bugs that code-focused testing misses
Researchers developed SeGa, a method that extracts business intent from requirement documents to guide AI test generation and uncover hidden logic errors in enterprise software.
Business logic bugs—flaws that violate what the software is supposed to accomplish—are a persistent challenge in enterprise systems, but traditional testing approaches struggle to expose them because they focus on code structure rather than intended behavior.
The SeGa Approach#
A team of researchers has introduced SeGa, a semantics-driven unit test generation technique designed to surface these hard-to-find bugs. The method works by first extracting business knowledge from product requirement documents and organizing that knowledge into "functionality entries"—groupings of related requirements that share a common business goal. When examining a specific function, SeGa retrieves the relevant business requirements and constructs detailed scenarios with clear preconditions, triggering actions, expected outcomes, and semantic constraints. This information then guides an AI language model to generate targeted unit tests.
Results from Real-World Testing#
The approach was tested on four industrial Go projects containing 60 confirmed business logic bugs. SeGa identified 22 to 25 more bugs than four leading AI-based testing techniques currently in use, while also delivering higher accuracy—improving precision by roughly 27–34% compared to existing methods. In a further validation across six production repositories, the technique uncovered 16 previously unknown bugs that developers later confirmed and patched.
Why It Matters#
By bridging the gap between business intent and code-level testing, this work demonstrates that understanding what software should do—not just how it's structured—can be crucial for catching subtle errors that slip through conventional automated testing.

