how do we get separate report in sonarqube 6.5+ - maven

We would like to get unit tests and integration tests reported separately in sonarqube 6.+. currently, it shows full tests coverage.

This is not possible, SonarQube does accept coverage data from multiple sources, and it then merges them.
You should use your individual test/coverage tools to further distinguish between different types of coverage.

Related

How to get SonarCube project unit test converge per user?

Is there an API to get the SonarCube project, unit test converge per user, if not can we derive the user-wise coverage from other API responses?
I think you're confused about what test coverage means. It measures the number of lines in your business logic that is "covered" by automated unit tests. It's not something that is measured at runtime, nor does it have anything to do with "users".

What is the difference between SonarQube and Checkmarx CxSAST & CxSCA?

I have integrated SonarQube and Checkmarx SAST and SCA into the Azure DevOps build pipeline. I am able to see both the SonarQube and Checkmarx reports without any issues.
I have the following questions. Could someone please clarify:
What is the difference between SonarQube and Checkmarx CxSAST?
What is the common thing between these two?
In which situations are SonarQube and Checkmarx preferred?
If I were to boil it down to a short phrase, SonarQube is used for ensuring code quality, and CheckMarx is used for ensuring the security of a system running that code.
SonarQube looks at several areas, including the code coverage percentage of unit tests of the code, duplication percentages, and also code quality issues found through static analysis of the code.
CheckMarx, on the other hand, just analyzes the flow of the code and the inputs and outputs. It looks for situations where inputs that could have been provided by an end user are used directly to control behavior, and other "attack vectors".

How to configure CI to increase the percentage of test coverage before each Merge Request?

My company uses GitLab CI, unit / integration test coverage at the moment is about 60% for the project I'm working on.
We use the JaCoCo library to calculate test coverage. Is there a way to configure GitLab CI in such a way that it would be possible to merge new code only if the coverage was increased (by 0.2-0.5% for example)?

Creating a custom maven test report

I am trying to create a custom test report using Maven as my build tool, JUnit as my framework, along with selenium test cases. I was using maven's surefire report plugin but I need to include more information in my report. Can anyone direct me to a good tutorial on how to create a custom maven reporting tool?
We have a much better test automation dashboard based on just few api calls, ARES dashboard (built under Testastra and owned by ZenQ) is a much better option to try and it's absolutely free.
ARES, is an acronym for Test Automation Results dashboard. It's a TestAutomation framework/tool agonistic solution, that simplifies the collection of Test automation results and their analysis via live dashboard, daily/weekly trends, frequent failures etc. Website: http://www.testastra.com/#ares
Below repo has some code samples, documentation and usage of ARES test automation dashboard:https://github.com/testastra/ARES
Give it a try.

how to use Jmeter as CI solution

I have a general question about Jmeter. I am using Jmeter and I want to create Continuous integration solution using Jmeter. The problem is that there are several QA, that each one of them have test plans according his development. the problem is that if using Jmeter all test plan need to run as one test plan, and for each of test plan to create report, and than manually over each report and check for failed scenarios. So all the handling is much harder than I thought, Jmeter is wonderful solution but how to use it with several test plans, and if I want it to run nightly? and in the mornng to get single report with all test plans that created? Can someone please advise if Jmeter can be solution for CI nightly? is it possible to merge all reports to single report?, each test plan is for unique development, and we will have multiple testplans over time
Did you have a look at those plugins:
https://github.com/jmeter-maven-plugin/jmeter-maven-plugin which allows you to fail a build based on presence of errors in load test results which you could mix with https://jmeter-plugins.org/wiki/AutoStop/
https://plugins.jenkins.io/performance
JMeter per se is just a load testing tool, you need a continuous integration server. If you don't have one in your company there are several free and open source solutions you can consider like:
Jenkins
Buildbot
Cruise Control
Check out Jenkins vs. Other Open Source Continuous Integration Servers article to learn more about aforementioned tools, see sample build dashboards and commands to kick off a JMeter test.

Resources