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.
Jenkins Installation for Mac
Install the required version of Jenkins.
Download the specific version "jenkins.war" (e.g., version 2.401.1).
Navigate to the download folder using the terminal: cd Downloads
List all items in the Downloads folder: ls
Run Jenkins on a different port since the default port 8080 might be in use: java -jar jenkins.war --httpPort=9090
Search for Maven in the terminal: brew search mvn
Install Maven: brew install mvn
Install JDK. Once Jenkins is running, go to Dashboard > Manage Jenkins > Tools, fill in the JDK details, and set the “Java_home.”
Install maven, Once Jenkins is running, go to Dashboard > Manage Jenkins > Tools, fill in the maven details, and set the “maven_home”. refer screenshot.
After Jenkins Installation
Log in to the Jenkins instance.
Create a project of type "freestyle project" by clicking on "New Item" and then "OK".
Configuration:
Install the Jenkins Plugin for RMsis:
Go to Manage Jenkins > System Configuration.
Under System Configuration, click on "Plugins".
Click on the gear icon for "Advanced Settings" on the left side of the Jenkins dashboard.
Upload the RMsis Plugin for Jenkins. Download it from the following link: RMsis Jenkins Plugin
Deploy the plugin and configure the Jira RMsis Server:
Open Jenkins Global Configuration.
Navigate to Dashboard > Manage Jenkins > System > Jira RMsis Server Configuration.
Input credentials to access the JIRA+RMsis server.
Multiple Jira RMsis Server instances can be stored here, e.g., test and production instances.
Required details include:
Jira Base URL
Username
Password
Click on "Test Configuration" to verify the details and then Save the configuration. Refer to the attached image for Global configuration.
RMsis Configuration
In RMsis, create a Test case custom field of type text to store test details.
Project Configuration
Fork and clone the repository of simple-java-maven-app from the given URL: Simple Java Maven App Repository
Open Jenkins Item/job configuration and switch to "Source Code Management", choose Git, and fill in the required credentials. Save the configuration.
Build Configuration
Switch to the "Build Steps" section and add "Invoke top-level Maven targets". Define Maven version and goals. Refer to the attached screenshot. Save this configuration.
Post-build Configuration
In the Post-build Actions section, add "Publish JUnit test result report" available under the "Add post-build action" dropdown.
Point to Test report XMLs. Results stored in this report will be used by Jenkins Plugin for RMsis to update the Status field in Test Run.
Save all configurations.
RMsis Test Run Plugin Configuration
Add RMsis Test Run Plugin for Jenkins available under "Add post-build action" dropdown.
Populate details of the test run to be updated after the build process. Select:
Jira RMsis Instance
Project Name
Test Run
Method Name Custom Field
Refer to the attached image for Test Run details.
Options will be fetched from RMsis and populated automatically using the details provided earlier in Global configuration. If not, verify the credentials under Manage Jenkins > System configuration > Jira RMsis Server Configuration.
Switch to Test Cases in RMsis and map RMsis Test cases with JUnit tests.
Execute the build in Jenkins. The status will be updated once the build process is complete.
Before execution of the build please make sure that the test cases should be binded with the method name with a created custom text field.
Copy this method name along with the custom field test cases created in RMsis to bind it with Jenkins.
Reload the Test Run table in RMsis to see the updated status.
Note: Constructor name should be mapped with the test case once build is ready click on “test result” option of the existing test project, navigate to the
“com.mycompany.app > AppTest > testAppConstructor/ testAppMessage.”