-1

i have next stage in my jenkins pipeline.

stage('Test') {
        steps {
           bat "${KATALON} -noSplash -runMode=console -retry=0 -projectPath=${PRJ} -testSuitePath="Test Suites/IPM - REF" -executionProfile='CD2' -browserType='Web Service'"

        }

When i run this pipeline it give me error : Test suite 'Test' not found.

How can i escape space character in this case ?

Amir Damirov
  • 87
  • 3
  • 14

2 Answers2

1

Try triple quotes:

stage('Test') {
        steps {
           bat """${KATALON} -noSplash -runMode=console -retry=0 -projectPath=${PRJ} -testSuitePath="Test Suites/IPM - REF" -executionProfile='CD2' -browserType='Web Service'"""

        }
MaratC
  • 6,418
  • 2
  • 20
  • 27
  • Thanks for the answer. Now its complaining >> -browserType='Web Service'. Again Jenkins see it as seperate "Web". Already tried to change double quote to single but no result. – Amir Damirov Mar 11 '20 at 07:06
0
> bat """${KATALON} -noSplash -runMode=console -retry=0 -projectPath=${PRJ} -testSuitePath="Test Suites/IPM - REF" -executionProfile="CD2" -browserType=\"Web Service\""""

By this way my command was succeed. Thanks to all comments.

Amir Damirov
  • 87
  • 3
  • 14