TeamCity Automated Testing
TeamCity is a Java-based build management/CI system created by Jetbrains.
TeamCity Plugin
We've created a plugin which offers integration with our TestingBot.com services.
Below is a list of features this plugin offers:
- Add a tab where we show the lists of tests for the current build. The overview shows a list of tests with their passed/failed state, together with the browser they ran on.
- View logs (Selenium, Chrome, Firefox, Safari logs) and a recorded video together with screenshots of every test, straight from inside TeamCity.
- Option to start/stop a TestingBot Tunnel automatically before and after every build run.
- Predefined environment variables with your TestingBot
keyandsecret. - Each build is tagged with the TestingBot session IDs it ran, so you can find a build back by session.
- Your TestingBot secret is registered with TeamCity's password replacer, so it is masked in the build log even if a build step prints it.
The plugin requires TeamCity 2024.12 or newer, and Java 11 or newer on the build agent.
1. Install the Plugin
Go to Administration and click Plugins, under Server Administration.
2. Upload Plugin
Click Upload plugin zip and upload our TestingBot plugin.
Or download the plugin from the TeamCity plugin page, or from the releases page on GitHub.
3. Restart TeamCity
Restart TeamCity to load the plugin. Once TeamCity is back up, the TestingBot plugin appears under External plugins on the same page.
4. Configuring a Project
Now that the plugin is installed, we can use the TestingBot plugin in a TeamCity project.
- Click on Build Features
- Click Add build feature and select TestingBot from the list.
5. Credentials
Add your TestingBot Key and Secret, which you can obtain from the member dashboard. Both are required and TeamCity will not let you save the build feature while either is empty.
Tick Enable TestingBot Tunnel if your tests need to reach a website that is not available on the public internet. The plugin starts a TestingBot Tunnel before the first build step, waits until it is ready, streams its output into the build log, and shuts it down when the build finishes.
6. Test Overview in TestingBot Tab
You can now see an overview of your Selenium tests in the TestingBot tab.
7. Test Details
Click a test to see a video recording, screenshots and logs for the test.
8. Configuring Tests
The plugin will automatically set the following Environment Variables, which you can use in your tests:
-
TB_KEY: Your TestingBot key, available in our member area. -
TB_SECRET: Your TestingBot secret, available in our member area. TeamCity masks this value in the build log. -
BUILD_ID: An identifier for the current build, combining the build configuration ID and the build number. Set this as thebuildcapability in your tests to group them together on TestingBot.
Important!
It is important to output TestingBotSessionID={webdriver-session-id} for every test to stdout.
The plugin will parse the output looking for these ids. An example on how to do this with Java:
System.out.println("TestingBotSessionID=" + (((RemoteWebDriver) driver).getSessionId()).toString());