Release notes 1.0.0

10 October 2010

Description

This is the first external release of the GINT framework. GINT has been under development in its current form since 2009 based on earlier related works supporting the testing needs for various open source projects by the author. Projects include tools and plugins for Atlassian products.

Highlights

Development Productivity

Integration testing can be time consuming, difficult, and complex. GINT reduces the time and difficulty of writing testcases while helping to manage the complexity.

  1. Declarative style for defining testcases - a testcase is a key-value map declared in groovy code, a CSV file, or a database table. Minimal programming skill is required for testcase definitions.
  2. Groovy scripting - more complex tests may require some level of scripting and Groovy is a powerful and compact scripting language. Groovy also has a short learning curve.
  3. Command line based - the quickest way to run and debug tests. Run last failed, individual testcases, groups of testcases, or all. Easy to provide parameters.
  4. Parameters - the ability to easily provide control and testcase specific parameters to minimize duplication and maximize re-use. More ...
  5. Automatic comparisons - text or regex based comparisons on result data to determine success or failure of testcase. More ....
  6. Subsets - the ability to subset testcases for a test run. Subsets for specific environments (like Windows, Linux, etc...), code versions, or turn around requirements (short verses long running tests). Another example - testcase can be marked as deferred waiting for a fix. This behavior can be controlled statically (declared) or dynamically (determined by script logic).
  7. setUp and tearDown support.

Example script

includeTool << org.swift.tools.Gint  // test framework

gint.initialize(this) // required

gint.add([name: 'simple1', inline: { assert 1 == 1 } ])

gint.finalizeTest() // final preparations for running tests

Example run

gant -f simple.gant

 = = = = = = = = = =  simple started at Tue Aug 24 21:26:13 CDT 2010  = = = = = = = = = =

    [start] simple1
   [ending] simple1
 [complete] simple1 - 0.022 secs


     [info] Successful testcases  . . . . . . . . . . : 1    <<< TEST SUCCESSFUL
     [info] Total testcases . . . . . . . . . . . . . : 1
     [info] Elapsed run time  . . . . . . . . . . . . : 1.027 secs

 = = = = = = = = = =  simple completed at Tue Aug 24 21:26:14 CDT 2010  = = = = = = = = = =

BUILD SUCCESSFUL
Total time: 2.51 seconds

Performance

Integration level tests can often take a long time to run serially. GINT provides automatic parallel running of testcases with simple options to manage ordering and dependencies. This makes effective use of multi-core processors to reduce execution time significantly. Reduced execution time means that more tests can be run in CI environments while still providing quick turnaround. GINT capabilities make it relatively easy to exploit this capability and manage complexity.

More ...

 

Serial

[info] Successful testcases  . . . . . . . . . . : 103    <<< TEST SUCCESSFUL
[info] Deferred testcases  . . . . . . . . . . . : 9
[info] Level of run  . . . . . . . . . . . . . . : 1
[info] Deferred levels . . . . . . . . . . . . . : [false, 3, 99]
[info] Total testcases . . . . . . . . . . . . . : 112
[info] Elapsed run time  . . . . . . . . . . . . : 125.19 secs

Parallel

[info] Successful testcases  . . . . . . . . . . : 103    <<< TEST SUCCESSFUL
[info] Deferred testcases  . . . . . . . . . . . : 9
[info] Level of run  . . . . . . . . . . . . . . : 1
[info] Deferred levels . . . . . . . . . . . . . : [false, 3, 99]
[info] Total testcases . . . . . . . . . . . . . : 112
[info] Elapsed run time  . . . . . . . . . . . . : 64.361 secs

Continuous Integration

Continuous integration (CI) based development relies on tests that can be run frequently using automation. GINT makes it easier to include integration level tests in a CI environment. GINT supports CI tools like Bamboo and similar. Specific GINT features make this possible and effective:

Parameters

Integration tests need to cover a wide gambit of environments and conditions. Often, tests are dependent on external factors that may change frequently. One technique to handle these environments and factors is through external parameterization of testcases and test runs. GINT provides extensive support for parameters to minimize duplication and maximize re-use of tests.

Use

  1. Control parameters are used to determine how the test is run. For example, subsetting of what testcases should be run.
  2. Test specific parameters are used in testcase logic.

Where specified

  1. Test script
  2. Command line parameters. More ...
  3. User specific property file. More ...
  4. Project or current directory based property file. More ...
  5. Test profiles using multiple user defined property files. More ...

Example

...
gint.add([name: 'test6', description: 'Green test', level: 'green', ...])
...
gant -f level.gant -Dclean -DincludeLevels=green,blue -Dlevel=0 

 = = = = = = = = = =  level started at Tue Sep 07 09:20:40 CDT 2010  = = = = = = = = = =
    [start] test6 (Green test)
    [start] test7 (Blue test)
   [ending] test6 (Green test)
 [complete] test6 - 0.017 secs

   [ending] test7 (Blue test)
 [complete] test7 - 0.027 secs
  
     [info] Successful testcases  . . . . . . . . . . : 2    <<< TEST SUCCESSFUL
     [info] Deferred testcases  . . . . . . . . . . . : 5
     [info] Level of run  . . . . . . . . . . . . . . : 0
     [info] Deferred levels . . . . . . . . . . . . . : [false, 1, 99, true]
     [info] Total testcases . . . . . . . . . . . . . : 7
     [info] Elapsed run time  . . . . . . . . . . . . : 0.744 secs
   
 = = = = = = = = = =  level completed at Tue Sep 07 09:20:40 CDT 2010  = = = = = = = = = = 
  
BUILD SUCCESSFUL
Total time: 2.05 seconds

Interactive testing

Manual and semi-automated tests can be included in GINT test scripts. GINT uses instant messaging (IM) to make it possible to interact with testcases requiring manual steps. This can improve test execution productivity and provide standard reporting.

More ...

Default content
[name: 'simple', inline: { }, im: true],  // default content, before test is run

Testcase simple from test interactiveexample is requesting a response before running. 
successResponses: [success, s, yes, y, true], failResponses: [fail, f, no, n, false],
waitResponses: [wait], skipResponses: [skip]
Specific content
[name: 'manualTest1', inline: { }, im: [content: "Instructions for running manualTest1"]]

Instructions for running manualTest1    successResponses: [success, s, yes, y, true],
failResponses: [fail, f, no, n, false], waitResponses: [wait], skipResponses: [skip]

Extensions

Testcases should be easy to declare and self documenting. Often, simple extensions to GINT make it possible to support different use cases and test requirements while maintaining this simplicity. There are a number of ways GINT supports extensions and customization.

  1. Extension points or exits
    1. Command generators
    2. setAddClosure
    3. setCmdLogClosure
    4. testcase specific resultClosure, successClosure, and finalClosure extensions
  2. Included extensions supporting testing of:
  3. Dynamic Groovy makes it possible to override or change specific GINT behavior with minimal coding.
  4. Extend GINT source code
    • Open source
    • Minimal development dependencies
    • Includes a set of GINT based integration tests
    • Development tested on Windows, Linux, and Mac

Open Source


Client Platforms

GINT is tested on the following client platforms:

  • Mac 10.6.4
  • Windows 7 and Windows Vista
  • Linux Ubuntu 9