/
Jenkins Shared Library - mci_unittest

Jenkins Shared Library - mci_unittest

This Shared Library hosts a Custom Step which is an example implementation of the Unit Test step of a MettleCI Pipeline.

Here’s the pseudocode for the Shared Library:

def call( def ENVIRONMENTNAME ) { mettleci properties config // Configure Properties mettleci remote execute "config/cleanup_unittest.sh" // Cleanup results of previous unit tests mettleci remote upload // Unit test specifications and data mkdir // Create unit test report dir try { mettleci unittest test // Run Unit Tests } finally { // Whether the above is successfult or not... mettleci remote download // Download unit test reports if (exists 'unittest-reports/**/*.xml') { junit testResults 'unittest-reports/**/*.xml' // Publish Unit Test results } } }

Note that this Custom Step makes used of Jenkins' JUnit plugin.

 

Related content

Jenkins Shared Library - mci_deploy
Jenkins Shared Library - mci_deploy
More like this
Jenkins Shared Library - mci_compliance
Jenkins Shared Library - mci_compliance
More like this
MettleCI Example Pipeline for DevOps
MettleCI Example Pipeline for DevOps
Read with this
Using MettleCI Test Results in Jenkins
Using MettleCI Test Results in Jenkins
More like this
Jenkins Environment Variables
Jenkins Environment Variables
Read with this
Jenkins Shared Library - mci_ccmt
Jenkins Shared Library - mci_ccmt
More like this

© 2015-2024 Data Migrators Pty Ltd.