I have a python (Django) application for which I want to generate a code coverage report, but the solutions I have found on the internet mostly work with test runners or requires unit tests for example Coverage.py and pytest-cov. As I don't have unit tests for my code, is there any other options available that can do the coverage for my code without unit tests?
Related
When running ReSharper Unit Test Coverage in Visual Studio 2019 v.16.11.10 with ReSharper v.2021.3.3, the coverage on the files is not shown/run.
On the image, a snippet of the Unit Test Coverage is shown, where it is seen that the unit tests are run and how much of those tests are covered. Unfolding one of the packages that should be tested by the tests, it is possible to see that ReSharper cannot generate coverage. Is this because all the functionality is packed into the (1.0.0.0, .NETFramework, Version=v4.7.2)?
If this is the problem, is there any workaround? Or how do I get rid of the line if it causes any problems? If I then get rid of the line, will everything then be packaged in a different manner? Or will everything work the same as before?
One of the other projects in my team does not have this extra line where everything is packed into, and ReSharper can generate Unit Test Coverage as it should.
I am tying to do unit test using google test. But the gtest doesnt display the code coverage in the console. How can I get the code coverage of my unit test by using gtest?
Without an IDE integration, running F# unit tests is pretty cumbersome.
One needs to compile them and then pass the resulting dll to a test runner.
I want to find an easier way to run the kind of tests you find for problems on http://exercism.io/
Any ideas?
I am somewhat new to TeamCity. I have set it up for a Visual Studio solution.
I am using NUnit step to run unit tests and dotCover for code coverage. Problem is, there are particular parts of my code that I know are covered by unit tests but in the code coverage report, it shows them with zero coverage.
I know the DLLs are created just fine because I run a dir /s command and can see all the test DLLs.
The NUnit step uses MSIL 4.0 platform and the test path looks like this:
**/bin/Debug/*Tests.dll
There are no filters under code coverage.
Many tests are run. But there are some specific tests that are not present in the search report when I search.
Why is this happening and how do I fix it?
Can you please provide information about your NUnit step, especially about .Net Coverage (Filters).
Can you also confirm that tests are actually run?
Full build log (pasted in pastebin.com or such provider) would be also appreciated.
Stupid me. The DLL that was being ignored was spelled *Test.dll instead of *Tests.dll. I use *Tests.dll in my test path.
The issue got fixed once I changed it to *Test*.dll
We noticed that there was a unit testing project within the latest Script# 0.8 code on the Git repository, but there is no documentation as to how to actually use it, and the example files don't seem to work correctly.
Having stepped through the source code, we can't actually see any test code within the unit test files.
Has anyone else managed to successfully run unit tests against Script# within the Visual Studio IDE?
The AroundMe sample at https://github.com/nikhilk/scriptsharp/tree/cc/samples/AroundMe demonstrates unit testing.
In short, there are two parts -
1. The Tests subnamespace within your project containing tests alongside code being tested. Test code gets split out by the compiler to generate a Foo.test.js alongside Foo.js and Foo.debug.js.
A test project which provides a driver to launch unit tests in browser and capture results of QUnit to surface into VS unit testing UI. This is optional... you could run the Foo.test.js manually using QUnit yourself if you've got your own pipeline for executing tests.
Hope that helps.