Blogroll How-To's

Getting Started with TeamCity TestDrive

⚠️ Update from October 12, 2020: TeamCity TestDrive has been deprecated.

If you are looking for a simple way to try TeamCity without downloading and installing it on a server, please consider giving a try to TeamCity Cloud.
TeamCity Cloud is a fully-managed CI/CD solution that automatically runs your builds and tests in the cloud, and lets your team deliver quality software faster, at scale. It is free during Beta.

Continue to TeamCity Cloud


TeamCity is mostly known as an on-premises CI server. But if you want to get a taste of TeamCity, you don’t really need to install it on your servers. Enter TestDrive!

TestDrive is a limited cloud TeamCity offering. It is a way to try TeamCity for 60 days, without the need to download and install it. TestDrive is currently hosted on top of the teamcity.jetbrains.com server and lets you create one TeamCity project.

This blog post is a getting started guide on how to set up a project in TestDrive.

Logging in

On the TeamCity download page, select the TestDrive tab and click “Test Drive in Cloud” button.

01-testdrive-get-teamcity

You will proceed to the login screen of the hosted TeamCity instance. It is possible to register a JetBrains account or log in with any other account that is supported in TestDrive: Google, GitHub, Yahoo!, or Atlassian BitBucket. For instance, if the repository that you are planning to work with is located at GitHub, then it makes sense to log in with a GitHub account.

Creating a project

After the login, the setup wizard will offer a number of options to configure your project. Say, we logged in using a GitHub account. Now the connection with GitHub is created and TeamCity can list all the repositories available on the account. We can just select the repository, and TeamCity will create the project and an initial build configuration.

03-testdrive-new-project-from-github
04-testdrive-new-build-configuration

In this example, we have selected to build a fork of the Go Buffalo framework. In one of the previous blog posts, we already described how to build Go projects with TeamCity. Let’s use that knowledge in this new context.

TeamCity will scan the repository and detect the possible build steps. The steps are backed by the build runners. If TeamCity locates any relevant files that are related to the runner, it will offer to configure a corresponding build step. Such file examples include IDE project files, Dockerfile, pom.xml, gradle.build, shell scripts, etc.

05-testdrive-build-steps

For Buffalo, we only need a Command Line build step to execute the go command.

To make sure that the build runs with the correct version of Go, it makes sense to execute the build step in a Docker container. In the build step configuration, we can specify which image should be used. In this case it’s golang:1.12.

06-testdrive-command-line-build-step

Don’t forget to configure the Golang build feature:

07-testdrive-golang-build-feature

The build is ready to start. We can either start it manually or configure a build trigger to react to the new changes in the repository.

Running the build

To run the build, click the Run… button on the top-right of the screen. The build job will be placed in a queue. While it is waiting, we can see which agents are available to execute the build.

09-testdrive-in-build-queue
10-testdrive-running-build

Once a build agent becomes available, the build will start and its status will be updated in real time while it is running. I there are any test failures, the status will indicate the failure long before the build finishes. You can monitor the build progress on the Build Log tab:

11-testdrive-build-logs-2

Once the execution has finished, we can see the test results and analyze any failures. In our example, a few tests have failed and we can check what the reason was, assign an investigation, or even mute the failures.

12-testdrive-build-results
13-testdrive-build-results-test-failure

Invite friends to collaborate

Once we have configured the project in TestDrive, it is listed under the account that we used for sign in. We can invite more people to work on that project. To do this, go to the Invitations tab in project settings and create an invitation link.

The invitation includes the correct role that will be assigned to the collaborator when they join the project by using the generated link. In this way, we can create multiple invitations for different roles.

14-testdrive-invite-collaborator
14-testdrive-invite-collaborator-url

Screen Shot 2017-10-25 at 13.22.35

image description