English 中文(简体)
Faulty Line的覆盖面(100%)是通过ant进行的?
原标题:Faulty Line coverage(100%) in cobertura via ant?

I m using cobertura, but it is giving me 100% line coverage. It is showing only those lines of code which are executed?

问题回答

You need to include the sources (or make sure, that they are included), when you use the report task:

<cobertura-report format="html" destdir="${coveragereport.dir}" srcdir="${src.dir}" />

Reference: cobertura-anttask

Otherwise cobertura cannot know, how many lines/classes actually exist and will report 100% coverage.

Try removing the file cobertura.ser before running the tests.

https://github.com/cobertura/cobertura/wiki/FAQ





相关问题
State based testing(state charts) & transition sequences

I am really stuck with some state based testing concepts... I am trying to calculate some checking sequences that will cover all transitions from each state and i have the answers but i dont ...

Running genhtml using cygwin Perl.exe in Windows

I m trying to run genhtml using perl.exe from Cygwin in Windows. I have installed cygwin and placed genhtml in the bin directory of cygwin. I went to that directory and used the command line in ...

Highlight text from Visual Studio 2008 add-in

I m writing another code coverage tool for .NET with Visual Studio 2008 integration. Everything goes well except one thing: I can t find a way to highlight some code chunks. I need it to inform user ...

Cobertura ant script is missing Log4J classes

I tried to get Cobertura running inside my ant script, but I m stuck right at the beginning. When I try to insert the cobertura taskdef I m missing the Log4J libraries. Ant properties & ...

How to omit using python coverage lib?

I would like to omit some module that are in some particular directory : eggs and bin coverage -r -i --omit=/usr/lib/,/usr/share/,eggs,bin Name ...

Code coverage with nUnit? [closed]

Is there a way to see the code coverage when using nUnit? I know there s such a feature in Visual Studio, but can you use it with nUnit or only with the built-in vs unit tests?

run unit tests and coverage in certain python structure

I have some funny noob problem. I try to run unit tests from commandline: H:PROpyEstimator>python src estpython est_power_estimator.py Traceback (most recent call last): File "src est...

热门标签