nunit / nunit-console

NUnit Console runner and test engine
MIT License
217 stars 152 forks source link

Nunit --testlist option is not executing my tests. #817

Closed vkulkarniS23 closed 4 years ago

vkulkarniS23 commented 4 years ago

I am using the Nunit 3.11.1 console runner.

Providing the following command to execute the tests.

"C:\Program Files (x86)\NUnit.org\nunit-console\nunit3-console.exe" C:\RELEASE\srs_main\Source\Automation\SmokeTestLite\SmokeSuite\bin\smoketest.dll --testlist=C:\RELEASE\srs_main\Source\Automation\SmokeTestLite\SubsetTests.txt

It didn't execute the tests but the test results says everything is passed.

My output file results looks like this.

C:\Users\vkulkarni>"C:\Program Files (x86)\NUnit.org\nunit-console\nunit3-console.exe" C:\RELEASE\srs_main\Source\Automation\SmokeTestLite\SmokeSuite\bin\smoketest.dll --testlist=C:\RELEASE\srs_main\Source\Automation\SmokeTestLite\SubsetTests.txt NUnit Console Runner 3.11.1 (.NET 2.0) Copyright (c) 2020 Charlie Poole, Rob Prouse Monday, September 28, 2020 12:41:09 PM

Runtime Environment OS Version: Microsoft Windows NT 6.2.9200.0 Runtime: .NET Framework CLR v4.0.30319.42000

Test Files C:\RELEASE\srs_main\Source\Automation\SmokeTestLite\SmokeSuite\bin\smoketest.dll

Test Filters Test: EHR_AdminAuditTrail_VerifyAdminAuditTrailPage_TC1 Test: EHR_AdvancedReportingPowerTab_VerifyEHRAdvancedReportingPowerTab_TC1 Test: EHR_Alerts_AddAlertText Test: EHR_Alerts_RemoveAlertText Test: EHR_BarCodeAdmin_VerifyBarCodeAdminPage_TC1 Test: EHR_CPOE_AddOrder_TC1 Test: EHR_CPOE_DeleteOrder_TC1 Test: EHR_CPOE_VerifyAddOrderResultsPage_TC1 Test: EHR_CPOE_VerifyAddOrderResultsPage_TC3 Test: EHR_CQMCDSAdmin_VerifyCQMCDSAdminPowerTab_TC1 Test: EHR_CQMReport_VerifyCQMReport_TC1 Test: EHR_CareTeamMembers_VerifyEHRCareTeamMembersPowerTab_TC1 Test: EHR_ChargePassage_VerifyEHRChargePassage_TC1 Test: EHR_CliniSearch_VerifyCliniSearchReport_TC1 Test: EHR_ClinicalSummaryPowerTab_VerifyClinicalSummaryPage_TC1 Test: EHR_CustomAlerts_VerifyEHRCustomAlertsPowerTab_TC1 Test: EHR_DDEAdmin_VerifyDDEAdminPage_TC1 Test: EHR_DDRAdmin_VerifyDDRAdminPage_TC1 Test: EHR_DataCapture_VerifyEHRDataCapture_TC1 Test: EHR_Demographics_VerifyDemographicsPage_TC1 Test: EHR_Diagnosis_VerifyAddDiagnosis_TC4 Test: EHR_Diagnosis_VerifyDeleteDiagnosis_TC5 Test: EHR_Dictation_AddDictation Test: EHR_Dictation_VerifyEHRDictationPage Test: EHR_DoctorOverrideAdmin_VerifyDoctorOverrideAdminPage_TC1 Test: EHR_EasyID_VerifyEHREasyIDPagePage_TC1 Test: EHR_EncounterTime_VerifyEncounterTimePage_TC1 Test: EHR_FamilyHistory_AddFamilyHistoryRecord_TC1 Test: EHR_FamilyHistory_DeleteAllFamilyHistoryRecord_TC1 Test: EHR_FlexUI_VerifyFlexUIPowerTab_TC1 Test: EHR_FlexdataBuilder_VerifyFlexdataBuilderPowerTab_TC1 Test: EHR_GrowthChart_VerifyEHRGrowthChartPowerTab_TC1 Test: EHR_HealthInfoRequest_VerifyHealthInfoRequestPage_TC1 Test: EHR_IOP_VerifyAddingOD_IOPApp_TC2 Test: EHR_IOP_VerifyAddingOS_IOPApp_TC3 Test: EHR_IOP_VerifyDeleteIOPApp_TC4 Test: EHR_IOP_VerifyEHRIOPApp_TC1 Test: EHR_ImplantableDevices_VerifyAddActivateImplantableDevices_TC2 Test: EHR_ImplantableDevices_VerifyDeactivateImplantableDevices_TC3 Test: EHR_ImplantableDevices_VerifyImplantableDevicesPage_TC1 Test: EHR_IntegrationMap_VerifyIntegrationMapPage_TC1 Test: EHR_LabCategorizationAdmin_VerifyEHRLabCategorizationAdminPowerTab_TC1 Test: EHR_Labs_VerifyLabsPage_TC1 Test: EHR_MUReport_VerifyMUReport Test: EHR_OrdersAdmin_VerifyEHROrdersAdminPowerTab_TC1 Test: EHR_OutofOffice_VerifyEHROutofOfficenPowerTab_TC1 Test: EHR_PatientEducation_VerifyEHRPatientEducationPowerTab_TC1 Test: EHR_PatientInjection_VerifyEHRPatientInjectionPowerTab_TC1 Test: EHR_PatientInjectionsAdmin_VerifyPatientInjectionsAdminPowerTab_TC1 Test: EHR_PatientReminder_VerifyEHRPatientReminderPowerTab_TC1 Test: EHR_PatientTagSystemPowerTab_VerifyEHRPatientTagSystemPowerTab_TC1 Test: EHR_PatientTrackingAdminPowerTab_VerifyPatientTrackingAdminPage_TC1 Test: EHR_PatientTrackingAuditTrail_VerifyPatientTrackingAuditTrailPage_TC1 Test: EHR_PatientTrackingFavoritePowerTab_VerifyPatientTrackingFavoritePage_TC1 Test: EHR_PatinetImmunization_VerifyPatinetImmunizationPowerTab_TC1 Test: EHR_ProtocolAdminPowerTab_VerifyEHRProtocolAdminPowerTab_TC1 Test: EHR_QRDADownload_VerifyQRDADownloadPowerTab_TC1 Test: EHR_RestrictedChartAdmin_VerifyEHRRestrictedChartAdminPowerTab_TC1 Test: EHR_Rx_VerifyAddRxReasonForDecline_CurrentMeds_TC3 Test: EHR_Rx_VerifyDeleteRxReasonForDecline_CurrentMeds_TC4 Test: EHR_Rx_VerifyRxMedicationAllergyHistoryPage_TC1 Test: EHR_ScheduledTasks_CodeList_VerifyCodeListPage_TC1 Test: EHR_ScheduledTasks_VerifyScheduledTasksPage_TC3 Test: EHR_ServiceHost_VerifyServiceHostPage_TC1 Test: EHR_SmokingStatus_VerifyAddingSmokingApp_TC2 Test: EHR_SmokingStatus_VerifyDeleteSmoking_TC3 Test: EHR_TOC_VerifyTOCPage_TC1 Test: EHR_TagSystemAdministration_VerifyEHRTagSystemAdministrationPowerTab_TC1 Test: EHR_UDFAdmin_VerifyEHRUDFAdminPowerTab_TC1 Test: EHR_VisitType_VerifyAddingVisitTypes_TC3 Test: EHR_VisitType_VerifyDeleteVisitTypes_TC4 Test: EHR_VisualAcuity_VerifyAddingVisualAcuityApp_TC2 Test: EHR_VisualAcuity_VerifyDeleteVisualAcuityApp_TC3 Test: EHR_Vitals_AddVitalsEditPagefromIDash_TC6 Test: EHR_Vitals_DeleteVitalsEditPagefromIDash_TC7 Test: EHR_Vitals_VerifyVitalsEditPagefromIDash_TC1 Test: EHR_Vitals_VerifyVitalsEditPagefromVitalsApp_TC4 Test: EHR_Vitals_VerifyVitalsHistoryPagefromIDash_TC2 Test: EHR_Vitals_VerifyVitalsHistoryPagefromVitalsApp_TC3 Test: EHR_Vitals_VerifyVitalsReasonforDeclinePage_TC5 Test: EHR_eNote_VerifyEHReNotePowerTab_TC1 Test: EHR_eNote_VerifyGoalsPowerTab_TC1 Test: EHR_eNote_VerifyObservationPT_TC1 Test: EHR_iDash_VerifyEHRiDashPage

Run Settings DisposeRunners: True WorkDirectory: C:\Users\vkulkarni ImageRuntimeVersion: 4.0.30319 ImageTargetFrameworkName: .NETFramework,Version=v4.6.1 ImageRequiresX86: True RunAsX86: True ImageRequiresDefaultAppDomainAssemblyResolver: False RuntimeFramework: net-4.0 NumberOfTestWorkers: 6

Test Run Summary Overall result: Passed Test Count: 0, Passed: 0, Failed: 0, Warnings: 0, Inconclusive: 0, Skipped: 0 Start time: 2020-09-28 16:41:10Z End time: 2020-09-28 16:41:11Z Duration: 1.003 seconds

My Test file looks like this

EHR_BarCodeAdmin_VerifyBarCodeAdminPage_TC1 EHR_CPOE_AddOrder_TC1 EHR_CPOE_DeleteOrder_TC1 EHR_CPOE_VerifyAddOrderResultsPage_TC1 EHR_CPOE_VerifyAddOrderResultsPage_TC3 EHR_CQMCDSAdmin_VerifyCQMCDSAdminPowerTab_TC1 EHR_CQMReport_VerifyCQMReport_TC1 EHR_CareTeamMembers_VerifyEHRCareTeamMembersPowerTab_TC1 EHR_ChargePassage_VerifyEHRChargePassage_TC1 EHR_CliniSearch_VerifyCliniSearchReport_TC1 EHR_ClinicalSummaryPowerTab_VerifyClinicalSummaryPage_TC1 EHR_CustomAlerts_VerifyEHRCustomAlertsPowerTab_TC1 EHR_DDEAdmin_VerifyDDEAdminPage_TC1 EHR_DDRAdmin_VerifyDDRAdminPage_TC1 EHR_DataCapture_VerifyEHRDataCapture_TC1 EHR_Demographics_VerifyDemographicsPage_TC1 EHR_Diagnosis_VerifyAddDiagnosis_TC4 EHR_Diagnosis_VerifyDeleteDiagnosis_TC5 EHR_Dictation_AddDictation EHR_Dictation_VerifyEHRDictationPage EHR_DoctorOverrideAdmin_VerifyDoctorOverrideAdminPage_TC1 EHR_EasyID_VerifyEHREasyIDPagePage_TC1 EHR_EncounterTime_VerifyEncounterTimePage_TC1 EHR_FamilyHistory_AddFamilyHistoryRecord_TC1 EHR_FamilyHistory_DeleteAllFamilyHistoryRecord_TC1 EHR_FlexUI_VerifyFlexUIPowerTab_TC1 EHR_FlexdataBuilder_VerifyFlexdataBuilderPowerTab_TC1 EHR_GrowthChart_VerifyEHRGrowthChartPowerTab_TC1 EHR_HealthInfoRequest_VerifyHealthInfoRequestPage_TC1 EHR_IOP_VerifyAddingOD_IOPApp_TC2 EHR_IOP_VerifyAddingOS_IOPApp_TC3 EHR_IOP_VerifyDeleteIOPApp_TC4 EHR_IOP_VerifyEHRIOPApp_TC1 EHR_ImplantableDevices_VerifyAddActivateImplantableDevices_TC2 EHR_ImplantableDevices_VerifyDeactivateImplantableDevices_TC3 EHR_ImplantableDevices_VerifyImplantableDevicesPage_TC1 EHR_IntegrationMap_VerifyIntegrationMapPage_TC1 EHR_LabCategorizationAdmin_VerifyEHRLabCategorizationAdminPowerTab_TC1 EHR_Labs_VerifyLabsPage_TC1 EHR_MUReport_VerifyMUReport EHR_OrdersAdmin_VerifyEHROrdersAdminPowerTab_TC1 EHR_OutofOffice_VerifyEHROutofOfficenPowerTab_TC1 EHR_PatientEducation_VerifyEHRPatientEducationPowerTab_TC1 EHR_PatientInjection_VerifyEHRPatientInjectionPowerTab_TC1 EHR_PatientInjectionsAdmin_VerifyPatientInjectionsAdminPowerTab_TC1 EHR_PatientReminder_VerifyEHRPatientReminderPowerTab_TC1 EHR_PatientTagSystemPowerTab_VerifyEHRPatientTagSystemPowerTab_TC1 EHR_PatientTrackingAdminPowerTab_VerifyPatientTrackingAdminPage_TC1 EHR_PatientTrackingAuditTrail_VerifyPatientTrackingAuditTrailPage_TC1 EHR_PatientTrackingFavoritePowerTab_VerifyPatientTrackingFavoritePage_TC1 EHR_PatinetImmunization_VerifyPatinetImmunizationPowerTab_TC1 EHR_ProtocolAdminPowerTab_VerifyEHRProtocolAdminPowerTab_TC1 EHR_QRDADownload_VerifyQRDADownloadPowerTab_TC1 EHR_RestrictedChartAdmin_VerifyEHRRestrictedChartAdminPowerTab_TC1 EHR_Rx_VerifyAddRxReasonForDecline_CurrentMeds_TC3 EHR_Rx_VerifyDeleteRxReasonForDecline_CurrentMeds_TC4 EHR_Rx_VerifyRxMedicationAllergyHistoryPage_TC1 EHR_ScheduledTasks_CodeList_VerifyCodeListPage_TC1 EHR_ScheduledTasks_VerifyScheduledTasksPage_TC3 EHR_ServiceHost_VerifyServiceHostPage_TC1 EHR_SmokingStatus_VerifyAddingSmokingApp_TC2 EHR_SmokingStatus_VerifyDeleteSmoking_TC3 EHR_TOC_VerifyTOCPage_TC1 EHR_TagSystemAdministration_VerifyEHRTagSystemAdministrationPowerTab_TC1 EHR_UDFAdmin_VerifyEHRUDFAdminPowerTab_TC1 EHR_VisitType_VerifyAddingVisitTypes_TC3 EHR_VisitType_VerifyDeleteVisitTypes_TC4 EHR_VisualAcuity_VerifyAddingVisualAcuityApp_TC2 EHR_VisualAcuity_VerifyDeleteVisualAcuityApp_TC3 EHR_Vitals_AddVitalsEditPagefromIDash_TC6 EHR_Vitals_DeleteVitalsEditPagefromIDash_TC7 EHR_Vitals_VerifyVitalsEditPagefromIDash_TC1 EHR_Vitals_VerifyVitalsEditPagefromVitalsApp_TC4 EHR_Vitals_VerifyVitalsHistoryPagefromIDash_TC2 EHR_Vitals_VerifyVitalsHistoryPagefromVitalsApp_TC3 EHR_Vitals_VerifyVitalsReasonforDeclinePage_TC5 EHR_eNote_VerifyEHReNotePowerTab_TC1 EHR_eNote_VerifyGoalsPowerTab_TC1 EHR_eNote_VerifyObservationPT_TC1 EHR_iDash_VerifyEHRiDashPage

CharliePoole commented 4 years ago

I take it that no tests are found or run, indicating that none of your actual tests match any of the names in your testlist file.

The console filter list merely shows the filters that are being used. It matches exactly your testlist file, of course, except for the order and the addition of the prefix test:. It tells us nothing about what NUnit found in your assembly.

You could find out what's in your assembly by running the console using the --explore option as was done issue #481 where you commented. That's generally a good approach if you are having trouble figuring out what name NUnit has given one of your tests.

However, there may be a simpler approach here. According to your testlist file, none of the tests listed are inside a namespace. While that's possible, I suspect you have not put all your tests at a global level (outside of any namespace). You should modify the file so that each entry includes the namespace of the test in question, for example...

Some.Namespace.EHR_BarCodeAdmin_VerifyBarCodeAdminPage_TC1
Another.Namespace.EHR_CPOE_AddOrder_TC1
...

If that doesn't help, let us know and we'll follow up further.

vkulkarniS23 commented 4 years ago

OMG! You are a genius! Thank you so much. You saved my day. I updated my tests name with namespaces as per the --explore command. That did the trick.