Product Update

Touca SDK for JavaScript is here

We are excited to announce the open-source release of our Touca SDK for Node.js today, under the permissive Apache-2.0 license.

Pejman Ghorbanzade
Pejman Ghorbanzade
Aug 13, 2021
3 Min

We are excited to announce the release of our Touca SDK for JavaScript today. This library is distributed as open-source under the permissive Apache-2.0 license.

Touca is a developer tools startup helping engineering teams see the true impact of their code changes on the behavior and performance of their software, as they write code.

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

Touca provides real-time feedback to software engineers about the side effects of their code changes as they are writing them.

The release of our JavaScript SDK is a step towards our goal, making our technology accessible to more teams. We'd like to take a moment to explain how Touca works and how you can use our new SDK today to continuously test your most complex software workflows.

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 is_prime function using Jest

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.

Sample code for testing an is_prime function using Touca

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.

Touca SDKs allow you to capture values of interesting variables and runtime of important functions. 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.

A Screenshot of the Touca server

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. This means:

  • No more wasting time managing snapshot files
  • No more building one-off tools for comparing them
  • No more checking of snapshot files in version control
  • No more relying on the output of your code So you can focus more on thinking and decision making.

We want to seamlessly integrate our technology with developer workflows to significantly boost confidence of developers in the code they write, increase their productivity, and help their teams ship better software, faster. You can help us reach these goals. Here are a few ways:

  • Speak with us: Share your ideas and daily workflows. See early prototypes of our future technology. Tell us what you think.
  • Spread the word: Share Touca with your network or show it to one of your colleagues.
  • Help us grow: Become an early user and try Touca for free. On average, we have shipped more than 20 fixes and improvements every month thanks to the valuable feedback from our early users.
  • Give us a star: Consider giving our repositories a star on GitHub to help us introduce our technology to more software engineers.

Thank you to our early adopters and all software engineers who took the time to speak with us, and share about their development workflows. This SDK is a direct result of their 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.