Coder Social home page Coder Social logo

gradle-jacoco-sonar-spock's Introduction

Topera's Hello World #008

Code coverage in SonarClould using JaCoCo (Groovy/Spock version)

This hello world is a small program that uses JaCoCo to generate code coverage. The coverage results can be automatically interpreted by SonarCloud.

The tests here are written in Groovy with Spock.

Generating report locally:

  • $ cd gradle-jacoco-sonar-spock
  • $ gradle jacocoTestReport
  • The code coverage report is generated in ./build/reports/jacoco/test/html/index.html

Test with SonarCloud

  • Edit 'organization' in gradle.properties
  • Create a token in SonarCloud (https://sonarcloud.io/account/security/) and use the token in command below
  • $ gradle sonarqube -Dsonar.login=a72955e0d........
  • Your source code will be sent to SonarCloud and in few seconds you can check the result in
  • Important: if you create an environment variable called SONAR_TOKEN will NOT solve your authentication problem.
    • This variable is read by Travis-CI not by Gradle or Sonar.

Tech Stack

  • IntelliJ IDEA 2016.1.4
  • Gradle 4.0
  • Spock 1.1
  • Groovy 2.4.12

To take a look in other projects, please see https://github.com/topera/index

gradle-jacoco-sonar-spock's People

Contributors

topera avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.