code-coverage

How to use: PartCover .NET 4 with NUnit 2.5.6

Say I have Test assembly (NUnit compliant) App.Test.dll and a library to be tested App.dll. How do I get the code coverage analysis using PartCover and NUint? ...

Code Coverage report on unit tests for Windows CE code using TFS 2010

I have a unique combination of platforms in my solution that has stumped me. We need to generate code coverage statistics for unit tests that we're writing for our Windows CE code. We're using Visual Studio 2008 to write the CE code, of course, because VS 2010 doesn't support smart devices. Unfortunately, MSTest won't instrument CE ass...

Can I calculate and check java project code coverage through Maven?

Possible Duplicate: How to get Cobertura to fail M2 build for low code coverage I would like to calculate code coverage of my Java code base and fail building process if any package, class, or method has code coverage of 80% or less. Is it possible to achieve with some open source tool? Preferably through a maven2 plugin. ...

How to measure Windows API code coverage of app level benchmarks

My job involves system-level performance testing with third party tools that I do not have sources for. I'm also testing Windows, and can use debugging symbols but not Windows source code. I'd like a quantitative way to describe the areas of the host OS my tests cover. There are two big steps to this: identifying what DLLs and functio...

Dealing with TDD / Unit Testing fatigue

So I'm getting used to TDD, but I've come across an unexpected problem: I'm getting really tired of 100% code coverage. The tests are getting more tedious to write than the code itself, and I'm not sure if I'm doing it right. My question is: What sort of things are you supposed to test, and what sort of things are overkill? For example,...

Code coverage fails with PHPUnit and the Zend Framework

Hi I have some issues with code coverage reports in PHPunit and the zend framework. Whenever I run a phpunit test the code coverage fails returning the following message: PHPUnit 3.4.15 by Sebastian Bergmann. I.......III.I................................IIIIIIIIIIIIIII 60 / 93 IIII....I....I..II..II.....IIIIII Time: 4 seconds, Memo...

How to use lcov test coverage tool with Hudson continuous integration?

In my environment developers use lcov from command line when working with source code's module tests. I would like to know if there is a way to easily add reports from lcov to Hudson's builds? I would ease and automate the whole procedure of gathering test source code coverage. ...

how to determine junit code coverage?

How can i determine what percentage of my methods are covered by jUnit tests? I am assuming there is a more sophisticated way then simply counting ...and one and two etc ... I specifically wonder how will such counting be handled when single method is covered by 'n' tests. please let me know and as always "thanks for reading" ...

Visual Studio TFS build with code coverage

Essentially what I would like to do is write a visual studio build script that will only build the solution if my code coverage requirements have been met. So essentially, after compiling and running the automated testing of the solution, I want to pass the build (working with Team Foundation server) only if a certain % of the code is c...

The value of test code coverage tools..

We've started using Part Cover to track test code coverage of our application. IMO its a great tool for getting an overall score for your tests and for highlighting test areas where you might have been a bit lazy with tests, but today I wrote a test and realised that it didn't really test anything useful, it just increased my coverage! ...

measuring code coverage of an unit test using aqtime

Hi, I want to measure the code coverage of an unit test with aqtime. The application to test uses a lot of boost functionality. Now these boost methods appear in the test report. With these methods in the report, it is nearly impossible to interpret it since I did not test boost but the classes using boost. Is there a fast way to exclu...

Test coverage tools for MS Test

I have a project in VS 2008 and written a MS Test cases for that. I am looking any open source Test Coverage tools which are free (Like NCover) to perform Test Case coverage tools in .net Pleaes let me know if any one useed any tool which is open source and free ...

How do I test code that should never be executed?

Following method shall only be called if it has been verified that there are invalid digits (by calling another method). How can I test-cover the throw-line in the following snippet? I know that one way could be to merge together the VerifyThereAreInvalidiDigits and this method. I'm looking for any other ideas. public int FirstInvalidDi...

Unit-testing coverage policy, test quality concerns

Hi, our company is trying to increase software quality by enforcing minimum function coverage on automated unit-tests. This is already a good starting point to get at least some tests written and to get them automated (although it would be better to go for branch or decision coverage). My main concern is the outcome of the tests which...

Exclude specific methods from code coverage from cobertura?

I was trying to ignore all the toString() methods from instrumentation using following configuration. This wasn't really working? This is using cobertura as maven plugin. This was based on a previous answer http://stackoverflow.com/questions/951569/exclude-code-from-code-coverage-with-cobertura. <instrumentation> <ignores> <...

Emma test suite coverage

I'm trying to test my own tests suite's coverage on an api I am working with. To do that I have a staging server that is running everything and I want to instrument the specific api classes in a jar file and then run my tests and get a coverage report. What I did was explode the jar run the code to instrument the classes then I put it ...

How do I tell gcov to ignore un-hittable lines of C++ code?

I'm using gcov to measure coverage in my C++ code. I'd like to get to 100% coverage, but am hampered by the fact that there are some lines of code that are theoretically un-hittable (methods that are required to be implemented but which are never called, default branches of switch statements, etc.). Each of these branches contains an a...

Undercover code coverage with ant and scalatest

After a lot of trying and searching around, I still could not get undercover to work with ant and scalatest. although there is no error, The report always shows 0% eventhough I have test cases. Below is the relevant part of my build.xml <target name="instrumentClasses" depends="test"> <taskdef resource="undercover-ant.properties" classp...

When would my Python test suite file coverage not be 100%?

We are using Hudson and coverage.py to report the code coverage of our test suite. Hudson breaks down coverage into: packages files classes lines conditionals Coverage.py only reports coverage on files executed/imported during the tests, and so it seems is oblivious to any files not executed during the tests. Is there ever an instanc...

how to make my code only alert 'gggg' , can not delete the first Statement using jquery

this is my code : <input type="button" value="edit" id="edit"/> <script type="text/javascript" src="jquery-1.4.2.js"></script> <script type="text/javascript"> $('input').click(function(){ alert('sss') }) $('input').click(function(){ alert('gggg') }) </script> and when i click the button,...