Test execution data ignored for files?

Test files are ignored, cannot getting the unit test count?
image

Analysis Properties:
sonar.projectKey=
sonar.projectName=
sonar.sources=.
sonar.tests=test
sonar.test.inclusions=src//*.test.js
sonar.exclusions=
/.java
sonar.host.url=
sonar.projectVersion=1.0
sonar.login=sqp_ba3604bdbb3334ad37785926207426894649f7a8
sonar.javascript.lcov.reportPaths=lcov.info
sonar.test.inclusions=**/unittests/
.test.js
sonar.ts.tslintconfigpath=tslint.json
sonar.coverage.cobertura.xmlReportPaths=/var/lib/jenkins/workspace/Cicd/cobertura-coverage.xml
sonar.testExecutionReportPaths=test-report.xml
sonar.sourceEncoding=UTF-8

Logs:
Logs.txt (20.4 KB)

Workspace job folder on server:

After deployment on server:

You may want to read the answer here:

What format is your test-report.xml file in? Can you share a snippet?

Yes it is test-report.xml.
I have converted it in txt format to attach here easily
test-report.txt (19.1 KB)

Thanks.

Based on the logs, the scan is running in Jenkins while the test execution report was generated on someone’s local machine.

INFO: Imported test execution data for 0 files
INFO: Test execution data ignored for 2 unknown files, including:
/home/cicdanjalee/hk-backend-evolved/financialsService/test/serverisMonit.test.js
/home/cicdanjalee/hk-backend-evolved/financialsService/test/server.test.js
INFO: Sensor Generic Test Executions Report (done) | time=80ms

This report should always be generated right before the analysis, in the same environment. Not checked into source control and referred to each scan.

Its the same environment and these are the paths
/home/cicdanjalee/hk-backend-evolved/financialsService/test/serverisMonit.test.js
/home/cicdanjalee/hk-backend-evolved/financialsService/test/server.test.js
where my project is cloned on server.

I don’t think that’s the case though. In your logs, the analysis is running in a Bitbucket environment:

INFO: Base dir: /var/lib/jenkins/workspace/Cicd
INFO: Working dir: /var/lib/jenkins/workspace/Cicd/.scannerwork

You need to generate the test report in the same CI/CD job as your SonarQube analysis.

It is also in the CI/CD job

Can you please guide further?