Jenkins Plugin for RMsis
This is a plugin for Jenkins which can be used to update Status of Test cases in Test run created inside RMsis. This plugin uses RMsis APIs to facilitate Test Case status update within Jenkins build process. Once the configuration is complete, the Status field will be automatically updated after each build.
Prerequisite
- Jira+RMsis installation which is up and running.
- RMsis APIs based on GraphQL are available from RMsis v1.8.9.4-r350 onwards.
- If you are using an older version, you will have to upgrade your RMsis to version 1.8.9.4 or later to use this plugin.
- Jenkins installation with an item/project containing JUnit tests which uses surefire reports to populate test results after completing the build process.
Links
- Jenkins Plugin for RMsis can be Downloaded from following link: https://products.optimizory.com/rmsis/by/file/rmsis-jenkins.hpi
- Source Code of the plugin is available here: https://github.com/Optimizory/RMsis-Jenkins
- Documentation for RMsis APIs is available here: https://docs.optimizory.com/x/i57B
Configuration
- Install Jenkins Plugin for RMsis in Jenkins.
- Switch to Manage Jenkins > Manage Plugins > Advanced tab
- Upload RMsis Plugin for Jenkins by downloading it from the above mentioned link.
- See attached image for reference.
- Once the plugin is deployed, Jira RMsis Server Configuration will become available inside Jenkins Global Configuration page.
- Open Jenkins Global configuration page and add details regarding the Jira-RMsis server
- Switch to Manage Jenkins > Configure System > Jira RMsis Server Configuration
- Insert credentials to access JIRA+RMsis server.
- Please note that details of multiple Jira RMsis Server instances can be stored here.
- For example, test instance and production instance.
- You will need the following details
- Jira Base URL: URL used to access JIRA.
- Username: Username which will be used to access RMsis.
- Password: Password of the user.
- Click on Test configuration to verify the details and and Save the configuration.
- See attached image for reference to Global configuration.
- Open RMsis and create a Test case custom field of type text. This field will be used to store details of the test to which the test case will be associated.
- Switch to Project Configuration tab in RMsis and create a Test Case custom field.
- See attached image for reference to custom field creation.
- Open one of your existing Jenkins Item/job configuration and switch to Post-build Actions section
- Add Publish JUnit test result report available under "Add post-build action" dropdown.
- You will need to point to Test report XMLs.
- Results stored in this report will be used by Jenkins Plugin for RMsis to update Status field in Test Run.
- Add RMsis Test Run Plugin for Jenkins available under "Add post-build action" dropdown.
- Populate details of the test run which is to be updated after the build process.
- You will need the select the following details:
- Jira RMsis Instance: Configured earlier in Global Settings.
- Project Name: Name of Project in which test run is present.
- Test Run: Name of test run available in above project.
- Method Name Custom Field: Test case Custom field of type "Text" that contain full name of JUnit test cases <package>.<class>.<method>, e.g. surefire.demo.JunitTest.unittest
- See attached image for reference to Test Run details.
- Please note that the options will be fetched from RMsis and populated automatically using the details provided earlier in Global configuration.
- If the options are not being populated, please verify the credentials once again by switching to Manage Jenkins > Configure System > Jira RMsis Server Configuration.
- Save Post-build Actions details by clicking on Save button.
- See attached image for reference to Post-build Actions.
- Add Publish JUnit test result report available under "Add post-build action" dropdown.
- Switch to Test Cases in RMsis and map RMsis Test cases with JUnit tests by populating full name of JUnit test cases <package>.<class>.<method>, e.g. surefire.demo.JunitTest.unittest
- Switch to Jenkins and execute build. The status will be updated once the build process is complete.
- Reload Test Run table in RMsis to see the updated Status.