Package: ctreport-selenium
CT Report for Seleniumctreport-selenium is a simple, creative and customizable report for selenium automation testing using Python.FeatureDifferent view of your test execution resultDashboard view with multiple graphs to understand the testsTest Detail view to show complete testFilter and Search any testReference section for ctreport-selenium specific terminologies like Status, Priority, and SeverityCustomizable option through JSON fileScreenshots better viewToast message for every endpoint of the report for the clear understandingFairly mobile friendlyInstallation and Usagepip install ctreport-seleniumDefine reportconfig.json fileFirst, you should define the session. While creating session session_details and report_options can be defined/modified.In session_details, you can provide the current test session detailsreportconfig.json"session_details" : {
      "Owner": "Naveen.S",
      "application_name": "MyApp1",
      "application_version": "V1.04",
      "platform": "Windows10",
      "additional_information":"Browser - Chrome 84"
},In report_options, below properties can be providedtheme (Default/Dark Angel) (Currently ctreport-selenium supports two theme 1. Default 2. Dark Angel)title (report title)logo (your company logo)show_reference (reference section)zip_if_screenshot (In case, the screenshot is created then you can select this option to create zip file- report+screenshot )"report_options" :{
     "theme": "Default",
     "title": "Test Report",
     "logo": "MYLOGO.PNG",
     "show_reference": "True",
     "zip_if_screenshot": "True"
}Start the Sessiondriver = webdriver.Chrome(executable_path=r'chromedriver.exe')
Session.start(test_execution_name="Smoke Test - MyApp1",
            path="D:\\reports",
            driver=cls.driver,
            config_file=r"D:\\reportconfig.json")Create TestFor each test, you can create an object for the Test class. While creating the object for the Test class you can define the below parametersNameIdDescriptionPriority (Refer below reference section)test = Test("Search Fund links", 
             id=4574,
             description="Search by search term- Fund",
             priority=Priority.MEDIUM)Methods in Session classMethodDescriptionset_driver(driver)In case of driver is not passes in Session.start() method later you can pass through this methodMethods in Test classMethodDescriptionlog(self, *message)Method to record the steps for your test in the reportself.test.log("Navigate to search page")error(self, *message, exception=None, takescreenshot=False)Method to record the error message in the reportbroken(self, *err)Method to mark the current test as Broken and record the exceptionsBroken - Test case stopped due to fatal errors(check the reference section)skip(self, message)Method to skip the current testtake_screenshot(self, message=None)Method to take screenshotassert_are_equal(self, actual, expected, description=None, onfail_screenshot=False)Mark the assertion steps and it supports asserting following typesNumberStringBooleanDictionaryListTupleNote:All assertions are treated as Blocker severity(check the reference section)verify_are_equal(self, actual, expected, description=None, severity=Severity.MAJOR, onfail_screenshot=False)Mark the verification steps and it supports verifing the following typesNumberStringBooleanDictionaryListTuple(check the reference section)Finish TestEvery test should be finshed before next test start/before Session endstest.finish()End SesionSession should be end at end of your scriptSession.end()ReferenceStatusStatus: Test status after executionStatusDescriptionPassTest case is passed without any verification/assertion/fatal errorsFailTest case is failed due to verification/assertion errorsSkipTest case skipped due to blocker or critical issue in dependenciesBrokenTest case stopped due to fatal errorsPriorityPriority: Applies to test casePriorityDescriptionHighTest case on the most important features of the applicationMediumTest case on features of the application which is next to High priority test casesLowTest case on features of the application which is considered to be executed rarelySeveritySeverity: Applies to verification and assertion statementsNote: All assertions are treated as Blocker severitySeverityDescriptionBlockerThe system or functionality is currently unavailable to continue working on the application because of this incidentCriticalEssential functionality is not functioning and no acceptable workaroundMajorEssential functionality is not functioning unless acceptable workaround is implementedMinorMinor inconvenience in the functionality and application remains operationalIssuesIf you encounter any problems, please file anissuealong with a detailed description.