testsToRunConverted examples

When you create a job on Jenkins or Bamboo to run tests in your testing framework, the job must include the testsToRunConverted parameter. This page includes examples of how to use the testsToRunConverted parameter.

For details on setting up a job on Jenkins or Bamboo, see Trigger on-demand automated test runs.

In this topic:

Use testsToRunConverted on Jenkins

The following examples show how to use the testsToRunConverted parameter on Jenkins.

Jenkins with Maven Surefire

  • Windows batch build step: mvn clean -Dtest=%testsToRunConverted% test

  • Linux shell build step: mvn clean -Dtest=$testsToRunConverted test

  • WorkflowJob (Windows): bat 'mvn clean -Dtest=${params.testsToRunConverted} test'

  • WorkflowJob (Linux): sh 'mvn clean -Dtest=${params.testsToRunConverted} test'

Jenkins with Maven Failsafe

  • Windows batch build step: mvn clean -Dit.test=%testsToRunConverted% verify

  • Linux shell build step: mvn clean -Dit.test=$testsToRunConverted verify

  • WorkflowJob (Windows): bat 'mvn clean -Dit.test=${params.testsToRunConverted} verify'

  • WorkflowJob (Linux): sh 'mvn clean -Dit.test=${params.testsToRunConverted} verify'

Jenkins with Protractor

  • Windows batch build step: protractor conf.js --grep="%testsToRunConverted%"

  • Linux shell build step: protractor conf.js --grep="$testsToRunConverted"

  • WorkflowJob (Windows): bat(/protractor conf.js --grep="${params.testsToRunConverted}"/)

  • WorkflowJob (Linux): sh(/protractor conf.js --grep="${params.testsToRunConverted}"/)

Jenkins with Gradle

  • Windows batch build step: gradle test %testsToRunConverted%

  • Linux shell build step: gradle test $testsToRunConverted

  • WorkflowJob (Windows): bat 'gradle test ${params.testsToRunConverted}'

  • WorkflowJob (Linux): sh 'gradle test ${params.testsToRunConverted}'

Jenkins with Cucumber-JVM over Maven

  • mvn clean -Dcucumber.options=%testsToRunConverted% test

    Note: You can also automate BDD scenarios.

Jenkins with JBehave over Maven

  • Windows batch build step: mvn clean -Dfeatures="%testsToRunConverted%" test

  • Linux shell build step: mvn clean -Dfeatures="$testsToRunConverted" test

  • Pipeline: bat(/mvn clean -Dfeatures="${testsToRunConverted}" test/)

Back to top

Use testsToRunConverted on Bamboo

The following examples show how to use the testsToRunConverted parameter on Bamboo.

Bamboo with Maven Surefire

  • Windows batch build step: mvn clean -Dtest=%bamboo_testsToRunConverted% test

  • Linux shell build step: mvn clean -Dtest=$bamboo_testsToRunConverted test

Bamboo with Maven Failsafe

  • Windows batch build step: mvn clean -Dit.test=%bamboo_testsToRunConverted% verify

  • Linux shell build step: mvn clean -Dit.test=$bamboo_testsToRunConverted verify

Bamboo with Protractor

  • Windows batch build step: protractor conf.js --grep="%bamboo_testsToRunConverted%"

  • Linux shell build step: protractor conf.js --grep="$bamboo_testsToRunConverted"

Bamboo with Gradle

  • Windows batch build step: gradle test %bamboo_testsToRunConverted%

  • Linux shell build step: gradle test $bamboo_testsToRunConverted

Back to top