1

I'm using Jenkins to build my project, and AgitarOne tool to generate my JUnit test cases for my classes. However, when I build my project in Jenkins, it does not use the AgitarOne tests. Is there a way to configure jenkins to look at a test folder other than what is in src/test?

user3334871
  • 1,251
  • 2
  • 14
  • 36
  • What tasks does Jenkins perform for your build? Do you have a build automation tool, like maven or gradle? If so, that's what you want to configure to look at an alternative test folder. – Brandon McKenzie Apr 23 '15 at 20:23
  • @BurntCornMuffin We use Maven to build our project. So from what I did a quick search on, adding `build-helper-maven-plugin` in my pom.xml file can allow me to specify which test resource to use? Or do I have to set it in my Maven goals? – user3334871 Apr 23 '15 at 20:36

1 Answers1

2

To change your test directory to a non-standard location, you'll need to change the testSourceDirectory on your pom (the answer to How to run UnitTests in maven which is in src/test-integration/java folder has a very good explanation of this, as well as buildhelper usage to achieve your goals).

Community
  • 1
  • 1
Brandon McKenzie
  • 1,655
  • 11
  • 26