Issue Details (XML | Word | Printable)

Key: GRAILS-2546
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Graeme Rocher
Reporter: Marc Palmer
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Grails

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

Created: 28/Feb/08 03:39 AM   Updated: 13/Mar/08 10:30 AM   Resolved: 13/Mar/08 10:30 AM
Component/s: None
Affects Version/s: 1.0.1
Fix Version/s: 1.0.2

Time Tracking:
Not Specified

File Attachments: 1. Text File TestApp.groovy.patch (6 kB)



David White added a comment - 13/Mar/08 09:39 AM

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.


Graeme Rocher added a comment - 13/Mar/08 10:30 AM

Thanks for the patch!