1 | Store source code in a source code repository
To allow the TeamCity building agent to pull the source code of the automation package, you need to store the package in a version control system such as Bitbucket, Git, CVS, Microsoft Team Foundation Server (TFS), Perforce Helix Core, and so on. This section uses Bitbucket as an example.
2 | Create a TeamCity project
- Restart the TeamCity VM.
- Access the console. (Depending on the settings, you can have a different URL.)
Create a new project.
Expand title Click to view image
3 | Add a Maven building agent to the TeamCity project
When prompted for Maven settings, install the Maven support plugin by selecting the checkbox for the Maven build step and clicking Use selected.
Expand title Click to view image Select the Maven build step and click Use selected.
In the Build Step: Maven panel, provide the following information:
Runner type: Maven
- Execute step: If all previous steps finished successfully
- Goals: clean test
- Path to POM file: pomx.xml
Additional Maven command line parameters:
Code Block -Dmaven.test.failure.ignore=true -Dreportium-job-name=”%env.TEAMCITY_PROJECT_NAME%” -Dreportium-job-number=%env.BUILD_NUMBER% -Dreportium-job-branch=”%myBranch%” -Dreportium-tags=”%myTag%”
Expand title Click to view image
4 | Run the TeamCity project manually at any time
When setup is done, run the build and check the CI Dashboard in the Test Analysis view of your Perfecto cloud. Sample URL: https://<your-cloud>.reporting.perfectomobile.com/dashboard-ci