Answers: <p>Unit testing in an alternate CD/CI platform would be overkill in every situation I've built one.  The shared-pipeline code repo you connect to Jenkins will be triggered by a Jenkinsfile.  I suggest you define any and all testing in that particular Jenkinsfile - and keep this one simple enough that extensive testing of the Jenkinsfile defining tests for your Jenkinsfile does not also need a Jenkinsfile defining tests.</p>
  
Answers: CC BY-SA 3.0
Answers: 2017-10-28T01:45:48.993Z
Answers: 2017-10-28T01:45:48.993Z
Answers: esoterydactyl
Body: <p>According to <a href="https://github.com/lesfurets/JenkinsPipelineUnit" rel="nofollow noreferrer">this github repo</a> it is possible to test the Jenkinsfile, but this is run by Jenkins and if there are issues it will not run. Should one run such unit test in another CI? What are best practices to solve this issue?</p>
  
Comments: CC BY-SA 3.0
Comments: 2017-09-27T07:21:37.990Z
Comments: related question: https://devops.stackexchange.com/questions/1866/testing-jenkins-jobs-and-pipelines?rq=1
Comments: jayhendren
Tags: <jenkins-pipeline><testing>
Title: What are best practices for running Pipeline tests into a CI framework?
UserDisplayName: 030
ThreadText: # What are best practices for running Pipeline tests into a CI framework?
  
  (Asked by: username_0 on 2017-09-26)
  
  According to [this github repo](https://github.com/lesfurets/JenkinsPipelineUnit) it is possible to test the Jenkinsfile, but this is run by Jenkins and if there are issues it will not run. Should one run such unit test in another CI? What are best practices to solve this issue?
  
  **Tags:** jenkins-pipeline, testing
  
  > **Comments:**
  > **username_1**: related question: https://devops.stackexchange.com/questions/1866/testing-jenkins-jobs-and-pipelines?rq=1  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2017-10-28. Score: 2 | Accepted answer
  
  Unit testing in an alternate CD/CI platform would be overkill in every situation I've built one. The shared-pipeline code repo you connect to Jenkins will be triggered by a Jenkinsfile. I suggest you define any and all testing in that particular Jenkinsfile - and keep this one simple enough that extensive testing of the Jenkinsfile defining tests for your Jenkinsfile does not also need a Jenkinsfile defining tests.
  
  
  ---
  
  