Menu

#99 Junit slow after instrumentation of iajc compiled classes

open
nobody
None
5
2009-02-06
2009-02-06
No

Project uses iajc to compile the classes, which are then instrumented with cobertura before running the tests.

I am using Cobetura 1.9.1

Test run, but a lot slower. A test class that takes 4 secs to run when not instrumented, takes > 600 seconds to run after instrumentation.

Using gant to build - here are the relevant steps:

ant.iajc ( srcdir : sourceDirectory, destdir : buildClassesDirectory, debug: true, failonerror : 'true', encoding: 'cp1252', source : '1.6' ) {
classpath {
fileset(refid:dependencyFilesetBuild)
}
aspectpath {
pathelement (location: Ant.project.properties.'spring-aspects.jar')
}
}

binding.ant.'cobertura-instrument' (todir:binding.instrumentedClassesDirectory) {
fileset (dir:binding.buildClassesDirectory)
}
binding.ant.junit (printsummary: 'yes', failureproperty : 'testsFailed', fork: true){
formatter (type : 'xml')
batchtest (todir : binding.testReportsDirectory){
fileset (dir: binding.buildTestClassesDirectory)
}
classpath {
pathelement ( location : binding.buildTestClassesDirectory )
pathelement ( location : binding.instrumentedClassesDirectory )
path (refid:coberturaPathRef)
pathelement ( location : binding.buildClassesDirectory )
fileset(refid:binding.dependencyFilesetBuild)
}
}

Discussion


Log in to post a comment.