Can Diffblue be integrated to Jenkins CI Pipeline?

As per the CI pipeline documentation , it can be configured using git lab , azure and github. Wanted to verify if same can be achieved for Jenkins CI pipeline . And steps needed for same.

Hi @rsood22,

Thanks for getting in touch

We do support integration into a Jenkins pipeline; it is very similar to the way we integrate with all other CI pipeline orchestration tools. The general process is:

  1. Create a git diff patch file for the code change which you want to generate tests for. This ensures Diffblue Cover only updates and adds tests for code that has been changed rather than the whole branch.
  2. Run dcover create with the -p option to generate tests using the patch file
  3. Commit these new tests to the branch

Here is an example stage that you add to your Jenkinsfile

stage('Diffblue') {
    steps {
        sh "git diff origin/master > change.patch"
        sh "/opt/diffblue/dcover create -p change.patch"
        sh "rm change.patch"
        sh "git add *.java"
        sh "git commit -m Update Diffblue Tests"
        sh "git push"
    }
}

Please let me know if you have any further questions or if you would like me to take you through a demo of the pipeline, I would be glad to help

Thanks and have a great weekend

Matt @ Diffblue

Wanted to understand from where can i download the CI plugin for Diff blue for Jenkins.

Hi @rsood22,

The CI integrations are available as part of the DevOps or Enterprise packages - Plans and Pricing | Diffblue

If this is something that would interest you then I would be happy to set up a demo and/or a proof of concept

Thanks

Matt @ Diffblue