Sonar Test report [report refers to a file which is not configured as a test file]

Hello everyone,

I have a project with the following structure:

root/

  • sonar-project.properties
  • scheduler/
    • src/
      package.json
  • playwright-tests/

I’m using jest.sonar to generate the report and until here all ok.
The problem is that I always get this:

NFO: Parsing /home/ec2-user/agent/_work/1/s/scheduler/test-report.xml

WARN: Line 2 of report refers to a file which is not configured as a test file: scheduler/src/components/WeaklyDrawer/CancelLiveAppointmentModal/CancelLiveAppointmentModal.test.tsx

WARN: Line 7 of report refers to a file which is not configured as a test file: scheduler/src/pages/ScheduleTemplates/TemplatesMainPanel/TemplatesContentHeader/TemplatesContentHeader.test.tsx

WARN: Line 11 of report refers to a file which is not configured as a test file: scheduler/src/components/AppointmentDetailsTooltip/AppointmentDetailsTooltip.test.tsx

WARN: Line 14 of report refers to a file which is not configured as a test file: scheduler/src/components/TimeGridList/IconLabel/IconLabel.test.tsx

WARN: Line 17 of report refers to a file which is not configured as a test file: scheduler/src/components/Form/InputSelect/Select.test.tsx

WARN: Line 21 of report refers to a file which is not configured as a test file: scheduler/src/components/Modal/Modal.test.tsx

WARN: Line 27 of report refers to a file which is not configured as a test file: scheduler/src/helpers/appointments/appointments.test.ts

WARN: Line 34 of report refers to a file which is not configured as a test file: scheduler/src/components/DateSelect/DateSelect.test.tsx

WARN: Line 37 of report refers to a file which is not configured as a test file: scheduler/src/pages/ClientWeeklyCalendar/NewAppointmentButton/NewAppointmentButton.test.tsx

WARN: Line 41 of report refers to a file which is not configured as a test file: scheduler/src/components/TimeGrid/CurrentTime/CurrentTime.test.tsx

WARN: Line 45 of report refers to a file which is not configured as a test file: scheduler/src/components/LoadingHandler/LoadingHandler.test.tsx

WARN: Line 52 of report refers to a file which is not configured as a test file: scheduler/src/components/Form/FormError/FormErrorComponent.test.tsx

WARN: Line 57 of report refers to a file which is not configured as a test file: scheduler/src/components/DrawerForm/TasksTags/Tasks/Tasks.test.tsx

WARN: Line 60 of report refers to a file which is not configured as a test file: scheduler/src/components/AppointmentDetailsTooltip/ShadowCarerBlock/ShadowCarerBlock.test.tsx

WARN: Line 63 of report refers to a file which is not configured as a test file: scheduler/src/components/DrawerForm/FieldGroup/FieldGroup.test.tsx

WARN: Line 66 of report refers to a file which is not configured as a test file: scheduler/src/components/Flex/Flex.test.tsx

WARN: Line 69 of report refers to a file which is not configured as a test file: scheduler/src/components/AppointmentLabel/AppointmentLabel.test.tsx

WARN: Line 72 of report refers to a file which is not configured as a test file: scheduler/src/components/TimeGrid/helpers.test.ts

WARN: Line 79 of report refers to a file which is not configured as a test file: scheduler/src/helpers/dates/dates.test.ts

Already tried a lot of things in sonar-project.properties. Right now I have this:

sonar.projectKey=projectName
sonar.projectName=scheduling
sonar.projectVersion=0.0.1
sonar.sources=/scheduler/src/
sonar.tests=/scheduler/src/
sonar.test.inclusions=/scheduler/src/components/Modal/Modal.test.tsx
sonar.coverage.exclusions=scheduler/src/setupProxy.js,scheduler/src/config-overrides.js,scheduler/src/**/*.test.js,scheduler/src/**/*.test.jsx,scheduler/src/**/*.test.ts,scheduler/src/**/*.test.tsx
sonar.typescript.lcov.reportPaths=scheduler/coverage/lcov.info
sonar.testExecutionReportPaths=scheduler/test-report.xml
sonar.sourceEncoding=UTF-8

Can anyone help me with what should be the right config?

I also see this in the logs

INFO: Sensor JavaScript/TypeScript Coverage [javascript]
INFO: No LCOV files were found using /home/ec2-user/agent/_work/1/s/**/coverage/lcov.info
WARN: No coverage information will be saved because all LCOV files cannot be found.
INFO: Sensor JavaScript/TypeScript Coverage [javascript] (done) | time=703ms