12.2 Integration Testing - Reference Documentation
Authors: Andres Almiray
Version: 1.2.0
12.2 Integration Testing
Integration tests differ from unit tests in that you have full access to the Griffon application within the test. The following is an integration test created using the default templateimport griffon.core.GriffonApplication import griffon.test.*class SomeControllerTests extends GriffonUnitTestCase { GriffonApplication app protected void setUp() { super.setUp() } protected void tearDown() { super.tearDown() } void testSomething() { } }
startup()
, ready()
, realize()
and show()
methods).The type of application to be run depends on the type of project and/or a configuration flag as explained next:
- if a configuration flag
griffon.application.mainClass
exists then its value will be used (assumes the value is a literal full qualified class). - if the project is an addon then it will use
griffon.test.mock.MockApplication
- finally it will fall back to
griffon.swing.SwingApplication