I am trying to publish test results in azure but i am unable to do it. Its my second day with azure so i may be missing something.
My pipeline code is
- task: PublishTestResults@2
inputs:
testResultsFormat: 'JUnit'
testResultsFiles: '**/test-*.xml'
karma.conf.js
junitReporter: {
outputDir: '.',
outputFile:'test-report.xml'
},
And I am using the latest ubuntu. But always when I run pipeline I get this error
##[warning]No test result files matching **/test-*.xml were found.
I tried lowercase uppercase but nothing works and I don't know what I am doing wrong. I will be thankful for any hints.



Your PublishTestResults task specifies JUnit, but you need to make sure karma is generating JUnit reports. The snippet you show from karma.conf.js is not enough to verify that.
Did you install karma-junit-reporter npm package?
Did you add karma-junit-reporter in karma.conf.js plugins array?
Did you add junit in karma.conf.js reporters array?
Then make sure the PublishTestResults task has the correct pattern. Mine looks like this because I don't specify any junitReporter settings, which you show in your example.
I learned a lot from this example: https://www.olivercoding.com/2020-01-02-angular-azure-devops/