TFS vNext build Test Impact Analysis- Impacted unit tests are not running at all - visual-studio-2017

I have a VB Solution having 1 project and corresponding unit test project in it.
TIA is enabled. But during code check-in, impacted unit tests are not getting executed.
If I add any new method and then write the corresponding unit test, then TIA is running newly added unit test only as part of impacted unit test.
Any clue, why my impacted unit tests are not getting triggered.
Thanks in advance...

Related

Code Coverage in python without unit tests

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?

Sonarqube: Test coverage comes as 0

I am using sonar integration for the c# x unit test project. But always test coverage is coming as 0. How can I resolve this
coverlet is the nuget responsible for sonar integration to x unit test projects. Adding coverlet.msbuild and coverlet.collector nuget resolve the issue.

How to unit test in ScriptSharp

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.

TfsBuild does not run unit tests

I'm using tfs 2010 and I want to create a tfsbuild defintion that runs unit tests.
I created unit tests and it works perfectly on my local machine.
I created a build definition, enabled tests, opened automated tests and put the vsmdi file.
the build succeed but it does not run any tests. In the build log file I don't find any information about the number of tests ran, it just tell me no test results ,besides the TestResults Directory is empty.
Has any one an idea.
I finally found the Problem. The build platform is x86 but for the test project it's AnyCPU, that's why tfsbuild did not execute tests.

integration test - unit test seperation and best practices with visual studio 2010 + tfs

In our big application written with C# we have automated tests.
Some of tests are integration tests; they are mostly testing integration points with other systems, they are slower than unit tests and to get them to succeed on a new machine some configuration is needed.
Some are unit tests; they are much faster, do not need any configuration.
In related test projects we have two folders in general: UnitTest and IntegrationTest. Hence I have not an option to run them seperately.
What I need is, clear seperation between unit and integration tests. I want to be able to run only integration tests or just unit tests.
How can I achive this seperation? What are your experiences on the subject?
In visual studio go to the Test menu > Windows > Test List editor. All test methods can be selected/deselected in this window. At the top left click the arrow and choose Run checked tests or debug checked tests.
You can also use the TestCategory attribute (just Category in NUnit). Then run the tests in that category.
something like TestCategory("Unit") or TestCategory("Integration")