Grails

Alter TestApp script to add events to start/end tests

Details

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

Description

Add events to start/end of unit and integrations tests, so a Events.groovy script could hook some application setup to tests. I have attached a TestApp.groovy version with this events:

  • StartRunUnitTests
  • EndRunUnitTests
  • StartRunIntegrationTests
  • EndRunIntegrationTests
  1. TestApp.groovy
    28/Feb/08 9:44 PM
    16 kB
    Marcos Silva Pereira
  2. TestApp.patch
    11/Mar/08 10:37 AM
    2 kB
    Marcos Silva Pereira

Activity

Hide
Marcos Silva Pereira added a comment -

This is a patch with more reasonable names for events and putting them on more appropriated places.

Show
Marcos Silva Pereira added a comment - This is a patch with more reasonable names for events and putting them on more appropriated places.
Hide
Graeme Rocher added a comment -

I changed the patch to be more consistence with the other names of events in Grails. So there are basically 4 new events:

  • TestSuiteStart - gets passed an argument 'unit' or 'integration' depending on the test type
  • TestSuiteEnd - gets passed an argument 'unit' or 'integration' depending on the test suite type
  • TestStart - gets passed the suite, the current test case, and the TestResult for before each test invokation
  • TestEnd - gets passed the suite, the current test case, and the TestResult for after each test invokation
Show
Graeme Rocher added a comment - I changed the patch to be more consistence with the other names of events in Grails. So there are basically 4 new events:
  • TestSuiteStart - gets passed an argument 'unit' or 'integration' depending on the test type
  • TestSuiteEnd - gets passed an argument 'unit' or 'integration' depending on the test suite type
  • TestStart - gets passed the suite, the current test case, and the TestResult for before each test invokation
  • TestEnd - gets passed the suite, the current test case, and the TestResult for after each test invokation
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: