Sample code using Touca SDK for Java to check an `isPrime` function for regression.
Product Update

Touca SDK for Java is here

We are excited to announce the release of our Touca SDK for Java today under the permissive Apache-2.0 license.

Pejman Ghorbanzade
Pejman Ghorbanzade
Sep 24, 2021
3 Min

We are excited to announce the release of our Touca SDK for Java today. This library is distributed as open-source under the permissive Apache-2.0 license. It supports Java 8 and newer and is publicly available on Maven Central.

GitHub - trytouca/touca-java: Touca SDK for Java
Touca SDK for Java. Contribute to trytouca/touca-java development by creating an account on GitHub.

As we release the first version of our Java SDK today, we'd like to take a moment and explain how Touca works and how it can help you continuously test your software workflows for regression.


On average, it takes 23 days for software engineers to gain confidence that their code change works as they expect. This long feedback cycle significantly hinders developer productivity and makes the overall software development process expensive and inefficient.

Touca helps software engineers see the true impact of their code changes on the behavior and performance of their software, as they write code.

We provide near real-time feedback to developers when they write code that could break their software. This way, we significantly boost their confidence in the code they write, increasing their productivity, and helping their teams ship better software, faster.


In unit testing, we run our unit of code with a list of inputs. For each input, we specify the expected output as part of our test logic. We may need to revise our test logic when our software requirements evolve or when we find other interesting inputs that we should handle.

Sample code for testing an isPrime function using JUnit5

Unit testing is very effective. But writing and maintaining unit tests for some real-world software workflows can be difficult. Consider a video compression algorithm:

  1. Describing the expected output for a given video file would be difficult.
  2. Accurately reflecting changes to our algorithm in our expected values would be time-consuming.
  3. We would need a large number of input video files to gain confidence that our algorithm works correctly. Maintaining unit tests for each case would be expensive.

Touca is a developer-focused testing solution that help you see the true impact of any code change on the overall behavior and performance of your software, as you write code. Unlike unit testing, a typical Touca test doesn't list the inputs to our code under test. And it doesn't require specifying the expected values for each test case.

Sample code for testing an isPrime function using Touca

Touca SDKs allow you to capture values of interesting variables and runtime of important functions, from anywhere within your code. The SDKs submit this data to a remote Touca server where they are stored and automatically compared against the previously submitted results for a trusted version of your code.

Sample code for capturing values of variables and runtime of functions

Touca server, self-hosted or cloud-hosted, visualizes differences in behavior and performance and reports them to you and your team so you can decide if those differences are acceptable or symptoms of an unintended side-effect.

Screenshot of the Touca server
Touca remotely compares the behavior and performance of your workflow against a previous trusted version

Since the Touca server stores your data, it knows the list of your test cases and can provide insights about each. Touca tests can query this list during initialization and run your test workflow once for each test case.


Thank you to our early adopters for their trust and valuable feedback.

Other Articles

Touca is one of the ten companies accepted into Techstars Iowa Accelerator class of 2022, a 12-week mentorship-driven accelerator program based in Des Moines, IA.

Jul 17, 2022

Data teams frequently make changes to their models to adjust and improve their effectiveness in meeting business needs. This article showcases how Touca helps identify and evaluate the true impact of these changes.

Jul 1, 2022

We open-sourced Touca under the Apache-2.0 license. But there are still a few steps for Touca to become an open-source software company. In this post, we outline our plans for this transition.

Jun 21, 2022

Touca provides feedback to engineers, when they write code that could break their software. Today, we are announcing that we are open sourcing our technology under the permissive Apache-2.0 license.

May 16, 2022

Build Better Software, Faster.

Spend less time finding and fixing regressions.