Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


Normally, clean up code should be part of tearDown testcases. However, is some situations, you may need to run some final code at the end of the test after the results have been tabulated. This is easy to do with a final target.  A specific example is How to run Selenium as a GINT test.

No Format
@GrabResolver(name='atlassian', root='')
@Grab(group='', module='gint', version='1.5.0')
includeTool << Gint

gint.initialize(this) // required

    name: 'hello', 
    inline: { println 'Hello World' },
target(name: 'final', description: 'Run this last', prehook: [], posthook: []) {
    message 'info', 'Final code gets run here'
gint.finalizeTest() // final preparations for running tests