title: Azure DevOps Pipelines - Publish Test Results
body: <p>I've followed all the steps in Publish Unit Test in this <a href="https://tharaka-madhusanka.medium.com/publish-execute-angular-unit-tests-in-azure-devops-build-pipeline-with-code-test-unit-test-c32288d59e8d" rel="nofollow noreferrer">article</a> but I have a problem which is</p>
  <blockquote>
  <p>##[warning]No test result files matching **/testresults/unit-test-result.xml were found.</p>
  </blockquote>
  <p>How do I solve it?
  I think the difference between the path for JUnit XML test result in the Pipeline and the path in the <code>karma.conf.js</code> is the problem.</p>
  <p>My Publish Test Results in devops</p>
  <p><img src="https://i.stack.imgur.com/3OoWU.png" alt="enter image description here" /></p>
  <p>My <code>karma.conf.js</code></p>
  <pre class="lang-js prettyprint-override"><code>// Karma configuration file, see link for more information
  // https://karma-runner.github.io/1.0/config/configuration-file.html
  
  const path = require('path');
  
  module.exports = function (config) {
    config.set({
      basePath: '.',
      frameworks: ['jasmine', '@angular-devkit/build-angular'],
      plugins: [
        require('karma-jasmine'),
        require('karma-chrome-launcher'),
        // require('karma-junit-reporter'),
        require('karma-coverage-istanbul-reporter'),
        require('@angular-devkit/build-angular/plugins/karma'),
        require('karma-junit-reporter'),
      ],
      client: {
        clearContext: false, // leave Jasmine Spec Runner output visible in browser
        captureConsole: Boolean(process.env.KARMA_ENABLE_CONSOLE),
      },
      // junitReporter: {
      //   outputDir: path.join(__dirname, './reports/junit/'),
      //   outputFile: 'TESTS-xunit.xml',
      //   useBrowserName: false,
      //   suite: '', // Will become the package name attribute in xml testsuite element
      // },
      junitReporter: {
        outputDir: 'testresults/junit',
        outputFile: 'unit-test-result.xml',
        useBrowserName: false,
      },
      coverageIstanbulReporter: {
        reports: ['html', 'lcovonly', 'text-summary'],
        dir: path.join(__dirname, './reports/coverage'),
        fixWebpackSourcePaths: true,
      },
      // reporters: ['progress', 'junit'],
      
      reporters: ['progress', 'kjhtml', 'junit'],
      port: 9876,
      colors: true,
      // Level of logging, can be: LOG_DISABLE || LOG_ERROR || LOG_WARN || LOG_INFO || LOG_DEBUG
      logLevel: config.LOG_INFO,
      autoWatch: true,
      browsers: ['ChromeHeadless'],
      singleRun: false,
      restartOnFileChange: true,
    });
  };
  </code></pre>