3 minutes read

POSTED Oct, 2021 dot IN Testing

Test Monitoring for TeamCity

Ismail Egilmez

Written by Ismail Egilmez


Business Development Manager @Thundra

linkedin-share
 X

Debug your tests in your TeamCity CI/CD pipelines with Thundra Foresight

Thundra Foresight is designed for developers to monitor their builds and debug their tests in continuous integration pipelines.

It helps developers, testers, QA engineers, and more to debug and troubleshoot test failures and latencies in CI/CD pipelines. With Foresight’s unique tracing engine, it is possible to understand the root cause of a test failure in a distributed microservice application.

It is annoying to notice that your build durations are gradually increasing and you don’t have the handy equipment to interfere.

End-to-end tests that cover from frontend to backend or integration tests that cover a lot of external services than your application definitely require some new approach to solve flakiness, error, and latency issues.

With the release of Foresight’s new TeamCity integration, the Foresight agent will be added to your TeamCity pipeline very easily.

We built a “plugin” to make TeamCity users’ lives easier when integrating Foresight to unlock granular detailed analytics on their tests (unit, integration, e2e, etc.).

Before starting, you must have a Foresight account and create a project. Please sign up for Thundra Foresight and create a project.

Signing up for Thundra

Thundra has three products and you can use all of them with one Thundra account. You can sign up for your Thundra account using SSO with your Google or GitHub accounts.

Once you sign up, please don’t forget to select Foresight amongst the products listed.

Create a project

  1. Create your project by clicking the + Create Project button.
  2. Give a unique name to your project.
  3. Open your project settings page and take your Thundra API Key and Thundra Project ID.

Quick Reminder: What is Foresight’s benefit?

You don’t have to integrate your project with Foresight to see what it offers!


Some open-source projects are integrated with Foresight and their tests are run in Thundra’s test environments to showcase the granular test analytics.

Foresight gives insights with performance graphs, logs, metrics, traces of every single test in your test suites at every test run of your CI/CD builds.

How does the integration works

Foresight's TeamCity plugin helps you to instrument Thundra's agent automatically, so that you ease the burden of manual effort for recording your test runs.

You can integrate your TeamCity pipeline in just 2 steps.

  1. First, you need to install the plugin.
  2. Then, configure your TeamCity Project or Build configuration.

After completing those steps, Foresight will capture your test runs automatically.

Foresight supports Maven and Gradle but we will be supporting more build tools soon.

Let’s explain a bit more;

Step1: Install Foresight Plugin from TeamCity

On your TeamCity dashboard, just click on the Plugins and click Browse plugins repository.

You can see Foresight TeamCity Plugin on the JetBrains Marketplace.

Step2: Configuration

Open your Thundra Foresight dashboard and get your Thundra API Key and Thundra Project ID from your project->settings page.

You can add the parameters to your TeamCity pipeline in two ways:

  1. Using TeamCity Project settings
    1. Navigate through your TeamCity project settings (it is on the top right of your project page)
    2. After navigating your project settings
  2. Using Build Configuration settings
    1. Navigate through your TeamCity Build Configuration.

For both of the options, you need to add the below parameters into the desired settings

  1. Click on Parameters
  2. Click on Add New Parameter
  3. Add Environment Variables (Recommended) and set the THUNDRA_APIKEY and THUNDRA_AGENT_TEST_PROJECT_ID
  4. And be cautious if you have a Gradle project. You need to make sure that you add the:THUNDRA_GRADLE_PLUGIN_VERSION

You can refer to the integration documentation anytime you wish or contact the Thundra team when you have a question via support@thundra.io.

Done!

Now you can monitor and debug your tests with Foresight!

With the TeamCity integration, you will be able to easily integrate Foresight into any of your TeamCity pipelines and start seeing the analytics at the first run of your tests.

Below are some key benefits that TeamCity customers can expect from Thundra Foresight integration.

Test Run Status Summary

TeamCity users can have a piece of overview information about their passed, failed, skipped, or aborted tests and the total execution time of the test runs.

- Contextualized Information For Every Single Test

Logs, metrics, traces, and performance charts give immediate context about the failure root cause.

- Distributed Traces for Microservices

You can understand the behavior of your distributed microservices applications at a test failure with the help of aggregated traces, metrics, and logs.

- Time Travel Debugging

You can travel back in time to previous states of your application when testing by getting a snapshot of when each line of code is executed.

Thundra Foresight is designed to help developers, testers, QA engineers, and more debug the erroneous, flaky, and high latency tests which block their continuous integration pipelines to deliver code in a continuous manner.

Visit our extended documentation and signup for Thundra now,, and try Foresight’s TeamCity plugin for free!