JScoverage not generating report

Questions, problems, suggestions, bug reports, and so on.
Post Reply
anil gautam
Posts: 2
Joined: 2009-10-01 10:19 am

JScoverage not generating report

Post by anil gautam » 2009-10-01 10:26 am

Hi folk
I am using jscoverage with ant script but i am unable to generate report.following is part of my build file

<target name="check-coverage-js" description="This target measure and reports the JS Coverage">

<echo>Starting Tomcat...</echo>
<exec executable="${env.CATALINA_HOME}/bin/startup.bat" spawn="true" />

<mkdir dir="${jscoverage.report.dir}" />
<echo message="Starting jscoverage server....."/>
<exec executable="${lib}/jscoverage/jscoverage-server.exe" spawn="true">
<arg value="--verbose" />
<arg value="--proxy" />
<arg value="--port=8888" />
<arg value="--report-dir=${jscoverage.report.dir}" />
</exec>
<junit showoutput="false" haltonerror="true" haltonfailure="true">
<formatter type="plain" usefile="false"/>
<classpath refid="jsunit.classpath"/>
<sysproperty key="browserFileNames" value="${jsunit.browserFileNames}"/>
<sysproperty key="logsDirectory" value="${jsunit.log.dir}"/>
<sysproperty key="port" value="${jsunit.port}"/>
<sysproperty key="url" value="${jsunitAllTest.url}"/>
<sysproperty key="closeBrowsersAfterTestRuns" value="${jsunit.closeBrowsersAfterTestRuns} "/>
<test name="net.jsunit.StandaloneTest"/>
</junit>

<echo message="Stoping jscoverage server....."/>
<exec executable="${lib}/jscoverage/jscoverage-server.exe" spawn="true">
<arg value="--verbose" />
<arg value="--port=8888" />
<arg value="--shutdown" />
</exec>

<echo>Stopping Tomcat...</echo>
<exec executable="${env.CATALINA_HOME}/bin/shutdown.bat" timeout="5000" />

<waitfor maxwait="3" maxwaitunit="second" checkevery="500">
<not>
<http url="http://${tomcat.server}:${tomcat.port}/${app.short.name}/index.html" />
</not>
</waitfor>
<delete dir="${env.CATALINA_HOME}/webapps/ROOT" />
<delete file="${env.CATALINA_HOME}/webapps/ROOT.war" />

<jscoverage_threshold jsCovergaeReportFile="${jscoverage.report.dir}/jscoverage.json" failOnError="true" moduleName="NGPManager">
<checkthreshold ctJScoverage="${JSCOVERAGE_THESHOLD}" thresholdFile="prj/${build.dir.name}/jscoverage/threshold.properties" />
</jscoverage_threshold>
</target>

Ed
Posts: 120
Joined: 2008-10-11 6:52 pm

Re: JScoverage not generating report

Post by Ed » 2009-10-02 3:00 am

That looks correct ... can you run your test suite without using Ant and see what happens? What is the output of the jscoverage-server program?

anil gautam
Posts: 2
Joined: 2009-10-01 10:19 am

Re: JScoverage not generating report

Post by anil gautam » 2009-10-02 8:48 am

yes i am able to generate report without ant but with ant not

Post Reply