Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 1.1-RC1, 1.1-RC2
-
Fix Version/s: None
-
Component/s: Testing
-
Labels:None
-
Environment:$ mvn -version
Maven version: 2.0.9
Java version: 1.6.0_07
OS name: "linux" version: "2.6.24-23-generic" arch: "i386" Family: "unix"
Description
1- Integration test classpath does not include unit tests which makes it difficult to reuse testing code between unit and integration.
2- Integration tests that are into a package (say com.organization.app) don't compile because they're unable to resolve references to domain classes. If the same test is at the root of integration tests it compiles.
Activity
- All
- Comments
- Work Log
- History
- Activity
- Git Commits
I had the same problems.
1. I was able to add a folder /test/testSupport and put shared code in there. Then in /grails-app/conf/BuildConfig.groovy I added the following line:
{basedir}grailsSettings.testDependencies.add new File("$
/test/testSupport")
You'll also want to add it as a source folder in your IDE.
2. On this one you have to bite the bullet and move your domain classes into packages. In Java 1.5 and above you can't import classes into packaged classes from the default package (effectively, you can't put stuff in the default package if you then want to use it). It makes Grails development a bit awkward as you have to refer to the fully classified name when you run Grails scripts.