I have 6 technologies in play
easyB Selenium Gradle Ant Java Jenkins
We use easyB to write scenarios
Those scenarios in turn invoke Selenium
Finally we use Gradle to kick start all stories.
And since we do not have a gradle plugin for easyB, gradle really uses ant to run easyB.
This Gradle script is finally executed via a Jenkins job
The complete execution takes about 3-4 hours. Half-way through, we get a perm-gen error
I am not sure which process needs the increase in PermGen
EasyB ? Ant? Gradle?
Error Message
[ant:easyb] retry value is now: 2
[ant:easyb] objectID is set to: 60868
[ant:easyb] break after creating subjectID 60868
[ant:easyb] Creating visit>>>>>>Pre Treatment
[ant:easyb] Creating Image Group>>>>>>auto-gp1
[ant:easyb] There was an error running your easyb story or specification
[ant:easyb] java.lang.OutOfMemoryError: PermGen space
[ant:easyb] easyb execution FAILED
FAILURE: Build failed with an exception.
Gradle script
check << {
def script = new GroovyShell()
script.run(new File('InitializeReport.groovy'))
ant.taskdef(name: "easyb", classname:"org.easyb.ant.BehaviorRunnerTask", classpath: sourceSets.test.runtimeClasspath.asPath)
ant.easyb( classpath: sourceSets.test.runtimeClasspath.asPath, failureProperty:'easyb_failed' ,tags:tags) {
report( location:"${project.testResultsDir}/story."+format, format:format )
behaviors( dir: storiesHome ) {
include( name:storyToBeExecuted )
}
}
ant.fail( if:'easyb_failed', message: 'Failures in easyb stories' )
}
This is what I see on the Jenkins console Note- how the memory options are being passed to the Gradle command , but not to the Java command which is running the easyB scripts ? That is where- I think the problem is...
[jenkins@bil-dev-006v bin]$ ps -ef|grep gradle
jenkins 18420 4714 9 23:04 ? 00:00:16 /usr/java/jdk1.6.0_20/bin/java -XX:MaxPermSize=700m -Xmx512m -XX:MaxPermSize=800m -Xmx512m -classpath /opt/jenkins/gradle-1.0-milestone-1/lib/gradle-launcher-1.0-milestone-1.jar -Dorg.gradle.appname=gradle org.gradle.launcher.GradleMain -PstoryName= -PstoriesHome= check -info
jenkins 18579 18420 13 23:04 ? 00:00:21 /usr/java/jdk1.6.0_20/jre/bin/java -classpath /jenkins/jobs/helium-complete-run/workspace/trunk/build/classes/main:/jenkins/jobs/helium-complete-run/workspace/trunk/lib/commons-lang-2.4.jar:/jenkins/jobs/helium-complete-run/workspace/trunk/lib/httpclient-4.1.1.jar:/jenkins/jobs/helium-complete-run/workspace/trunk/lib/xml-apis.jar:/jenkins/jobs/helium-complete-run/workspace/trunk/lib/activation.jar:/jenkins/jobs/helium-complete-run/workspace/trunk/lib/xercesSamples.jar:/jenkins/jobs/helium-complete-run/workspace/trunk/lib/safe-client.jar:/jenkins/jobs/helium-complete-run/workspace/trunk/lib/security.jar:/jenkins/jobs/helium-complete-run/workspace/trunk/lib/json-lib-2.4-jdk15.jar:/jenkins/jobs/helium-complete-run/workspace/trunk/lib/http-builder-0.5.1.jar:/jenkins/jobs/helium-complete-run/workspace/trunk/lib/safe-import.jar:/jenkins/jobs/helium-complete-run/workspace/trunk/lib/mail.jar:/jenkins/jobs/helium-complete-run/workspace/trunk/lib/ojdbc14.jar:/jenkins/jobs/helium-complete-run/workspace/trunk/lib/httpcore-4.1.jar:/jenkins/jobs/helium-complete-run/workspace/trunk/lib/xercesImpl.jar:/jenkins/jobs/helium-complete-run/workspace/trunk/lib/cacher.jar:/jenkins/jobs/helium-complete-run/workspace/trunk/lib/serializer.jar:/jenkins/jobs/helium-complete-run/workspace/trunk/lib/resolver.jar:/jenkins/jobs/helium-complete-run/workspace/trunk/lib/cache-verifier.jar:/opt/jenkins/.gradle/cache/org.easyb/easyb/jars/easyb-0.9.7.jar:/opt/jenkins/.gradle/cache/commons-cli/commons-cli/jars/commons-cli-1.1.jar:/opt/jenkins/.gradle/cache/org.codehaus.groovy/groovy-all/jars/groovy-all-1.7.2.jar:/opt/jenkins/.gradle/cache/org.seleniumhq.selenium.client-drivers/selenium-java-client-driver/jars/selenium-java-client-driver-1.0.1.jar:/opt/jenkins/.gradle/cache/log4j/log4j/bundles/log4j-1.2.16.jar:/opt/jenkins/.gradle/cache/org.codehaus.groovy/groovy/jars/groovy-1.8.2.jar:/opt/jenkins/.gradle/cache/antlr/antlr/jars/antlr-2.7.7.jar:/opt/jenkins/.gradle/cache/asm/asm/jars/asm-3.2.jar:/opt/jenkins/.gradle/cache/asm/asm-commons/jars/asm-commons-3.2.jar:/opt/jenkins/.gradle/cache/asm/asm-tree/jars/asm-tree-3.2.jar:/opt/jenkins/.gradle/cache/asm/asm-util/jars/asm-util-3.2.jar:/opt/jenkins/.gradle/cache/asm/asm-analysis/jars/asm-analysis-3.2.jar org.easyb.BehaviorRunner -outfail failed.txt -html /jenkins/jobs/helium-complete-run/workspace/trunk/build/test-results/storycaseassigment_inter-intra.html /jenkins/jobs/helium-complete-run/workspace/trunk/src/test/stories/caseassigment/inter-intra/ca_interintra.story