code-coverage

Code coverage and test results for .NET Core projects in VSTS

北慕城南 提交于 2019-12-21 05:46:16
问题 How do we enable code coverage and test results for .NET Core projects in VSTS? Currently, it is not enabled for a .NET Core test task. 回答1: You can use Visual Studio Test task with /framework:".NETCoreApp,Version=v1.1" option to run .NET Core tests. (Specify vstest.console.exe path in a Visual Studio Test task: C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\Extensions\TestPlatform) An article about code coverage: Working with Code Coverage . But there is the issue

Profiling on live Django server?

元气小坏坏 提交于 2019-12-21 04:51:33
问题 I've never done code coverage in Python, but I'm looking for something like GCC 's gcov , which tells me how many times each line executes, or Apple's Shark which gives a hierarchial breakdown of how long each function is taking. My problem is that I have a live server which is experiencing high load, and I can't tell from the logs what's causing it. I would like to attach something to my Django instance to monitor which lines are the hottest and/or which functions are taking the longest time

Code coverage for people (manual) tests?

时间秒杀一切 提交于 2019-12-21 04:23:10
问题 Are there any code coverage tools for manual testing? For example, if I write 30 new lines of code, compile, then run, is there any way to quickly verify that all 30 lines were run? Also, later, after I've checked the code into an official build, is there any way that I can verify that the test department hit on all 30 lines of code when they conducted their independent testing? I know that there are a lot of tools for verifying that test departments test all requirements, but I haven't found

Eclemma says 1 of 4 branches not covered, but which branch is it?

ⅰ亾dé卋堺 提交于 2019-12-21 03:29:09
问题 Is there a simple way to tell which branch I am missing? I.e. I have some code like this: if (x || y) { // do stuff } In the coverage highlighting there is a yellow dot in Eclipse that says: 1 of 4 branches missed but I would like to know which branch is missing. 回答1: An open issue on the github repo for Eclemma's parent, jacoco, suggests that such a feature would actually be a bit difficult to include. However, even without an Eclemma feature, if the goal is just to figure out the branches

How to fail a maven build, if JUnit coverage falls below certain threshold

纵然是瞬间 提交于 2019-12-20 20:01:04
问题 I'm getting the Unit test coverage percentage metric from sonar rest api. How can I fail the build if it falls below a defined value? 回答1: JaCoCo offers that feature. JaCoCo with Configuration rules Define JaCoCo plugin using configuration rules COVEREDRATIO for LINE and BRANCH : <plugin> <groupId>org.jacoco</groupId> <artifactId>jacoco-maven-plugin</artifactId> <version>0.7.7.201606060606</version> <executions> <execution> <id>default-prepare-agent</id> <goals> <goal>prepare-agent</goal> <

Why emma doesn't give full coverage to finally blocks?

喜你入骨 提交于 2019-12-20 17:06:13
问题 I don't get why emma doesn't give full code coverage to "finally" blocks. I've made a short example program to demonstrate this. When I execute the program it shows: try finally So I don't get why finally is marked as red (not executed) and the "finally" "println" is marked yellow (partially executed). Am I missing something? How to make emma understand that the finally block is covered? Thank you! 回答1: There is an entry on this in the EMMA Faq: Implicit branches due to finally blocks.

C1 or C2 coverage tool for ruby [duplicate]

你说的曾经没有我的故事 提交于 2019-12-20 13:33:09
问题 This question already has answers here : Does C1 code coverage analysis exist for Ruby? [closed] (5 answers) Closed last year . Is there any tool for C1 or C2 code coverage for Ruby (1.9)? SimpleCov supports only C0, but maybe there is another tool. I'm aware that a similar question has been asked here, but it was a couple years ago and I hope that something has changed. 回答1: No, currently there is no tool that does that. There is also no technical limitation that avoids one to implement it,

What is the difference between a Seam and a Mock?

∥☆過路亽.° 提交于 2019-12-20 10:42:31
问题 Its being a few months since I am working with java legacy code, this are some of the things I am dealing with: 0% test coverage. Huge functions in occasions I even saw some with more than 300 lines of code. Lots of private methods and in occasions static methods. Highly tight coupled code. At the beginning I was very confused, I found difficult to use TDD in the legacy. After doing katas for weeks and practicing my unit testing and mocking skills, my fear has decreased and I feel a bit more

Code coverage for angular 2

夙愿已清 提交于 2019-12-20 10:34:19
问题 How do you find the code coverage for angular 2 code? Is there any plugin for vs code editor or webstorm that I can use? I am using Jasmine and Karma for unit testing of my code. 回答1: If you want to see overall test coverage statistics than of course in Angular CLI you can just type, and see the bottom of your command prompt window ng test --cc // or --code-coverage result: if you want to see component's individual coverage of tests follow these steps. npm install --save-dev karma-teamcity

Django test coverage vs code coverage

人走茶凉 提交于 2019-12-20 10:33:28
问题 I've successfully installed and configured django-nose with coverage Problem is that if I just run coverage for ./manage.py shell and exit out of that shell - it shows me 37% code coverage. I fully understand that executed code doesn't mean tested code. My only question is -- what now? What I'm envisioning is being able to import all the python modules and "settle down" before executing any tests, and directly communicating with coverage saying "Ok, start counting reached code here." Ideally