netblognet
netblognet

Reputation: 2016

Jenkins and Sonarqube - where to run unit tests

I'm just starting to mess about with continous integration. Therefore I wanted to set up Jenkins as also Sonarqube. While reading manuals/docs and tutorials I got a little bit confused.

For both systems, there are descriptions about how to set up unit test runners. So where should unit tests ideally be run? In Jenkins or in Sonarqube or in both systems? Where does it belong in theory/best practice?

Upvotes: 4

Views: 924

Answers (3)

Jiujiu
Jiujiu

Reputation: 180

We have configured Jenkins to launch the unit tests and the results are “forwarded” to Sonar to be interpreted as a post build action

Upvotes: 3

pradz_stack
pradz_stack

Reputation: 174

The Best practice would be running the Unit test in Jenkins. This would ensure the Unit test cases are executed before we Build/Deploy.

SonarQube is normally used to ensure the quality of the code which will point out the bad codes, based on the guidelines/rules.It also gives the report on the Unit test coverage, Lines of code etc.

Upvotes: 1

Joschi
Joschi

Reputation: 2128

Usually it's done in Jenkins as you want to actually test your code before building the module.

Upvotes: 0

Related Questions