Configuring authentication

Authentication parameters on Allure TestOps and TeamCity

The task

We need TeamCity to be able to send test results to Allure TestOps server, and we need Allure Server to be able to start build jobs on TeamCity side.

Two steps

There are 2 authentications we need to configure:

  1. Authenticate TeamCity CI, so it will be able to send test results from build jobs to Allure TestOps server.
  2. Authenticate Allure TestOps to start build jobs on TeamCity side.

At the moment, for both cases it is advised to have dedicated account on both sides.

Create a user on Allure side and call it something like teamcity-agent. This user should have only ROLE_USER authority assigned in settings (Administration > Users). We strongly advise to not use ROLE_ADMIN for the integrations as it could lead to undesired consequences in case of human errors.

Create a user on TeamCity side and call it something like allure-server.

Authenticate TeamCity in Allure TestOps

Generate secret token on Allure TestOps side

This authentication token will be used by TeamCity to authenticate in Allure TestOps server.

Here, you will find the description on how to generate Allure TestOps secret token.

Follow the steps and get back to this page.

Add your Allure server instance information to TeamCity’ configuration.

  1. Open project configuration page Project => Edit Project Settings
  2. Navigate to Allure Servers section of the configuration page

Allure Server List

  1. Press Add new server button and provide server location alongside with the token. Allure Server Add

Where…

  • Name is the name you assign to Allure TestOps server.
  • URL is the URL of your Allure TestOps instance.
  • Token is the token generated in Allure TestOps on the previous step.
  1. Save server details

That’s it. Now, you can configure your build jobs to send test results to Allure TestOps server.

But before you jump to build jobs, let’s configure the authentication for Allure TestOps server to start build jobs on TeamCity!

Authenticate Allure TestOps to start build jobs on TeamCity side

The aim of this step is to authenticate Allure TestOps on TeamCity side, so Allure TestOps will be able to start build jobs on CI side.

Three steps

… or two!

  1. Create credentials on TeamCity side.
  2. Provide TeamCity CI server credentials to Allure TestOps.
  3. Add build server in Allure TestOps configuration.

Create the credentials for a dedicated user or use your current credentials

  1. In TeamCity jump to Administration in upper-right corner of the UI.
  2. Jump to User management users.
  3. Add a new user for Allure TestOps server.

Provide TeamCity CI server credentials to Allure TestOps

  1. Jump to Administration => Credentials
  2. Click + Create.
  3. Fill the form as per image below.
    • Make sure you are using basic type for the credentials.

Allure TestOps add credential

Create the build server for TeamCity system

In the Administration area of Allure TestOps jump to Build server section and create new build server for your TeamCity instance.

  1. Add distinguishable label for the build server.

  2. Add TeamCity’s URL to the Ednpoint field.

  3. From the drop-down list pick teamcity type of the build server.

  4. Pick the credentials you’ve created for TesmCity.

  5. Test the connection by clicking the Test connection button and submit the data.

  6. If everything is working just fine, click *Submit and proceed to the further integrations steps.

    Allure TestOps add jenkins build server

That’s it!

Summary

These two steps you’ve just made will allow you to send test results from TeamCity to Allure and will allow Allure TestOps to start build jobs on TeamCity build server.

Back to TeamCity integrations