Grails

Test reports generated by test-app do not include correct "errors" count. I have errors and count is zero in reports

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.0.1
  • Fix Version/s: 1.0.2
  • Component/s: None
  • Labels:
    None

Activity

Hide
David White added a comment -

Attached is a patch to the TestApp.groovy script which should allow the JUnit test reports to output the correct run, failure, error counts as well as output the correct timing information on each test method and the overall test case. This patch also includes changes to allow unit/integration tests to be written in Java as well as Groovy (provided the test classes extend from JUnit TestCase...). Java integration tests will be able to have Spring beans auto-wired in (ala their Groovy brethren). Finally, when running an individual test I added a check for a config property called:

grails.testing.nameSuffix

If this property is set in Config.groovy, then it will be used when resolving the test class to run. If it is not set, then the default suffix will be 'Tests' (this was the hardcoded default before...).

Please take a look to see whether it makes sense to incorporate some or all of this patch into the next release of Grails.

Show
David White added a comment - Attached is a patch to the TestApp.groovy script which should allow the JUnit test reports to output the correct run, failure, error counts as well as output the correct timing information on each test method and the overall test case. This patch also includes changes to allow unit/integration tests to be written in Java as well as Groovy (provided the test classes extend from JUnit TestCase...). Java integration tests will be able to have Spring beans auto-wired in (ala their Groovy brethren). Finally, when running an individual test I added a check for a config property called: grails.testing.nameSuffix If this property is set in Config.groovy, then it will be used when resolving the test class to run. If it is not set, then the default suffix will be 'Tests' (this was the hardcoded default before...). Please take a look to see whether it makes sense to incorporate some or all of this patch into the next release of Grails.
Hide
Graeme Rocher added a comment -

Thanks for the patch!

Show
Graeme Rocher added a comment - Thanks for the patch!
Hide
Graeme Rocher added a comment -

Bulk closing bunch of resolved issues

Show
Graeme Rocher added a comment - Bulk closing bunch of resolved issues

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: