I am using eclipse Mars with pydev.
the python coverage module version is 3.7.1. It is installed with pip.
On the code coverage view there is no checkbox for "Enable code coverage for new launches?". The text is there, just there is no control associated.
I see "0%" everywhere in the Cover column, even after refreshing with hand.
The file /home/mag/workspace-mars/.metadata/.plugins/org.python.pydev.debug/coverage/.coverage is 50 byte binary. If I remove it before running unit tests, it reapears. My guess that this file is empty.
I did delete all interpreters in Pydev/Interpreters/Python interpreters and find them again with "quick auto-config.
This was an overlook from my part. There is actually a checkbox near "Enable coverage for new launches", just it is not visible.
I have clicked above the other two checkboxes, and voila. A check sign appeared, and coverage reports are shown.
Related
I recently switched to Texmaker, as it compiles faster compared to web-based solutions, i.e., Overleaf.
I like the F1 shortcut for performing a Quick build. However, it seems that Quick build only works when I am viewing main.tex. For example, if I am editing a sub-document, e.g., intro.tex and I press F1 or click on Quick build, I get an error about Missing \begin{document} (it seems that Texmaker is trying to compile intro.tex independently). However, when I switch the editor to main.tex, which has the command \input{intro.tex}, the compilation is successful.
My question is: is there a way to Quick build the document when viewing any sub-document in the directory?
Many thanks in advance.
Yes! There is a build in option in Texmaker for that exact problem. While viewing the master file (so the file that contains \begin{document} and \end{document}), go to Options > Define Current Document as 'Master Document'.
After you've done that, Texmaker will always compile the master file, even while you're viewing another file. You can return to the normal mode by just toggling the option again. The shortcut for it is Ctrl+0 by default.
I have gone through the Opencover wiki documentation and tried a lot to figure out what would be the filter criteria for not to include test assembly as part of code coverage. Here is the problem
for eg I have many assemblies starts with sample name like sample.submodule.assembly1.dll, sample.submodule.assembly2.dll, my tests assembly also starts with sample like sample.submodule.tests.dll, here I applied the filter criteria for openCover
1.-filter: "+[sample*]* -[*tests]*"
it didn't work, not generating report file.
-filter: "+[sample*]* -[sample.submodule.tests]*" didn't work, not generating report file,
-filter: "+[sample*]* -[*]*tests*" didn't work, not generating report file too,
can somebody please advise what can be the filter criteria here to exclude all the test files from code coverage
First run OpenCover without any filters.
Now you can look at the XML report produced (or you can use ReportGenerator to turn it into HTML) and identify assemblies/modules that you wish to exclude.
now you can apply filters using the filter switch e.g.
-filter:"+[*]* -[*.tests]* -[*.Tests]*"
NOTE: no space between : and first "
or
"-filter:+[*]* -[*.tests]* -[*.Tests]*"
if you are talking about writing unit test using visual studio nunit adaptor then you have open cover UI visual studio extension available for all such purpose. it is wonderful.
Step 1) Install open cover from latest relese build https://github.com/opencover/opencover/releases
Step 2) Usuall it will install C:\Users\goma1940\AppData\Local\Apps\OpenCover (%localappdata%\Apps\OpenCover)
Steo 3) Install VS Extn from gallery https://visualstudiogallery.msdn.microsoft.com/6950a046-8919-4935-8542-c6f37956f688
Step 4) you have open cover test explorer and open cover coverage result pane as below…
I have some problems in configuring Sampling Profiler (http://www.delphitools.info/samplingprofiler/)
I compiled a test application in debug build configuration, the relevant detailed map file is generated and use debug .dcus option is set to true. Here below the screenshots of the compiler configuration.
I ran the application from Sampling Profiler with the configuration here below and after having performed a few tasks I stopped the profiling.
I cannot see any of the lines I coded in the reports and I can see very few units names I coded. The vast majority of the units shown are third part components I use.
Where am I doing wrong ?
It seems that Sampling Profiler does not pick up the browsing path correctly as selected (I have the same issue with a project in XE).
So until that will get fixed you might add the source paths manually ("Custom Source Files Search Path" below the drop down list for the Delphi versions)
However in the function you selected in your screenshot it will not show the correct code because the function is located in the getmem.inc file which is included in the System.pas.
Recently I started using BullseyeCoverage.
I'm going through the steps: compiling with BullseyeCoverage, running some test cases on the binaries created, generating a coverage report.
In the coverage report there are: function coverage, and condition/decision coverage. However, there is no line coverage. I tried to find a way of generating line coverage statistics, unsuccessfully. I thought of using covbr to this end, but, I need something that will cover all of my sources altogether.
Thanks for your help!
Bullseye does not support line coverage (which is also called statement coverage).For reasons, see http://www.bullseye.com/statementCoverage.html
I am using PartCover 2.2/2.3(trying with both) on win 7 x64. After generating report and selecting view coverage details, I can see for each method the code coverage. When I click on a method I see on the right list with block, block length, visit count and has source(set to yes).
I am using the money project from NUnit 2.5.2 samples.
However, it doesn't fill the code like shown here http://www.csharpcity.com/using-partcover-and-nunit-for-code-coverage/.
I haven't checked anything, everything is default.
Can you tell me how I can see the coverage code?
Thank you
Wrong assembly reference. Solved