Authentication parameters on Allure TestOps and TeamCity
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.
There are 2 authentications we need to configure:
- Authenticate TeamCity CI, so it will be able to send test results from build jobs to Allure TestOps server.
- 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_USERauthority assigned in settings (Administration > Users). We strongly advise to not use
ROLE_ADMINfor 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.
- Open project configuration page Project => Edit Project Settings
- Navigate to Allure Servers section of the configuration page
- Press Add new server button and provide server location alongside with the token.
- 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.
- 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.
… or two!
- Create credentials on TeamCity side.
- Provide TeamCity CI server credentials to Allure TestOps.
- Add build server in Allure TestOps configuration.
Create the credentials for a dedicated user or use your current credentials
- In TeamCity jump to Administration in upper-right corner of the UI.
- Jump to User management users.
- Add a new user for Allure TestOps server.
Provide TeamCity CI server credentials to Allure TestOps
- Jump to Administration => Credentials
- Click + Create.
- Fill the form as per image below.
- Make sure you are using basic type for the credentials.
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.
Add distinguishable label for the build server.
Add TeamCity’s URL to the Ednpoint field.
From the drop-down list pick teamcity type of the build server.
Pick the credentials you’ve created for TesmCity.
Test the connection by clicking the Test connection button and submit the data.
If everything is working just fine, click *Submit and proceed to the further integrations steps.
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.