-1

I have few scripts built on Karate Framework model using Maven. Created Freestyle Jenkins job to execute developed codebase.

The command-line syntax used in the IntelliJ IDEA Terminal is different from the command line used in the Jenkins "Execute Windows batch command". I figured out env providing through the command line.

-DargLine="-Dkarate.env=qa" (windows command format) / -Dkarate.env="qa" (IntelliJ Terminal command format)

I am looking for windows command line format for -Dkarate.options="--tags @smoke" , Do you have any idea how to specify karate options in the command line when we run from the Jenkins windows batch command or through cmd option from the "pom.xml" folder.

Once above is clear, I will pass env, tags, and test name through Jenkins parameters. Do you have any idea? for ex: -Dtest=$testname ("testname" holds test name from the Jenkins parameter) like this my requirement is to pass environment value and tags also. I need the entire command line format which established through parameters in the Jenkins.

Peter Thomas
  • 54,465
  • 21
  • 84
  • 248
  • I have no idea what you are asking and got lost reading your question. try a search: https://stackoverflow.com/search?q=%5Bkarate%5D+maven+command+line – Peter Thomas Apr 29 '20 at 17:58
  • Below is the commad line working fine from the IntelliJ IDEA Terminal window mvn clean compile test -Dkarate.env="qa" -Dkarate.options="--tags @sample" -Dtest=ParallelRunner , do you have format for a maven command which run from the windows cmd from the "pom.xml" folder – Kiran Edupuganti Apr 29 '20 at 18:18
  • no idea. try single quotes instead of double quotes. and also refer this if it helps: https://stackoverflow.com/a/7515282/143475 – Peter Thomas Apr 29 '20 at 18:21

1 Answers1

1

Here is format to provide command line in the Jenkins Maven project type job (Goals and options) section environment , tagoptions and test hold actual values in the Jenkins job choice parameter otpion

clean compile test -Dkarate.env=${environment} -Dkarate.options=${tagoptions} -Dtest=${test}