Reply to comment

Grails runs bootstrap for integration tests tripped me up

I stayed up a little too late last night trying to get my grails tests to complete.  I didn't want to give up.

My test was failing because the value that was being sent in a Map was the wrong value.  When I fixed my test, it still failed.  I put debugging in my test, the debugging did not display.  I renamed my test, the new name was reflected in the reports.  I felt that I was going crazy!  How could grails be recognizing and compiling my changes to the test but not showing them?  I deleted all my compiled artifacts in my .grails directory.  Still failure.

I then tried it on a 2nd machine.  Failure.

Created an entirely new test.  Failure

Finally!  Figured out that Bootstrap.groovy was being executed before my test was excuted.  I should have seen this earlier.  Sometimes I solve problems using my intelligence/skills.... sometimes it's through brute force plodding.

Doing a search returned the following post:

Integration tests automatically run bootstrap for you.  Unit tests do
not, and generally ought not to.

Reply

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options