0

I have some testcases in python selenium framework that run on specific environment so I want to skip those testcases in nightly run. enter image description here here I want to skip METs folder.

I made changes in Jenkins groovy file with --ignore and --exclude syntax however I am getting error. "error: unknown option `ignore'

if( params.ENVIRONMENT == 'cores'){

bat label: '', script: 'git checkout %BRANCHNAME% & git pull origin %BRANCHNAME% "C:\Users\selenium\Python\Python39\Scripts\py.test" --ignore-glob=/METS/*** -s --browser %BROWSER% --html=\\kannfssvm0x.furry.abc.com\data\abc\Selenium\Reports\%BUILD_NUMBER%\pyresults.html --baseURL "https://%ENVIRONMENT%.abc.com/cms/servlet/cms.servlet.Login?locale=en&licenseeParam=asc" -n %CONCURRENCY%'

what syntax should I add to skip that folder when run on specific environment?

Ash
  • 11
  • 1

1 Answers1

0

can you try this link : How to tell py.test to skip certain directories?

Instead of using --ignore-glob, you can use the --ignore option followed by the specific directory or file you want to skip.

if (params.ENVIRONMENT == 'cores') {
    bat label: '', script: 'git checkout %BRANCHNAME% & git pull origin %BRANCHNAME% "C:\Users\selenium\Python\Python39\Scripts\py.test" --ignore=/METS/*** -s --browser %BROWSER% --html=\\kannfssvm0x.furry.abc.com\data\abc\Selenium\Reports\%BUILD_NUMBER%\pyresults.html --baseURL "https://%ENVIRONMENT%.abc.com/cms/servlet/cms.servlet.Login?locale=en&licenseeParam=asc" -n %CONCURRENCY%'
}