Hi Colin,
We have some observation here when json file is getting generated some of the classes which we mentioned in our sonar scan command do not exist in json file. Thus it is not reflecting in SonarQube report.
But ideally it should be there since scan or validation stage gets passed only when coverage of all classes is more than 75%.
For your reference I am attaching the json file and screenshots of sonar report.
sonarqubeImages.zip (269.2 KB)
test-result-codecoverage.json (485.8 KB)
For test run below is the sample command we are using:
sfdx force:apex:test:run -n “AmortizationTableControllerTest,AsyncObeB2B_DeviceReservation_Test,AttributeUtility_Test,B2BCmexAppHandlerV2Test,ChangePasswordControllerTest,CommunitiesLandingControllerTest,CommunitiesLoginControllerTest,CommunitiesSelfRegConfirmControllerTest,CommunitiesSelfRegControllerTest,ConvertListtoStrTest,DataForAppointmentBook_Test,FixEnvelopeStatusScheduler_Test,FixPicklistValuesUpdateJSON_Test,ForgotPasswordControllerTest,INT_ClickThrough_Controller_Test,INT_IntegrationSettingsUtility_Test,INT_JSONConversionMappingUtility_Test,INT_SwagClient_Test,LightningForgotPasswordControllerTest,LightningLoginFormControllerTest,LightningSelfRegisterControllerTest,LOG_DeleteLogMessagesSchedulerTest,LOG_LogMessageUtilityTest,MockHttpResponseGeneratorTest,MyProfilePageControllerTest,OBEB2B_sendKCISMSTest,OBE_AccountDomainTest,OBE_AccountRepository_Test,OBE_AddDeviceTest,OBE_AddressValidationUpdate_Test,OBE_AllocateESIMAndGeneratePDFCntrlTest,OBE_Appointment_CancellationBatchTest,OBE_Asset_TriggerHandler_Test,OBE_AssetizationUtility_Test,OBE_AssetRepositoryTest,OBE_AssetStructureDecoderTest,OBE_B2B_AccountUtils_Test,OBE_BatchOrderGenerator3Test,OBE_BulkPromoActivationBatch_Test,OBE_BulkPromoActivationBatch2_Test,OBE_Cable_Address_SwagAreaApiTest,OBE_Cable_Address_SwagAreaTest,OBE_Cable_Address_SwagErrorTest,OBE_Cable_Address_SwagFuzzyTest,OBE_Cable_Address_SwagLocaCharacTest,OBE_Cable_Address_SwagOperatorTest,OBE_Cable_Address_SwagStreetApiTest,OBE_Cable_Address_SwagStreetTest,OBE_Cable_addressValidationTest,OBE_CancellationForInactivity_Test” --target-org TestACC -c -d /builds/crm/obe-sfvl-git-repo -r human