3

Is it possible to use gretty integrationTestTask with a project that uses a war folder?

It seems from the documentation appBeforeIntegrationTest does not have access to the war. Is there another way to run test cases so that it uses the war folder?

Ideally, I want jettyStart -> test -> jettyStop to run. Although when I run it straight jettyStart hangs indefinitely, until jettyStop is run. Is there a way to run jettyStart in Gradle in the background or something?

user3554664
  • 349
  • 2
  • 16

1 Answers1

1

Regardless what file structure your application has, the integrationTestTask is supposed to be configured with the name of an exsiting gradle task to execute when gradle integrationTest is run:

gretty {
   // ...
   integrationTestTask = 'integrationTest' // name of existing gradle task
   // ...
}

What you want to archive is this:

gretty {
   integrationTestTask = 'test'
}

Gretty's workflow when calling integrationTest is as follows: gretty integrationTest state diagram

UnlikePluto
  • 3,101
  • 4
  • 23
  • 33