1

When I do a git commit, in commit message I will specify test class name and in junkins post-build step I am running a shell command(spoon) which needs the class name parameter which is in the git commit message.

I have 6 test classes depending upon the commit message perticular command should run.

example commit message :- git commit 'update [coreTest.java]'

command to run

java -jar spoon-runner-1.1.9-jar-with-dependencies.jar \
--apk example-app.apk \
--test-apk example-tests.apk
--class-name  coreTest.java

coreTest.java is the class name should be placed depending on the commit message.

Shivaraj Patil
  • 8,134
  • 4
  • 27
  • 55

2 Answers2

1

One idea would be to have post-receive hook on the git server side, which would:

Community
  • 1
  • 1
VonC
  • 1,129,465
  • 480
  • 4,036
  • 4,755
0

try Parametrized plugin

select and pass your class name as parameter

mahinlma
  • 1,128
  • 2
  • 10
  • 24