How to troubleshoot tests not being injected from Jenkins to Octane

  • KM03392512
  • 08-Apr-2019
  • 09-Oct-2019

Summary

Explanation of how to troubleshoot tests not being injected from Jenkins to Octane

Question

This article presents main steps or action items to follow when test results are not injected from Jenkins into Octane.

Answer

Tests injection is FLOW. Troubleshooting should follow the steps below:

 

  1. Check that the following setup is done in Octane and works:

 

  • CI Server (Jenkins in this case) has the relevant entity in CI Servers in DevOps tab in admin page and it is considered as *connected* (has small green V in the Is connected column)
  • Moving to application, find the Pipeline created from the relevant root job of the CI Server mentioned above:
    • In order to see pipeline’s root job, inspect pipeline’s topology in the Topology tab in pipeline’s details view.
      OR
    • Right click on pipeline’s bucket in the Pipelines view in the horizontal list above and select “view in CI” option – this will open the root job in the CI Server in a separate tab

 

  1. Check that build events are delivered correctly to Octane. Build events will ensure that tests injection will get the correct context and are a prerequisite for that:

 

Run the root job either from Jenkins or Octane (system works identically for both flows). You will see in Octane’s UI in pipeline view of the pipeline that progress has been started, tree on the left side should show a live view of currently running jobs etc. At the end of the run you will see the  new pipeline run in Octane’s UI, aligned with CI Server from perspective of times, build numbers etc.

 

            Results:

  1. If there is no progress observed in Octane’s UI for the pipeline, there is a problem with either configuration of connectivity – you need to handle this first.
  2. If the progress is fine and the build events are pushed to Octane correctly, continue with specifically test results push.

 

  1. Go to Jenkins UI of the job and/or build and ensure that Jenkins itself got notified about test results. Usually this is seen as few places in the screen mentioning test results number of the build or some graph of test results trend in job’s view. Publishing test results to Jenkins as an absolute prerequisite for Octane’s plugin to find them and push to Octane.

 

If test results are not published to Jenkins, please refer to some web resource explaining “how to publish jUnit test results in Jenkins”.

 

  1. If/when ensured that test results are made available for Jenkins and still no results in Octane, check Octane’s plugin logs in Jenkins:
     

Check the logs on the Jenkins’ master machine to see some abnormal signs there. Octane’s plugin logs are accessible from Web UI of Jenkins, going to the URL below: http[s]://<Jenkins_host>:<Jenkins_port>/userContent/nga/logs

 

  1. In the last log file, look for the logger from TestResultsService stating that test results of such and such job #build were found and pushed to Octane. Find the relevant job and build number of troubleshot pipeline.

 

  • If the notion is found in the log and the result of the push is said to be okay – the  Jenkins and Octane’s plugin in Jenkins part was done correctly and there is some issue in Octane server accepting and processing the test results.

  • Otherwise, inspect the relevant error and probably propagate it to the support team.

 

  • If there is no mention in log regarding the test results, verify that you’ve published the test results as jUnit results as stated above.

 

  1. Check the logs of the slave to find if the build has been running on slave machine looking for any relevant errors there and also the end of the build’s log.

 

If you followed the instructions above and the issue isn’t resolved, please contact the support team using the support site: https://mysupport.microfocus.com/