# Test execution data ignored

**URL:** <https://community.sonarsource.com/t/test-execution-data-ignored/105565>\
**Category:** SonarQube Server / Community Build\
**Tags:** coverage\
**Created:** [December 6, 2023, 10:15am UTC](https://community.sonarsource.com/t/test-execution-data-ignored/105565 "2023-12-06T10:15:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aleh\_Panasiuk](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/aleh_panasiuk/32/48025_2.png) [@Aleh\_Panasiuk](https://community.sonarsource.com/u/Aleh_Panasiuk)\
**Post date:** [December 6, 2023, 10:15am UTC](https://community.sonarsource.com/t/test-execution-data-ignored/105565/1 "2023-12-06T10:15:04Z")

</div>

OS: windows 10  
SonarQube: v10.3

SonarScanner: v5.0.1

Jest: v29

**casualbot/jest-sonar-reporter** : 2.2.5

Sonar deployed from zip

 ![image](https://europe1.discourse-cdn.com/sonarsource/uploads/sonarcommunity/original/3X/b/6/b642dde02814f316883d5154fb361f4e7a964666.png)

I’d like to see the number of executed tests.

### Jest config

```auto
"jest":{
    "coverageDirectory": "coverage",
    "coverageReporters": [
      "lcov"
    ],
    "reporters": [
      "default",
      "@casualbot/jest-sonar-reporter"
    ]
  },
  "@casualbot/jest-sonar-reporter": {
    "uniqueOutputName": "false",
    "usePathForSuiteName": "true",
    "relativePaths": "true",
    "outputdirectory": "coverage"
  }

```

[test-c.zip](https://community.sonarsource.com/uploads/short-url/dfpptRmCcGVvVwE5N8XEYiZ7TPc.zip) (260.6 KB)

```auto
coverage/
src/
    sourse/sum.ts
    test/sum.test.ts

```

```auto
18:17:08.478 INFO: Sensor Generic Test Executions Report
18:17:08.479 INFO: Parsing C:\GitHub\test-sonar\coverage\jest-sonar.xml
18:17:08.504 INFO: Imported test execution data for 0 files
18:17:08.505 INFO: Test execution data ignored for 1 unknown files, including:
sum.test.ts
18:17:08.506 INFO: Sensor Generic Test Executions Report (done) | time=27ms

```

[fulllog.txt](https://community.sonarsource.com/uploads/short-url/i9XGuguplc3RW1FzS0oYRxtewHV.txt) (58.9 KB)

```auto
sonar-scanner^
 -X^
 -D"sonar.projectBaseDir=src"^
 -D"sonar.projectKey=test-c"^
 -D"sonar.sources=sources"^
 -D"sonar.test=test"^
 -D"sonar.test.inclusions=test/*.test.ts"^
 -D"sonar.host.url=http://localhost:9000"^
 -D"sonar.token=sqp_49ae8893eb3e2b7ccb928ae7a3d198888afb028d"^
 -D"sonar.typescript.lcov.reportPaths=coverage/lcov.info"^
 -D"sonar.testExecutionReportPaths=coverage/jest-sonar.xml"^

```

report what i’ve tried

```auto
<testExecutions version="1">
 <file path="src\test\sum.test.ts">
  <testCase name="sum module adds 1 + 2 to equal 3" duration="3"/>
 </file>
</testExecutions>

```

```auto
<testExecutions version="1">
 <file path="test\sum.test.ts">
  <testCase name="sum module adds 1 + 2 to equal 3" duration="3"/>
 </file>
</testExecutions>

```

```auto
<testExecutions version="1">
 <file path="sum.test.ts">
  <testCase name="sum module adds 1 + 2 to equal 3" duration="3"/>
 </file>
</testExecutions>

```

**What have tried**

1. Configured sonar and jest
2. execute the sonar scanner with proper configuration
3. Investigate already opened topics
4. investigate GitHub Issues

---

<div class="post-metadata">

**Author:** ![ganncamp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ganncamp/32/1261_2.png) [@ganncamp](https://community.sonarsource.com/u/ganncamp)\
**Post date:** [December 8, 2023, 2:37pm UTC](https://community.sonarsource.com/t/test-execution-data-ignored/105565/2 "2023-12-08T14:37:00Z")

</div>

Hi,

Welcome to the community!

> [@Aleh\_Panasiuk](#):
>
> ```auto
> 18:17:08.505 INFO: Test execution data ignored for 1 unknown files, including:
> sum.test.ts
> 
> ```

The default suspect here is always paths that don’t match up between what’s in the report and what analysis sees.

> [@Aleh\_Panasiuk](#):
>
> ` -D"sonar.test=test"^`

It seems that your tests are, very sensibly, in a `test` directory. So right off the bat, that’s a path mismatch: `sum.test.ts` vs `test/sum.test.ts`. I see that you’ve tried different variations on the path, and the log you’ve excerpted is likely from the 3rd iteration.

So that brings me to the next thing. I believe your test files aren’t being identified as tests. The parameter name is `sonar.tests`, with an ‘s’ at the end. Can you change that, go back to paths-from-project-root in your test execution report, and try again?

&nbsp;  
Ann
