GithubHelp home page GithubHelp logo

fundacionjala / enforce-jenkins-plugin Goto Github PK

View Code? Open in Web Editor NEW
6.0 21.0 4.0 516 KB

Jenkins plugin that shows code coverage and unit test reports for Salesforce projects

Home Page: http://fundacionjala.github.io/enforce-gradle-plugin/

License: MIT License

Java 65.63% JavaScript 34.05% Shell 0.32%

enforce-jenkins-plugin's Introduction

Build Status license

EnForce Jenkins Plugin

This plugin allows you to capture code coverage information from EnForce gradle plugin.

The plugin will generate:

  • Code coverage percentage.

  • A pie chart with amount of test classes whose code coverage percentage is in the ranges defined as:

    • Danger (0% - 74%)
    • Risk (75% - 79%)
    • Acceptable (80% - 94%)
    • Safe(95% - 100%)

The EnForce jenkins plugin can be downloaded here.

Code Coverage chart

Displays the code coverage percent and also the coverage status categorized by type(Danger, Risk, Acceptable, Safe)

Coverage Percent

Prerequisites

This plugin depends of coverage.json file that is generated by runTest task of EnForce gradle plugin.

Why this plugin?

This plugin is a good fit for generating code coverage information of your Salesforce organization and also you can configure the minimum coverage percentage in your jenkins job.

Features

  • It generates code coverage percentage of your organization.
  • It generates a pie chart with amount of test classes whose code coverage percentage is in the ranges that were defined above.
  • It changes the build job status to fail according minimum code coverage percentage configured.

Installation

  • Install the plugin in Jenkins.
    • The plugin is hosted on the Bintray repository
    • Go to Jenkins -> Manage Plugins -> Advanced
    • Search section Upload Plugin
    • Choose enforce-jenkins-plugin.hpi file
    • And upload it
    • Ensure you restart Jenkins

Configuration

  • Configure the plugin in Jenkins.
    • Select your job.
    • Go to Configure -> Add post-build action
    • Search Publish EnForce Coverage Report option
    • Set Coverage JSON file name
    • Set Minimum coverage percentage
      If the code coverage percent is less than the defined Minimum coverage percentage value, the build is considered unstable.

Configure the plugin in Jenkins

Token Macros

The following macros are provided to be integrated to any other plugin(E.G. Email-ext plugin ) that consumes Token Macro Plugin infrastructure.

  • ENFORCE_COVERAGE_RESULT
  • ENFORCE_COVERAGE_STATUS
  • ENFORCE_TEST_RESULT

Usage

They are able to be used within a expression definition. E.G. It is a default email content for Email-ext plugin

$PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS:

$ENFORCE_COVERAGE_RESULT
$ENFORCE_COVERAGE_STATUS
$ENFORCE_TEST_RESULT

Check console output at $BUILD_URL to view the results.

enforce-jenkins-plugin's People

Contributors

naverus avatar marcocdlv avatar ziur avatar

Stargazers

Luis Piedra avatar Iñaki Hernando Urcullu avatar Eugene Rusalev avatar Ma Csi avatar  avatar Rodrigo Ruiz avatar

Watchers

Paolo Castro avatar  avatar James Cloos avatar Iñaki Hernando Urcullu avatar Diéffrei Quadros avatar Rodrigo Ruiz avatar Alex Ventura avatar mk avatar Adrian Grajeda avatar Esteban avatar Fernando Hurtado avatar  avatar Ariel Patino avatar  avatar  avatar  avatar  avatar Jose Cabrera avatar  avatar Vicente Rodriguez avatar Jimmy Rojas avatar

enforce-jenkins-plugin's Issues

Admin Operation already inprogress

Hi Team,

This plugin looks very cool and it gives a very detailed report for salesforce code coverage. but we faced some issues while running. It throws the admin operation already in-progress while executing the runTest Task. Please help us to fix this ASAP.

I have attached the screenshot of my error below,

Thanks in Advance

Raja
Code Coverage Error

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.