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

We merged the source-code for all our SDKs into the Touca monorepo, added Python CLI support for multiple configuration files, and made 6 more fixes and usability improvements.

Apr 30, 2022

Software engineers are stereotyped as socially awkward introverts obsessed with writing code. This false perception has hurt our industry, resulting in so much gatekeeping against age, gender, and career background. This article explores why this stereotype exists and why we should break it.

Apr 11, 2022

We improved our self-hosted offering by adding a post-install configuration wizard, making telemetry opt-in, and changing the default role of team members to admin.

Apr 9, 2022

We wrote a script that helps you setup a self-hosted instance using a single command, added a new settings tab to help you review and manage your active user sessions, and significantly improved the infrastructure of our cloud-managed instance.

Apr 2, 2022

Build Better Software, Faster.

Spend less time finding and fixing regressions.