-
Bug
-
Resolution: Not A Defect
-
Blocker
Hello,
I am using the groovy to use the insatlled TestNG plugin but doesn't work. Below are the errors i get while using this: step([$class: 'Publisher']): Publish TestNG Results
88: expecting ')', found ':' @ line 88, column 35.
[($class: 'Publisher') : Publish TestNG Results, reportFilenamePattern: './target/surefire-reports/testng-results.xml']
^
WorkflowScript: 7: Expected a step @ line 7, column 51.
([$class: 'Publisher']) : Publish ........
^
WorkflowScript: 8: unexpected token: TestNG @ line 8, column 33.
Publish TestNG Results
^
java.lang.NoSuchMethodError: No such DSL method 'publishers' found among steps
88: expecting ')', found 'Publisher' @ line 88, column 36.
[($class 'Publisher') Publish TestNG Results, reportFilenamePattern: './target/surefire-reports/testng-results.xml']
^
I have referred to many TestNG plugin documentations including:
https://www.jenkins.io/doc/pipeline/steps/testng-plugin/#stepclass-publisher-publish-testng-results
but the issue doesn't get resolved.
Kindly let me know if we can use this plugin using groovy.
i have tried using it under pipeline, stages, steps, have tried all the possible combinations but doesn't work