code: private void recordRunResults(@Nonnull Run<?, ?> build, @Nonnull FilePath workspace, @Nonnull Launcher launcher,
                                    @Nonnull TaskListener listener, List<String> mergedResultNames,
                                    List<String> fileSystemResultNames) throws InterruptedException, IOException {
  
  
          for (String resultFile : mergedResultNames) {
              JUnitResultArchiver jUnitResultArchiver = new JUnitResultArchiver(resultFile);
              jUnitResultArchiver.setKeepLongStdio(true);
              jUnitResultArchiver.setAllowEmptyResults(true);
              jUnitResultArchiver.perform(build, workspace, launcher, listener);
          }
  
          final TestResultAction tempAction = build.getAction(TestResultAction.class);
          if (tempAction == null || tempAction.getResult() == null) {
              listener.getLogger().println("RunResultRecorder: didn't find any test results to record");
              return;
          }
  
          TestResult result = tempAction.getResult();
  
  
          try {
              archiveTestsReport(build, listener, fileSystemResultNames, result, workspace);
          } catch (ParserConfigurationException | SAXException e) {
              listener.error(ARCHIVING_TEST_REPORTS_FAILED_DUE_TO_XML_PARSING_ERROR + e);
          }
  
          if ((runReportList != null) && !(runReportList.isEmpty())) {
              LrJobResults jobDataSet = null;
              try {
                  jobDataSet = buildJobDataset(listener);
              } catch (ParserConfigurationException | SAXException e) {
                  listener.error(ARCHIVING_TEST_REPORTS_FAILED_DUE_TO_XML_PARSING_ERROR + e);
              }
  
              if ((jobDataSet != null && !jobDataSet.getLrScenarioResults().isEmpty())) {
                  PerformanceJobReportAction performanceJobReportAction = build.getAction(PerformanceJobReportAction.class);
                  if (performanceJobReportAction != null) {
                      performanceJobReportAction.mergeResults(jobDataSet);
                  } else {
                      performanceJobReportAction = new PerformanceJobReportAction(build, jobDataSet);
                  }
                  build.replaceAction(performanceJobReportAction);
              }
          }
          publishLrReports(build);
      }
docs: Records LR test results copied in JUnit format
  
  @param build
  @param workspace
  @param launcher
  @param listener
  @param mergedResultNames
  @param fileSystemResultNames
  @throws InterruptedException
  @throws IOException