Jump to Section
    Oct 24 2018

    How to integrate real-device testing into a TeamCity pipeline

    What is TeamCity?

    JetBrains TeamCity is a powerful and user-friendly Continuous Integration and Deployment server that works out of the box.

    TeamCity is another commercial CI/CD server, this time from the firm JetBrains. It is known for its incredibly simple setup and beautiful user interface. It has a robust set of features out of the box and a growing plugin ecosystem.

    Install and Configure TeamCity

    This guide provides basic information on TeamCity features and capabilities and includes instruction on the evaluation TeamCity setup.  Details on installation and more complex production configuration adjusted to your needs are available in the Installation Guide.

    Configuring TeamCity for a Javascript Project with Kobiton

    In this article, I will guide you on how to run the automation test with Kobiton through TeamCity, I will use the javascript sample from https://github.com/kobiton/samples.git. I know TeamCity can do a thousand stuff in CI/ CD world but in this blog, I just introduce the basic steps to integrate with Kobiton. Please see the details below:

    Create the Project

    • In the TeamCity dashboard, click Administration
    • Click Create Project
    • For Name, enter Kobiton TeamCity Integration
      This will populate the required field Project ID with KobitonTeamCityIntegration
    • Click Create
    • Click the VCS Roots tab
    • Click Create VCS root
    • For Fetch URL, enter https://github.com/kobiton/samples.git
    • For Default Branch, enter Master
    • Click Save

    Create the Build Configuration

    • Click the General tab
    • Click Create build configuration
    • Click From a repository URL
    • Select Project Name Kobiton - TeamCity Integration
    • Enter Repository URL https://github.com/kobiton/samples.git
    • Click PROCESS
    • Enter your Build configuration name
    • Click PROCESS
    • Click Add build step
    • In the Runner type menu, select Command Line
    • In the Run menu, select Custom script, then enter scripts as below:
    cd javascript
    npm install
    npm run android-web-test
    npm run android-app-test
    npm run ios-web-test
    npm run ios-app-test
    • Click Save

    Add Parameters

    • Click the Parameters tab
    • Click Add new parameter
    • Enter Name: KOBITON_USERNAME
      • Select Kind: Environment variable (env.)
      • Enter Value: your username
      • Click Save
    •  Enter Name: KOBITON_API_KEY
      • Select Kind: Environment variable (env.)
      • Enter Value: enter your apiKey
      • Click Save

    Execute the Tests

    • Got the TeamCity dashboard
    • Click Run


    • We can get the overview of Running build and the details on Build Log.