FitNesse code coverage with NCover

FitNesse code coverage with NCover

Trying to get these 2 to play together, but having some troubles

Our First step was to move any from the Fitnesse Nant Task to get the correctly command line argument to TestRunner This seem to work well and ran in about 1 second, so then we decided to move this into ncover

exec program="${NCOVER.CONSOLE.EXE}" workingdir="${SOURCE.DIR}" failonerror="false" resultproperty="execResult" > arg line="${FIT.DIR}\testrunner.exe -results ${FIT.OUTPUT.DIR}\${fit.test}.html localhost ${FIT.PORT} ${fit.test} //x ${FIT.OUTPUT.DIR}\${fit.test}-coverage.xml //l ${FIT.OUTPUT.DIR}\Coverage.log //ea System.CodeDom.Compiler.GeneratedCodeAttribute //w ${FIT.DIR}"/>

with this setup FitNesse is not finding it's fixtures, so we change the workingdir from SOURCE.DIR to FIT.DIR and that seem to work for FitNesse, but ran a really long time (much longer than our NUnit/Ncover tests and the FitTest we are testing with is basically a dummy test for now)

any way, just looking for any help/advice with this task? (and yes I sometimes leave large gaps of detail in my post)


RE: FitNesse code coverage with NCover

isn't Fitnesse a java app?


RE: FitNesse code coverage with NCover

I have tried this command in MSBuild but couldnt generate the report...instead getting the html format..where am i missing.. any help is appreciated.

exec command="$(NCoverConsolePath) $(DOUBLE_QUOTES)$(FitNessePath)\dotnet\TestRunner$(DOUBLE_QUOTES) -debug -results $(ReportsPath)\$(FITxyzDatabase).html localhost 8888 $(FITxyzDatabase) //x $(ReportsPath)\$(FITxyzDatabase).coverage.xml //l $(ReportsPath)\$(FITxyzDatabase).coverage.log //a xyz.IntegrationTests;xyz.Library;dbfit.dll ">


RE: FitNesse code coverage with NCover

mahen,

your exec path looks fine. What version of NCover are you using? Does the coverage.xml get generated? Does the coverage.log get generated?

Stephen


RE: FitNesse code coverage with NCover

hi sporewell, infact its generating log file but its not doing the coverage of the tests..like what you see with nunits and ncover... so i am able to get a html /xml formatted output and further cant see ncover report with the above command..

Now ,I am left with an option of calling the Fit tests in nunit and then covered by ncover.. can anyone suggest better ideas?


RE: FitNesse code coverage with NCover

mahen,

Does Fitness launch a test runner to run the test in? If so, you'll have to use the //pm flag to tell NCover to profile that process.