In order to collect coverage information SeaLights agents need to first scan the binary files for the build information: It it can be the *.class, *.jar or even the *.war files.
Scanning a build in ANT is achieved using the Java Build scanner with the java executed as an ANT Java task
Code Block |
---|
language | bash |
---|
theme | Eclipse |
---|
title | Sample command |
---|
|
<target name="sealights_scan" depends="compile">
<java jar="${sealights.dir}/sl-build-scanner.jar" fork="true">
<arg value="-scan"/>
<arg value="-tokenfile"/>
<arg value="/path/to/sltoken.txt"/>
<arg value="-buildsessionidfile"/>
<arg value="buildSessionId.txt"/>
<arg value="-workspacepath"/>
<arg value="${build}"/>
<arg value="-r"/>
<arg value="-fi"/>
<arg value="*.class"/>
<arg value="-moduleName"/>
<arg value="${package}"/>
</java>
</target> |
...
Code Block |
---|
language | bash |
---|
theme | Eclipse |
---|
title | Sample command |
---|
|
<junit fork="yes">
<jvmarg value="-javaagent:${sealights.dir}/sl-test-listener.jar"/>
<jvmarg value="-Dsl.tokenFile=/path/to/sltoken.txt"/>
<jvmarg value="-Dsl.buildSessionIdFile=buildSessionId.txt"/>
<jvmarg value='-Dsl.testStage="Unit Tests"'/>
</junit> |