Issue Details (XML | Word | Printable)

Key: GRAILS-3208
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Graeme Rocher
Reporter: Glenn Saqui
Votes: 0
Watchers: 0
Operations

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

Adding the ability to rerun failed unit and integration tests

Created: 08/Jul/08 08:56 AM   Updated: 13/Nov/08 03:26 PM
Component/s: Testing
Affects Version/s: None
Fix Version/s: 1.0.4

Time Tracking:
Not Specified

File Attachments: 1. File TestApp.groovy (17 kB)


Patch Submitted: Yes


 Description  « Hide
I have attached a patch to the TestApp.groovy script that will allow the user to be able to rerun failed tests.

Now after failed tests they can be rerun with:
grails test-app -rerun --will rerun all failed tests
grails test-app -rerun -unit --will only rerun failed unit tests
grails test-app -rerun -integration --will only rerun failed integration tests



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Lee Butts added a comment - 10/Jul/08 06:46 AM
Patch applied (with a minor modification to support packages). Thanks Glenn!

Burt Beckwith added a comment - 13/Nov/08 03:26 PM
This only works for failures but not for errors. The fix is simple though:

def failedTests = xmlParser.testsuite.findAll { it.'@failures' =~ /.*[1-9].*/ || it.'@errors' =~ /.*[1-9].*/}