Build Stability Plugin Teamcity SonarQube - build

Is there a plugin similar to build stability plugin in SonarQube to report on build metrics? I am using a Teamcity continuous integration server?

There's no such a plugin in the SonarQube ecosystem.

Related

TFS 2015 running vNext build and test on same machine

Are there any issues with running a vNext build agent on the same machine that is running Functional Tests? My plan is to have an agent pool that consists primarily of test machines where each build agent has a one-to-one relationship to running functional tests on each respective machine.
Yes, you have the ability to run some Unit Tests both on a machine different from that one is running the build and on the same machine.
To select build agent in a pool which include multiple agents:
You can add a User Capability to that specific build agent then in the
build definition you put that capability as a demand (General tab)
How to specify a build agent in vNext build
About how to configure build pipeline and deploy test agent, you could refer below tutorials:
Running Automated Test on agent machine using vNext Build
TFS — Setup CI/CD pipeline for automated functional tests
Hope this helps.

TFS 2017 - Build and Release

I am very new in TFS, need to implement CICD using TFS 2017 and its build and release feature,
when I tried to run build after creating build definition, I got error like no agent found, I googled and found how to configure agent, but I have logical confusion in my mind as below:
How Agent works with TFS 2017?
Where process of CI will be run on Agent or on TFS server?
Where I need to have msbuild ? where my built code will be placed?
What other dependencies would be there on Agent machine?
all question might be silly but as I have worked with Jenkins and Git, i dont have knowledge of Microsoft technologies, and I can't find well documents for the same.
How Agent works with TFS 2017?
In short to build with TFS, you need to Deploy an agent, in the agent machine you need to install the proper build components/SDKs accordingly based on your project.
Create a build definition. Once a build is triggered , the sources will be downloaded from the TFS repository to the agent machine and then build in the agent machine.
Related documents : Agent pools and queues; Build and Release Agents; Build definition options
Where process of CI will be run on Agent or on TFS server?
You can eanble the CI (turn on the Continuous integration trigger) in build definition. See Configure continuous integration for details. Thus the build will automatically be triggered once changes are checked in.
Related documents: A quick introduction to CI/CD ; Build and release
Where I need to have msbuild ? where my built code will be placed?
For vNext build, it's task based build system. You can define your build definition based on the tasks. See Build and release tasks .
e.g.: You can use MSBuild or Visual Studio Build task, you can specify the MSBuild Arguments as needed.
You can use the utility task: Copy and Publish Build Artifacts and Publish Build Artifacts to specify where the built code will be placed. (Artifact Type : Server/File share path)
What other dependencies would be there on Agent machine?
Refer to the answer for the first question.

cordova plugin unit testing

Most of the Cordova plugins have a folder called 'tests', which hosts plugin.xml and tests.js. Can anyone shed some light on how to run them, and what is required to run? There seems no relevant documentation. Thanks!
There's an official Cordova library for running the unit tests.
From the Cordova Plugin Test Framework on github:
The org.apache.cordova.test-framework plugin does two things:
Defines the interface for cordova plugins to write tests
Provides a test harness for actually running those tests
Tests run directly
inside existing cordova projects, so you can rapidly switch between
testing and development. You can also be sure that your test suite is
testing the exact versions of plugins and platforms that your app is
using.
Visit that page; there's plenty of information there on running existing tests and using the framework for your own plugins.
There is also a plugin called cordova-paramedic, based on cordova-test-framework which automates manual steps like modifying config.xml:
cd cordova-plugin-name && npm install cordova-paramedic && node node_modules/cordova-paramedic/main.js --platform android --plugin ./ --verbose

Sonarqube 4.3 dont trigger Cobertura unit test execution on Jenkins

we had SonarQube v3.4 and recently upgraded to SonarQube V4.3. Also we use Jenkins to build and trigger sonar analysis on Maven projects and Cobertura as the code coverage tool.
In the version 3.4, Sonar used to trigger (with Jenkins) the cobertura execution and collect the data, but when we upgraded to Sonar 4.3, there was no option in Sonar to select the default code-coverage tool, the Jenkins Sonar execution no longer triggers cobertura and unit test execution. Now it expects a Jacoco dump file in order to provide coverage data to sonar.
I cannot find any useful documentation in Sonarqube confluence.
How can we configure Sonar to use Cobertura (without modifying ALL the projects pom files) and trigger code coverage unit test execution from Jenkins?.
Thanks!.
Since version 2.2 of Java Plugin and 1.6 of Cobertura plugin, SonarQube does not trigger unit test execution anymore : Only reuse report mode is available.
Please note that the recommended version for both of those plugins are the fixed versions Java 2.2.1 and Cobertura 1.6.1 to prevent the collision between JaCoCo and Cobertura plugin (which will happen with 2.2).
Because of all this, the property to select the default code coverage tool is not relevant anymore and you only have to provide a coverage report (either cobertura or JaCoCo) to get your coverage information.
Please refer to these piece of documentation to get a rough idea on how to do so :
http://docs.codehaus.org/display/SONAR/Cobertura+Plugin
http://docs.codehaus.org/display/SONAR/JaCoCo+Plugin

Running NUnit tests in TeamCity 6.5.X with NUnit addins

We are using TeamCity 6.5.1 to manage the compilation, testing and deployment of our builds. Up until now we have been using the NUnit Build Runner from TeamCity to run our tests with NUnit 2.5.8 and had great success.
http://confluence.jetbrains.com/display/TCD65/NUnit
All of our tests are written in C# and .Net 4.0 using Visual Studio 2010. The test projects are compiled into an assembly that we reference through the TeamCity interface.
Now we are adding in a new test project for UI tests that require a custom NUnit addin that we developed to extend the native NUnit functionality. When running the tests in a local development environment with NUnit 2.5.8 installed we are able to place the custom addin in the NUnit addins directory. When NUnit is loaded our addin is picked up automatically.
C:\Program Files (x86)\NUnit 2.5.8\bin\net-2.0\addins
Using the NUnit Build Runner in TeamCity 6.5.1 we cannot see of a way to install our addin. Unlike the native installation of NUnit, TeamCity does not appear to pick up an addin just by placing it inside a sub directory of the NUnit installation.
Does anyone know of a way to install/use an addin using the NUnit Build Runner? Existing documentation discusses the NUnit command line console runner which we are not using. We are using the NUnit Build Runner as the method to run all of our tests so it would be most ideal if we could maintain a standard testing mechanism.
Thank you!
I was trying to solve the same problem.
As I found out TeamCity uses its assembly Nunit.
Therefore there is no possibility of expansion. You can use the command line to run tests via Nunit. And TeamCity use step "Build Failure Conditions" for reading logs and view the results.