TNG AI UnitTestGen
Automated Unit Test Generation for Java, Kotlin, C#, and TypeScript
Our TNG AI UnitTestGen tool is designed to automatically generate unit tests for projects written in Java, Kotlin, C#, and TypeScript. It leverages Large Language Models (LLMs) to create tests based on the logic of your source code, ensuring that any changes to the codebase do not unintentionally alter its functionality.
How it works
Our approach utilizes feedback loops from test compilation and execution to guarantee that the generated tests are functional. This process is independent, i.e. it does not require manual intervention from a software developer to guide the test generation. All code execution is confined to an isolated Docker environment, minimizing potential risks associated with executing LLM-generated code. Our tool automatically retrieves context for the tested code to ensure that the LLM receives the required information about the repository.
Our tool works with Java (supporting Maven and Gradle), Kotlin (supporting Gradle), C# (supporting .NET versions 6 and higher), and TypeScript (supporting the package managers npm and pnpm, and the testing frameworks Vitest and Jest).
Key benefits
UnitTestGen is superior for generating tests compared to other LLM-based approaches, for the following reasons:
Independence from developer oversight: Enables efficient and autonomous unit test generation without manual user intervention.
Quality assurance: We evaluate the quality of generated tests not just by code coverage, but also through mutation testing (where applicable).
Security and isolation: By executing generated code in a Docker environment, we ensure a safe and efficient test generation process that requires review only for the final version of the test.
Efficiency: Our tests have shown that our tool achieves similar results as other approaches but in significantly less time (30-50% of the runtime) and with fewer input tokens (<50%).
Detection of insufficient coverage: An optional initial analysis step provides suggestions which features require additional tests.
TNG AI UnitTestGen is designed to support developers in creating robust and reliable software by automating a crucial part of the development process, allowing for more time to focus on other aspects of project development.
Code mutation coverage
It's important to note that high code coverage does not always equate to high test quality. For instance, tests without assertions may cover a lot of code but fail to actually verify its functionality. Our tool uses mutation testing to assess true test effectiveness regarding the user's source code logic. By modifying the source code, mutation testing ensures that tests are comprehensive.

Interested?
To help you get started with TNG AI UnitTestGen, TNG offers guided access to the tool along with comprehensive support for its integration. Consulting services from our expert team can also be provided to ensure a smooth transition. We can also assist you in choosing the right LLM backend. We offer a personalized demonstration of UnitTestGen tailored to your specific use case.
Contact us via info@tngtech.com or use one of the other contact options to learn more about our tool.