├── .gitignore ├── .idea ├── compiler.xml ├── encodings.xml ├── libraries │ ├── Maven__com_beust_jcommander_1_64.xml │ ├── Maven__com_fasterxml_jackson_core_jackson_annotations_2_7_0.xml │ ├── Maven__com_fasterxml_jackson_core_jackson_core_2_7_0.xml │ ├── Maven__com_fasterxml_jackson_core_jackson_databind_2_7_0.xml │ ├── Maven__com_fasterxml_jackson_module_jackson_module_jaxb_annotations_2_7_0.xml │ ├── Maven__com_github_virtuald_curvesapi_1_04.xml │ ├── Maven__com_google_code_findbugs_jsr305_1_3_9.xml │ ├── Maven__com_google_code_gson_gson_2_8_0.xml │ ├── Maven__com_google_errorprone_error_prone_annotations_2_0_18.xml │ ├── Maven__com_google_guava_guava_23_0.xml │ ├── Maven__com_google_j2objc_j2objc_annotations_1_1.xml │ ├── Maven__com_relevantcodes_extentreports_2_41_2.xml │ ├── Maven__commons_codec_commons_codec_1_10.xml │ ├── Maven__commons_io_commons_io_2_5.xml │ ├── Maven__commons_logging_commons_logging_1_2.xml │ ├── Maven__io_qameta_allure_allure2_model_api_1_0_BETA6.xml │ ├── Maven__io_qameta_allure_allure2_model_jackson_1_0_BETA6.xml │ ├── Maven__io_qameta_allure_allure2_model_pojo_1_0_BETA6.xml │ ├── Maven__io_qameta_allure_allure_descriptions_javadoc_2_0_BETA19.xml │ ├── Maven__io_qameta_allure_allure_java_commons_2_0_BETA19.xml │ ├── Maven__io_qameta_allure_allure_testng_2_0_BETA19.xml │ ├── Maven__net_bytebuddy_byte_buddy_1_7_5.xml │ ├── Maven__net_java_dev_jna_jna_4_1_0.xml │ ├── Maven__net_java_dev_jna_jna_platform_4_1_0.xml │ ├── Maven__org_apache_commons_commons_collections4_4_1.xml │ ├── Maven__org_apache_commons_commons_exec_1_3.xml │ ├── Maven__org_apache_commons_commons_lang3_3_5.xml │ ├── Maven__org_apache_httpcomponents_httpclient_4_5_3.xml │ ├── Maven__org_apache_httpcomponents_httpcore_4_4_6.xml │ ├── Maven__org_apache_poi_poi_3_17.xml │ ├── Maven__org_apache_poi_poi_ooxml_3_17.xml │ ├── Maven__org_apache_poi_poi_ooxml_schemas_3_17.xml │ ├── Maven__org_apache_tika_tika_core_1_14.xml │ ├── Maven__org_apache_xmlbeans_xmlbeans_2_6_0.xml │ ├── Maven__org_aspectj_aspectjrt_1_8_10.xml │ ├── Maven__org_codehaus_mojo_animal_sniffer_annotations_1_14.xml │ ├── Maven__org_freemarker_freemarker_2_3_23.xml │ ├── Maven__org_hamcrest_hamcrest_core_1_3.xml │ ├── Maven__org_jooq_joor_0_9_6.xml │ ├── Maven__org_jsoup_jsoup_1_8_3.xml │ ├── Maven__org_mongodb_bson_3_0_4.xml │ ├── Maven__org_mongodb_mongodb_driver_3_0_4.xml │ ├── Maven__org_mongodb_mongodb_driver_core_3_0_4.xml │ ├── Maven__org_seleniumhq_selenium_selenium_api_3_6_0.xml │ ├── Maven__org_seleniumhq_selenium_selenium_chrome_driver_3_6_0.xml │ ├── Maven__org_seleniumhq_selenium_selenium_edge_driver_3_6_0.xml │ ├── Maven__org_seleniumhq_selenium_selenium_firefox_driver_3_6_0.xml │ ├── Maven__org_seleniumhq_selenium_selenium_ie_driver_3_6_0.xml │ ├── Maven__org_seleniumhq_selenium_selenium_java_3_6_0.xml │ ├── Maven__org_seleniumhq_selenium_selenium_opera_driver_3_6_0.xml │ ├── Maven__org_seleniumhq_selenium_selenium_remote_driver_3_6_0.xml │ ├── Maven__org_seleniumhq_selenium_selenium_safari_driver_3_6_0.xml │ ├── Maven__org_seleniumhq_selenium_selenium_support_3_6_0.xml │ ├── Maven__org_slf4j_slf4j_api_1_7_21.xml │ ├── Maven__org_testng_testng_6_11.xml │ ├── Maven__org_xerial_sqlite_jdbc_3_8_11_1.xml │ ├── Maven__org_yaml_snakeyaml_1_17.xml │ ├── Maven__ru_yandex_qatools_ashot_ashot_1_5_4.xml │ └── Maven__stax_stax_api_1_0_1.xml ├── misc.xml ├── modules.xml ├── vcs.xml ├── workspace.xml └── workspace.xml___jb_tmp___ ├── ExcelReader.iml ├── README.md ├── TestNG.xml ├── allure-results ├── 02fa0f70-7e11-48b0-98d6-389e7eea2d14-attachment ├── 0e639977-6597-4f92-9d14-b49aef67ea96-container.json ├── 14c8186c-64e7-43af-9c5a-167cef316783-container.json ├── 1c0e2430-88d2-454c-b7dc-d6387cd91d3a-result.json ├── 2a1841b2-8fab-429d-bef8-2a803f5bfaeb-container.json ├── 2f637163-b2ed-4fbf-83fc-6bd4a8961399-container.json ├── 3fc40a15-54d4-403a-bd7e-56de892ee77f-attachment ├── 4ab6f8c7-da29-40f5-9134-9b450d0d63a3-container.json ├── 52208500-55a8-4cc8-bb87-0eab64980045-result.json ├── 65d4fec9-82be-4e46-8ea5-79e18e07c5a3-result.json ├── 6a2843f7-0e83-4273-900e-f7c6e7be3a00-container.json ├── 7fed4d34-8f30-440e-ac34-77ec0aced91b-result.json ├── 817968a5-14bb-4b9e-921c-7439a3c4d8cf-container.json ├── 876ede02-2af4-4c3d-b15c-c34c5189505d-container.json ├── 88df63d9-1701-4f15-a693-cb07fd04ff49-container.json ├── 8c00490b-2865-4a31-9b48-638fd7a18c55-result.json ├── 94eef95f-a44c-42d3-b74f-f3e331dee6f2-container.json ├── 9dd9f0ba-53b2-4b1b-9c3d-e470f8591b0c-result.json ├── a9e6f92e-a916-429e-bf9b-c53be6e3ee18-container.json ├── af3cee55-8c85-40da-965a-85467f155f1b-container.json ├── c0204b50-8d91-4088-8c66-ee3e9ad9ed99-result.json ├── c84735f5-2a55-4c65-8286-7412ab288d54-attachment ├── cde84020-382f-4de7-880f-5acbd3a9ea10-container.json ├── cec0756f-df6d-4aff-8acd-6d835365ad7f-attachment ├── e6962be1-6f8b-4325-ad91-46c977670fa2-container.json └── eb389e27-c12e-4cfa-81e3-8e4ad15d6bbe-container.json ├── extentreports └── ExtentReportResults.html ├── pom.xml ├── src ├── main │ └── java │ │ └── pages │ │ ├── BasePage.java │ │ ├── HomePage.java │ │ └── LoginPage.java └── test │ └── java │ ├── resources │ └── testdata.xlsx │ ├── tests │ ├── BaseTest.java │ └── LoginTests.java │ └── utils │ ├── excelutils │ └── ExcelUtil.java │ ├── extentreports │ ├── ExtentManager.java │ └── ExtentTestManager.java │ └── listeners │ ├── AnnotationTransformer.java │ ├── Retry.java │ └── TestListener.java └── target └── test-classes ├── testdata.xlsx └── ~$testdata.xlsx /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled class file 2 | *.class 3 | 4 | # Log file 5 | *.log 6 | 7 | # BlueJ files 8 | *.ctxt 9 | 10 | # Mobile Tools for Java (J2ME) 11 | .mtj.tmp/ 12 | 13 | # Package Files # 14 | *.jar 15 | *.war 16 | *.ear 17 | *.zip 18 | *.tar.gz 19 | *.rar 20 | 21 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 22 | hs_err_pid* 23 | -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_beust_jcommander_1_64.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_annotations_2_7_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_core_2_7_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_databind_2_7_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_fasterxml_jackson_module_jackson_module_jaxb_annotations_2_7_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_github_virtuald_curvesapi_1_04.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_google_code_findbugs_jsr305_1_3_9.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_google_code_gson_gson_2_8_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_google_errorprone_error_prone_annotations_2_0_18.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_google_guava_guava_23_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_google_j2objc_j2objc_annotations_1_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_relevantcodes_extentreports_2_41_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__commons_codec_commons_codec_1_10.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__commons_io_commons_io_2_5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__commons_logging_commons_logging_1_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__io_qameta_allure_allure2_model_api_1_0_BETA6.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__io_qameta_allure_allure2_model_jackson_1_0_BETA6.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__io_qameta_allure_allure2_model_pojo_1_0_BETA6.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__io_qameta_allure_allure_descriptions_javadoc_2_0_BETA19.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__io_qameta_allure_allure_java_commons_2_0_BETA19.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__io_qameta_allure_allure_testng_2_0_BETA19.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__net_bytebuddy_byte_buddy_1_7_5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__net_java_dev_jna_jna_4_1_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__net_java_dev_jna_jna_platform_4_1_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_commons_commons_collections4_4_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_commons_commons_exec_1_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_commons_commons_lang3_3_5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_httpcomponents_httpclient_4_5_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_httpcomponents_httpcore_4_4_6.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_poi_poi_3_17.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_poi_poi_ooxml_3_17.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_poi_poi_ooxml_schemas_3_17.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_tika_tika_core_1_14.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_xmlbeans_xmlbeans_2_6_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_aspectj_aspectjrt_1_8_10.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_codehaus_mojo_animal_sniffer_annotations_1_14.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_freemarker_freemarker_2_3_23.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_jooq_joor_0_9_6.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_jsoup_jsoup_1_8_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_mongodb_bson_3_0_4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_mongodb_mongodb_driver_3_0_4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_mongodb_mongodb_driver_core_3_0_4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_seleniumhq_selenium_selenium_api_3_6_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_seleniumhq_selenium_selenium_chrome_driver_3_6_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_seleniumhq_selenium_selenium_edge_driver_3_6_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_seleniumhq_selenium_selenium_firefox_driver_3_6_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_seleniumhq_selenium_selenium_ie_driver_3_6_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_seleniumhq_selenium_selenium_java_3_6_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_seleniumhq_selenium_selenium_opera_driver_3_6_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_seleniumhq_selenium_selenium_remote_driver_3_6_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_seleniumhq_selenium_selenium_safari_driver_3_6_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_seleniumhq_selenium_selenium_support_3_6_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_slf4j_slf4j_api_1_7_21.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_testng_testng_6_11.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_xerial_sqlite_jdbc_3_8_11_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_yaml_snakeyaml_1_17.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__ru_yandex_qatools_ashot_ashot_1_5_4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__stax_stax_api_1_0_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/workspace.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 57 | 58 | 59 | 62 | 63 | 64 | 70 | 71 | 72 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 102 | 103 | 106 | 107 | 108 | 109 | 112 | 113 | 116 | 117 | 120 | 121 | 124 | 125 | 128 | 129 | 132 | 133 | 134 | 135 | 138 | 139 | 142 | 143 | 146 | 147 | 150 | 151 | 154 | 155 | 158 | 159 | 162 | 163 | 164 | 165 | 168 | 169 | 172 | 173 | 176 | 177 | 180 | 181 | 184 | 185 | 188 | 189 | 190 | 191 | 194 | 195 | 198 | 199 | 202 | 203 | 206 | 207 | 210 | 211 | 212 | 213 | 216 | 217 | 220 | 221 | 224 | 225 | 228 | 229 | 230 | 231 | 234 | 235 | 238 | 239 | 242 | 243 | 246 | 247 | 250 | 251 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 270 | 271 | 272 | 273 | 274 | 279 | 280 | 281 | 307 | 308 | 309 | 334 | 335 | 336 | 342 | 343 | 344 | 357 | 358 | 359 | 376 | 377 | 378 | 385 | 388 | 390 | 391 | 392 | 393 | 394 | 395 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 434 | 435 | 436 | 447 | 448 | 449 | 459 | 460 | 467 | 468 | 469 | 470 | 488 | 495 | 496 | 497 | 499 | 500 | 501 | 502 | 1509200253270 503 | 507 | 508 | 509 | 510 | 511 | 512 | 513 | 514 | 515 | 516 | 517 | 518 | 519 | 520 | 521 | 522 | 523 | 524 | 525 | 526 | 527 | 528 | 529 | 530 | 531 | 532 | 533 | 534 | 535 | 536 | 537 | 538 | 539 | 540 | 541 | 542 | 544 | 545 | 546 | 547 | 548 | 549 | 552 | 553 | 554 | 555 | 556 | 557 | 558 | 559 | 560 | 561 | 562 | 563 | 564 | 565 | 566 | 567 | 568 | 569 | 570 | 571 | 572 | 573 | 574 | 575 | 576 | 577 | 578 | 579 | 580 | -------------------------------------------------------------------------------- /.idea/workspace.xml___jb_tmp___: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 67 | 68 | 69 | 71 | 72 | 75 | 76 | 77 | 83 | 84 | 85 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 113 | 114 | 117 | 118 | 119 | 120 | 123 | 124 | 127 | 128 | 131 | 132 | 135 | 136 | 139 | 140 | 143 | 144 | 145 | 146 | 149 | 150 | 153 | 154 | 157 | 158 | 161 | 162 | 165 | 166 | 169 | 170 | 173 | 174 | 175 | 176 | 179 | 180 | 183 | 184 | 187 | 188 | 191 | 192 | 195 | 196 | 199 | 200 | 201 | 202 | 205 | 206 | 209 | 210 | 213 | 214 | 217 | 218 | 221 | 222 | 223 | 224 | 227 | 228 | 231 | 232 | 235 | 236 | 239 | 240 | 241 | 242 | 245 | 246 | 249 | 250 | 253 | 254 | 257 | 258 | 261 | 262 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 283 | 284 | 285 | 286 | 287 | 292 | 293 | 294 | 320 | 321 | 322 | 347 | 348 | 349 | 355 | 356 | 357 | 370 | 371 | 372 | 389 | 390 | 391 | 398 | 401 | 403 | 404 | 405 | 406 | 407 | 408 | 422 | 423 | 424 | 425 | 426 | 427 | 428 | 429 | 430 | 431 | 432 | 433 | 447 | 448 | 449 | 460 | 461 | 462 | 472 | 473 | 480 | 481 | 482 | 483 | 501 | 508 | 509 | 510 | 512 | 513 | 514 | 515 | 1509200253270 516 | 520 | 521 | 522 | 523 | 524 | 525 | 526 | 527 | 528 | 529 | 530 | 531 | 532 | 533 | 534 | 535 | 536 | 537 | 538 | 539 | 540 | 541 | 542 | 543 | 544 | 545 | 546 | 547 | 548 | 549 | 550 | 551 | 552 | 553 | 554 | 555 | 557 | 558 | 559 | 560 | 561 | 562 | 565 | 566 | 567 | 568 | 569 | 570 | 571 | 572 | 573 | 574 | 575 | 576 | 577 | 578 | 579 | 580 | 581 | 582 | 583 | 584 | 585 | 586 | 587 | 588 | 589 | 590 | 591 | 592 | 593 | 594 | 595 | 596 | 597 | 598 | 599 | 600 | 601 | 602 | 603 | 604 | 605 | 606 | 607 | 608 | 609 | 610 | 611 | 612 | 613 | 614 | 615 | 616 | 617 | 618 | 619 | 620 | 621 | 622 | 623 | 624 | 625 | 626 | 627 | -------------------------------------------------------------------------------- /ExcelReader.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ExcelReadWrite 2 | Data Driven Testing with Selenium and Excel 3 | 4 | ARticle Link: https://www.swtestacademy.com/data-driven-excel-selenium/ 5 | 6 | This project is deprecated. Please check this one: https://github.com/swtestacademy/TestNGAllureReport/tree/data-driven-framework-apache-poi 7 | -------------------------------------------------------------------------------- /TestNG.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /allure-results/02fa0f70-7e11-48b0-98d6-389e7eea2d14-attachment: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/swtestacademy/ExcelReadWrite/3b4a6bb89e860b86c82dedbe24a3d69d04253aca/allure-results/02fa0f70-7e11-48b0-98d6-389e7eea2d14-attachment -------------------------------------------------------------------------------- /allure-results/0e639977-6597-4f92-9d14-b49aef67ea96-container.json: -------------------------------------------------------------------------------- 1 | {"uuid":"0e639977-6597-4f92-9d14-b49aef67ea96","name":"tests.LoginTests","start":1509231059294,"stop":1509231097620,"children":["65d4fec9-82be-4e46-8ea5-79e18e07c5a3","52208500-55a8-4cc8-bb87-0eab64980045"],"befores":[{"name":"Class Level Setup!","status":"passed","stage":"finished","description":"Class Level Setup!","start":1509231059405,"stop":1509231069645}],"afters":[{"name":"Class Level Teardown!","status":"passed","stage":"finished","description":"Class Level Teardown!","start":1509231094358,"stop":1509231095693}]} -------------------------------------------------------------------------------- /allure-results/14c8186c-64e7-43af-9c5a-167cef316783-container.json: -------------------------------------------------------------------------------- 1 | {"uuid":"14c8186c-64e7-43af-9c5a-167cef316783","name":"tests.LoginTests","start":1509235276395,"stop":1509235309633,"children":["8c00490b-2865-4a31-9b48-638fd7a18c55","7fed4d34-8f30-440e-ac34-77ec0aced91b"],"befores":[{"name":"Class Level Setup!","status":"passed","stage":"finished","description":"Class Level Setup!","start":1509235278974,"stop":1509235285528}],"afters":[{"name":"Class Level Teardown!","status":"passed","stage":"finished","description":"Class Level Teardown!","start":1509235305668,"stop":1509235307901}]} -------------------------------------------------------------------------------- /allure-results/1c0e2430-88d2-454c-b7dc-d6387cd91d3a-result.json: -------------------------------------------------------------------------------- 1 | {"uuid":"1c0e2430-88d2-454c-b7dc-d6387cd91d3a","historyId":"c36d7339bf4ae655289298a4091dce63","fullName":"tests.LoginTests.invalidLoginTest_InvalidUserNameInvalidPassword","labels":[{"name":"package","value":"tests.LoginTests"},{"name":"testClass","value":"tests.LoginTests"},{"name":"testMethod","value":"invalidLoginTest_InvalidUserNameInvalidPassword"},{"name":"parentSuite","value":"Default Suite"},{"name":"suite","value":"ExcelReader"},{"name":"subSuite","value":"tests.LoginTests"},{"name":"host","value":"ONUR-PC"},{"name":"thread","value":"7156@ONUR-PC.main(1)"},{"name":"epic","value":"Regression Tests"},{"name":"feature","value":"Login Tests"},{"name":"story","value":"Invalid username and password login test"},{"name":"severity","value":"blocker"}],"links":[],"name":"Invalid Login Scenario with wrong username and password.","status":"passed","statusDetails":{"known":false,"muted":false,"flaky":false},"stage":"finished","description":"Test Description: Login test with wrong username and wrong password.","start":1509229538797,"stop":1509229552000,"steps":[{"name":"Open N11 Step...","status":"passed","stage":"finished","start":1509229538903,"stop":1509229546457},{"name":"Go to Login Page Step...","status":"passed","stage":"finished","start":1509229546458,"stop":1509229549322},{"name":"Login Step with username: {0}, password: {1}, for method: {method} step...","status":"passed","stage":"finished","start":1509229549426,"stop":1509229551411,"parameters":[{"name":"row","value":"\r\n \r\n 5\r\n \r\n \r\n 3\r\n \r\n \r\n 4\r\n \r\n \r\n \r\n 7\r\n \r\n"}]},{"name":"Verify verifyLoginPassword: {0} step...","status":"passed","stage":"finished","start":1509229551915,"stop":1509229551995,"parameters":[{"name":"row","value":"\r\n \r\n 5\r\n \r\n \r\n 3\r\n \r\n \r\n 4\r\n \r\n \r\n \r\n 7\r\n \r\n"}]}],"parameters":[]} -------------------------------------------------------------------------------- /allure-results/2a1841b2-8fab-429d-bef8-2a803f5bfaeb-container.json: -------------------------------------------------------------------------------- 1 | {"uuid":"2a1841b2-8fab-429d-bef8-2a803f5bfaeb","name":"ExcelReader","start":1509229314048,"stop":1509229340028,"children":["9dd9f0ba-53b2-4b1b-9c3d-e470f8591b0c"]} -------------------------------------------------------------------------------- /allure-results/2f637163-b2ed-4fbf-83fc-6bd4a8961399-container.json: -------------------------------------------------------------------------------- 1 | {"uuid":"2f637163-b2ed-4fbf-83fc-6bd4a8961399","name":"Default Suite","start":1509227876186,"stop":1509227900495,"children":["88df63d9-1701-4f15-a693-cb07fd04ff49"]} -------------------------------------------------------------------------------- /allure-results/3fc40a15-54d4-403a-bd7e-56de892ee77f-attachment: -------------------------------------------------------------------------------- 1 | invalidLoginTest_InvalidUserNameInvalidPassword failed and screenshot taken! -------------------------------------------------------------------------------- /allure-results/4ab6f8c7-da29-40f5-9134-9b450d0d63a3-container.json: -------------------------------------------------------------------------------- 1 | {"uuid":"4ab6f8c7-da29-40f5-9134-9b450d0d63a3","name":"tests.LoginTests","start":1509229529549,"stop":1509229555180,"children":["1c0e2430-88d2-454c-b7dc-d6387cd91d3a"],"befores":[{"name":"Class Level Setup!","status":"passed","stage":"finished","description":"Class Level Setup!","start":1509229529613,"stop":1509229538328}],"afters":[{"name":"Class Level Teardown!","status":"passed","stage":"finished","description":"Class Level Teardown!","start":1509229552573,"stop":1509229554312}]} -------------------------------------------------------------------------------- /allure-results/52208500-55a8-4cc8-bb87-0eab64980045-result.json: -------------------------------------------------------------------------------- 1 | {"uuid":"52208500-55a8-4cc8-bb87-0eab64980045","historyId":"80cada435a764b796b0c308b6c8d9479","fullName":"tests.LoginTests.invalidLoginTest_EmptyUserEmptyPassword","labels":[{"name":"package","value":"tests.LoginTests"},{"name":"testClass","value":"tests.LoginTests"},{"name":"testMethod","value":"invalidLoginTest_EmptyUserEmptyPassword"},{"name":"parentSuite","value":"N11 Test Suite"},{"name":"suite","value":"LoginTest"},{"name":"subSuite","value":"tests.LoginTests"},{"name":"host","value":"ONUR-PC"},{"name":"thread","value":"11556@ONUR-PC.main(1)"},{"name":"epic","value":"Regression Tests"},{"name":"feature","value":"Login Tests"},{"name":"story","value":"Empty username and password login test"},{"name":"severity","value":"critical"}],"links":[],"name":"Invalid Login Scenario with empty username and password.","status":"passed","statusDetails":{"known":false,"muted":false,"flaky":false},"stage":"finished","description":"Test Description: Login test with empty username and empty password.","start":1509231085881,"stop":1509231094328,"steps":[{"name":"Open N11 Step...","status":"passed","stage":"finished","start":1509231085881,"stop":1509231091841},{"name":"Go to Login Page Step...","status":"passed","stage":"finished","start":1509231091841,"stop":1509231093132},{"name":"Login Step with username: {0}, password: {1}, for method: {method} step...","status":"passed","stage":"finished","start":1509231093135,"stop":1509231093630,"parameters":[{"name":"row","value":"\r\n \r\n 6\r\n \r\n \r\n \r\n \r\n 11\r\n \r\n \r\n 10\r\n \r\n \r\n"}]},{"name":"Verify username: {0} step...","status":"passed","stage":"finished","start":1509231094131,"stop":1509231094246,"parameters":[{"name":"expectedUserNameMessage","value":"Lütfen e-posta adresinizi girin."}]},{"name":"Verify verifyLoginPassword: {0} step...","status":"passed","stage":"finished","start":1509231094247,"stop":1509231094327,"parameters":[{"name":"expectedPasswordMessage","value":"Bu alanın doldurulması zorunludur."}]}],"parameters":[]} -------------------------------------------------------------------------------- /allure-results/65d4fec9-82be-4e46-8ea5-79e18e07c5a3-result.json: -------------------------------------------------------------------------------- 1 | {"uuid":"65d4fec9-82be-4e46-8ea5-79e18e07c5a3","historyId":"c36d7339bf4ae655289298a4091dce63","fullName":"tests.LoginTests.invalidLoginTest_InvalidUserNameInvalidPassword","labels":[{"name":"package","value":"tests.LoginTests"},{"name":"testClass","value":"tests.LoginTests"},{"name":"testMethod","value":"invalidLoginTest_InvalidUserNameInvalidPassword"},{"name":"parentSuite","value":"N11 Test Suite"},{"name":"suite","value":"LoginTest"},{"name":"subSuite","value":"tests.LoginTests"},{"name":"host","value":"ONUR-PC"},{"name":"thread","value":"11556@ONUR-PC.main(1)"},{"name":"epic","value":"Regression Tests"},{"name":"feature","value":"Login Tests"},{"name":"story","value":"Invalid username and password login test"},{"name":"severity","value":"blocker"}],"links":[],"name":"Invalid Login Scenario with wrong username and password.","status":"passed","statusDetails":{"known":false,"muted":false,"flaky":false},"stage":"finished","description":"Test Description: Login test with wrong username and wrong password.","start":1509231070172,"stop":1509231085385,"steps":[{"name":"Open N11 Step...","status":"passed","stage":"finished","start":1509231070357,"stop":1509231079178},{"name":"Go to Login Page Step...","status":"passed","stage":"finished","start":1509231079179,"stop":1509231082198},{"name":"Login Step with username: {0}, password: {1}, for method: {method} step...","status":"passed","stage":"finished","start":1509231082315,"stop":1509231084683,"parameters":[{"name":"row","value":"\r\n \r\n 5\r\n \r\n \r\n 3\r\n \r\n \r\n 4\r\n \r\n \r\n \r\n 7\r\n \r\n \r\n"}]},{"name":"Verify verifyLoginPassword: {0} step...","status":"passed","stage":"finished","start":1509231085215,"stop":1509231085379,"parameters":[{"name":"expectedPasswordMessage","value":"E-posta adresiniz veya şifreniz hatalı"}]}],"parameters":[]} -------------------------------------------------------------------------------- /allure-results/6a2843f7-0e83-4273-900e-f7c6e7be3a00-container.json: -------------------------------------------------------------------------------- 1 | {"uuid":"6a2843f7-0e83-4273-900e-f7c6e7be3a00","name":"Default Suite","start":1509229314042,"stop":1509229340159,"children":["2a1841b2-8fab-429d-bef8-2a803f5bfaeb"]} -------------------------------------------------------------------------------- /allure-results/7fed4d34-8f30-440e-ac34-77ec0aced91b-result.json: -------------------------------------------------------------------------------- 1 | {"uuid":"7fed4d34-8f30-440e-ac34-77ec0aced91b","historyId":"80cada435a764b796b0c308b6c8d9479","fullName":"tests.LoginTests.invalidLoginTest_EmptyUserEmptyPassword","labels":[{"name":"package","value":"tests.LoginTests"},{"name":"testClass","value":"tests.LoginTests"},{"name":"testMethod","value":"invalidLoginTest_EmptyUserEmptyPassword"},{"name":"parentSuite","value":"N11 Test Suite"},{"name":"suite","value":"LoginTest"},{"name":"subSuite","value":"tests.LoginTests"},{"name":"host","value":"ONUR-PC"},{"name":"thread","value":"6680@ONUR-PC.main(1)"},{"name":"epic","value":"Regression Tests"},{"name":"feature","value":"Login Tests"},{"name":"story","value":"Empty username and password login test"},{"name":"severity","value":"critical"}],"links":[],"name":"Invalid Login Scenario with empty username and password.","status":"passed","statusDetails":{"known":false,"muted":false,"flaky":false},"stage":"finished","description":"Test Description: Login test with empty username and empty password.","start":1509235297279,"stop":1509235305530,"steps":[{"name":"Open N11 Step...","status":"passed","stage":"finished","start":1509235297280,"stop":1509235303046},{"name":"Go to Login Page Step...","status":"passed","stage":"finished","start":1509235303046,"stop":1509235304388},{"name":"Login Step with username: {0}, password: {1}, for method: {method} step...","status":"passed","stage":"finished","start":1509235304392,"stop":1509235304808,"parameters":[{"name":"row","value":"\r\n \r\n 6\r\n \r\n \r\n \r\n \r\n 11\r\n \r\n \r\n 10\r\n \r\n \r\n"}]},{"name":"Verify username: {0} step...","status":"passed","stage":"finished","start":1509235305310,"stop":1509235305384,"parameters":[{"name":"expectedUserNameMessage","value":"Lütfen e-posta adresinizi girin."}]},{"name":"Verify verifyLoginPassword: {0} step...","status":"passed","stage":"finished","start":1509235305384,"stop":1509235305456,"parameters":[{"name":"expectedPasswordMessage","value":"Bu alanın doldurulması zorunludur."}]}],"parameters":[]} -------------------------------------------------------------------------------- /allure-results/817968a5-14bb-4b9e-921c-7439a3c4d8cf-container.json: -------------------------------------------------------------------------------- 1 | {"uuid":"817968a5-14bb-4b9e-921c-7439a3c4d8cf","name":"N11 Test Suite","start":1509235276360,"stop":1509235309825,"children":["e6962be1-6f8b-4325-ad91-46c977670fa2"]} -------------------------------------------------------------------------------- /allure-results/876ede02-2af4-4c3d-b15c-c34c5189505d-container.json: -------------------------------------------------------------------------------- 1 | {"uuid":"876ede02-2af4-4c3d-b15c-c34c5189505d","name":"N11 Test Suite","start":1509231059277,"stop":1509231097777,"children":["af3cee55-8c85-40da-965a-85467f155f1b"]} -------------------------------------------------------------------------------- /allure-results/88df63d9-1701-4f15-a693-cb07fd04ff49-container.json: -------------------------------------------------------------------------------- 1 | {"uuid":"88df63d9-1701-4f15-a693-cb07fd04ff49","name":"ExcelReader","start":1509227876194,"stop":1509227900332,"children":["c0204b50-8d91-4088-8c66-ee3e9ad9ed99"]} -------------------------------------------------------------------------------- /allure-results/8c00490b-2865-4a31-9b48-638fd7a18c55-result.json: -------------------------------------------------------------------------------- 1 | {"uuid":"8c00490b-2865-4a31-9b48-638fd7a18c55","historyId":"c36d7339bf4ae655289298a4091dce63","fullName":"tests.LoginTests.invalidLoginTest_InvalidUserNameInvalidPassword","labels":[{"name":"package","value":"tests.LoginTests"},{"name":"testClass","value":"tests.LoginTests"},{"name":"testMethod","value":"invalidLoginTest_InvalidUserNameInvalidPassword"},{"name":"parentSuite","value":"N11 Test Suite"},{"name":"suite","value":"LoginTest"},{"name":"subSuite","value":"tests.LoginTests"},{"name":"host","value":"ONUR-PC"},{"name":"thread","value":"6680@ONUR-PC.main(1)"},{"name":"epic","value":"Regression Tests"},{"name":"feature","value":"Login Tests"},{"name":"story","value":"Invalid username and password login test"},{"name":"severity","value":"blocker"}],"links":[],"name":"Invalid Login Scenario with wrong username and password.","status":"passed","statusDetails":{"known":false,"muted":false,"flaky":false},"stage":"finished","description":"Test Description: Login test with wrong username and wrong password.","start":1509235286125,"stop":1509235296806,"steps":[{"name":"Open N11 Step...","status":"passed","stage":"finished","start":1509235286255,"stop":1509235291345},{"name":"Go to Login Page Step...","status":"passed","stage":"finished","start":1509235291346,"stop":1509235294328},{"name":"Login Step with username: {0}, password: {1}, for method: {method} step...","status":"passed","stage":"finished","start":1509235294417,"stop":1509235295862,"parameters":[{"name":"row","value":"\r\n \r\n 5\r\n \r\n \r\n 3\r\n \r\n \r\n 4\r\n \r\n \r\n \r\n 7\r\n \r\n \r\n"}]},{"name":"Verify verifyLoginPassword: {0} step...","status":"passed","stage":"finished","start":1509235296390,"stop":1509235296485,"parameters":[{"name":"expectedPasswordMessage","value":"E-posta adresiniz veya şifreniz hatalı"}]}],"parameters":[]} -------------------------------------------------------------------------------- /allure-results/94eef95f-a44c-42d3-b74f-f3e331dee6f2-container.json: -------------------------------------------------------------------------------- 1 | {"uuid":"94eef95f-a44c-42d3-b74f-f3e331dee6f2","name":"Default Suite","start":1509229529526,"stop":1509229555269,"children":["a9e6f92e-a916-429e-bf9b-c53be6e3ee18"]} -------------------------------------------------------------------------------- /allure-results/9dd9f0ba-53b2-4b1b-9c3d-e470f8591b0c-result.json: -------------------------------------------------------------------------------- 1 | {"uuid":"9dd9f0ba-53b2-4b1b-9c3d-e470f8591b0c","historyId":"c36d7339bf4ae655289298a4091dce63","fullName":"tests.LoginTests.invalidLoginTest_InvalidUserNameInvalidPassword","labels":[{"name":"package","value":"tests.LoginTests"},{"name":"testClass","value":"tests.LoginTests"},{"name":"testMethod","value":"invalidLoginTest_InvalidUserNameInvalidPassword"},{"name":"parentSuite","value":"Default Suite"},{"name":"suite","value":"ExcelReader"},{"name":"subSuite","value":"tests.LoginTests"},{"name":"host","value":"ONUR-PC"},{"name":"thread","value":"7992@ONUR-PC.main(1)"},{"name":"epic","value":"Regression Tests"},{"name":"feature","value":"Login Tests"},{"name":"story","value":"Invalid username and password login test"},{"name":"severity","value":"blocker"}],"links":[],"name":"Invalid Login Scenario with wrong username and password.","status":"failed","statusDetails":{"known":false,"muted":false,"flaky":false,"message":"expected [E-posta adresiniz veya şifreniz hatalı] but found [E-posta adresiniz veya şifreniz hatalı]","trace":"java.lang.AssertionError: expected [E-posta adresiniz veya şifreniz hatalı] but found [E-posta adresiniz veya şifreniz hatalı]\r\n\tat org.testng.Assert.fail(Assert.java:93)\r\n\tat org.testng.Assert.failNotEquals(Assert.java:512)\r\n\tat org.testng.Assert.assertEqualsImpl(Assert.java:134)\r\n\tat org.testng.Assert.assertEquals(Assert.java:115)\r\n\tat org.testng.Assert.assertEquals(Assert.java:178)\r\n\tat pages.LoginPage.verifyLoginPassword_aroundBody4(LoginPage.java:44)\r\n\tat pages.LoginPage$AjcClosure5.run(LoginPage.java:1)\r\n\tat org.aspectj.runtime.reflect.JoinPointImpl.proceed(JoinPointImpl.java:149)\r\n\tat io.qameta.allure.aspects.StepsAspects.step(StepsAspects.java:46)\r\n\tat pages.LoginPage.verifyLoginPassword(LoginPage.java:44)\r\n\tat tests.LoginTests.invalidLoginTest_InvalidUserNameInvalidPassword(LoginTests.java:45)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.lang.reflect.Method.invoke(Method.java:498)\r\n\tat org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:108)\r\n\tat org.testng.internal.Invoker.invokeMethod(Invoker.java:661)\r\n\tat org.testng.internal.Invoker.invokeTestMethod(Invoker.java:869)\r\n\tat org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1193)\r\n\tat org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:126)\r\n\tat org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)\r\n\tat org.testng.TestRunner.privateRun(TestRunner.java:744)\r\n\tat org.testng.TestRunner.run(TestRunner.java:602)\r\n\tat org.testng.SuiteRunner.runTest(SuiteRunner.java:380)\r\n\tat org.testng.SuiteRunner.runSequentially(SuiteRunner.java:375)\r\n\tat org.testng.SuiteRunner.privateRun(SuiteRunner.java:340)\r\n\tat org.testng.SuiteRunner.run(SuiteRunner.java:289)\r\n\tat org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)\r\n\tat org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)\r\n\tat org.testng.TestNG.runSuitesSequentially(TestNG.java:1301)\r\n\tat org.testng.TestNG.runSuitesLocally(TestNG.java:1226)\r\n\tat org.testng.TestNG.runSuites(TestNG.java:1144)\r\n\tat org.testng.TestNG.run(TestNG.java:1115)\r\n\tat org.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:72)\r\n\tat org.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:127)\r\n"},"stage":"finished","description":"Test Description: Login test with wrong username and wrong password.","start":1509229324630,"stop":1509229336065,"steps":[{"name":"Open N11 Step...","status":"passed","stage":"finished","start":1509229324747,"stop":1509229330361},{"name":"Go to Login Page Step...","status":"passed","stage":"finished","start":1509229330364,"stop":1509229332688},{"name":"Login Step with username: {0}, password: {1}, for method: {method} step...","status":"passed","stage":"finished","start":1509229332786,"stop":1509229334314,"parameters":[{"name":"row","value":"\r\n \r\n 5\r\n \r\n \r\n 3\r\n \r\n \r\n 4\r\n \r\n \r\n \r\n 7\r\n \r\n"}]},{"name":"Verify verifyLoginPassword: {0} step...","status":"failed","statusDetails":{"known":false,"muted":false,"flaky":false,"message":"expected [E-posta adresiniz veya şifreniz hatalı] but found [E-posta adresiniz veya şifreniz hatalı]","trace":"java.lang.AssertionError: expected [E-posta adresiniz veya şifreniz hatalı] but found [E-posta adresiniz veya şifreniz hatalı]\r\n\tat org.testng.Assert.fail(Assert.java:93)\r\n\tat org.testng.Assert.failNotEquals(Assert.java:512)\r\n\tat org.testng.Assert.assertEqualsImpl(Assert.java:134)\r\n\tat org.testng.Assert.assertEquals(Assert.java:115)\r\n\tat org.testng.Assert.assertEquals(Assert.java:178)\r\n\tat pages.LoginPage.verifyLoginPassword_aroundBody4(LoginPage.java:44)\r\n\tat pages.LoginPage$AjcClosure5.run(LoginPage.java:1)\r\n\tat org.aspectj.runtime.reflect.JoinPointImpl.proceed(JoinPointImpl.java:149)\r\n\tat io.qameta.allure.aspects.StepsAspects.step(StepsAspects.java:46)\r\n\tat pages.LoginPage.verifyLoginPassword(LoginPage.java:44)\r\n\tat tests.LoginTests.invalidLoginTest_InvalidUserNameInvalidPassword(LoginTests.java:45)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.lang.reflect.Method.invoke(Method.java:498)\r\n\tat org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:108)\r\n\tat org.testng.internal.Invoker.invokeMethod(Invoker.java:661)\r\n\tat org.testng.internal.Invoker.invokeTestMethod(Invoker.java:869)\r\n\tat org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1193)\r\n\tat org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:126)\r\n\tat org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)\r\n\tat org.testng.TestRunner.privateRun(TestRunner.java:744)\r\n\tat org.testng.TestRunner.run(TestRunner.java:602)\r\n\tat org.testng.SuiteRunner.runTest(SuiteRunner.java:380)\r\n\tat org.testng.SuiteRunner.runSequentially(SuiteRunner.java:375)\r\n\tat org.testng.SuiteRunner.privateRun(SuiteRunner.java:340)\r\n\tat org.testng.SuiteRunner.run(SuiteRunner.java:289)\r\n\tat org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)\r\n\tat org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)\r\n\tat org.testng.TestNG.runSuitesSequentially(TestNG.java:1301)\r\n\tat org.testng.TestNG.runSuitesLocally(TestNG.java:1226)\r\n\tat org.testng.TestNG.runSuites(TestNG.java:1144)\r\n\tat org.testng.TestNG.run(TestNG.java:1115)\r\n\tat org.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:72)\r\n\tat org.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:127)\r\n"},"stage":"finished","start":1509229334816,"stop":1509229334907,"parameters":[{"name":"row","value":"\r\n \r\n 5\r\n \r\n \r\n 3\r\n \r\n \r\n 4\r\n \r\n \r\n \r\n 7\r\n \r\n"}]}],"attachments":[{"name":"Page screenshot","source":"c84735f5-2a55-4c65-8286-7412ab288d54-attachment","type":"image/png"},{"name":"{0}","source":"3fc40a15-54d4-403a-bd7e-56de892ee77f-attachment","type":"text/plain"}],"parameters":[]} -------------------------------------------------------------------------------- /allure-results/a9e6f92e-a916-429e-bf9b-c53be6e3ee18-container.json: -------------------------------------------------------------------------------- 1 | {"uuid":"a9e6f92e-a916-429e-bf9b-c53be6e3ee18","name":"ExcelReader","start":1509229529532,"stop":1509229555130,"children":["1c0e2430-88d2-454c-b7dc-d6387cd91d3a"]} -------------------------------------------------------------------------------- /allure-results/af3cee55-8c85-40da-965a-85467f155f1b-container.json: -------------------------------------------------------------------------------- 1 | {"uuid":"af3cee55-8c85-40da-965a-85467f155f1b","name":"LoginTest","start":1509231059283,"stop":1509231097581,"children":["65d4fec9-82be-4e46-8ea5-79e18e07c5a3","52208500-55a8-4cc8-bb87-0eab64980045"]} -------------------------------------------------------------------------------- /allure-results/c0204b50-8d91-4088-8c66-ee3e9ad9ed99-result.json: -------------------------------------------------------------------------------- 1 | {"uuid":"c0204b50-8d91-4088-8c66-ee3e9ad9ed99","historyId":"c36d7339bf4ae655289298a4091dce63","fullName":"tests.LoginTests.invalidLoginTest_InvalidUserNameInvalidPassword","labels":[{"name":"package","value":"tests.LoginTests"},{"name":"testClass","value":"tests.LoginTests"},{"name":"testMethod","value":"invalidLoginTest_InvalidUserNameInvalidPassword"},{"name":"parentSuite","value":"Default Suite"},{"name":"suite","value":"ExcelReader"},{"name":"subSuite","value":"tests.LoginTests"},{"name":"host","value":"ONUR-PC"},{"name":"thread","value":"8116@ONUR-PC.main(1)"},{"name":"epic","value":"Regression Tests"},{"name":"feature","value":"Login Tests"},{"name":"story","value":"Invalid username and password login test"},{"name":"severity","value":"blocker"}],"links":[],"name":"Invalid Login Scenario with wrong username and password.","status":"broken","statusDetails":{"known":false,"muted":false,"flaky":false,"trace":"java.lang.NullPointerException\r\n\tat utils.excelutils.ExcelUtil.getRowData(ExcelUtil.java:75)\r\n\tat tests.LoginTests.invalidLoginTest_InvalidUserNameInvalidPassword(LoginTests.java:41)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.lang.reflect.Method.invoke(Method.java:498)\r\n\tat org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:108)\r\n\tat org.testng.internal.Invoker.invokeMethod(Invoker.java:661)\r\n\tat org.testng.internal.Invoker.invokeTestMethod(Invoker.java:869)\r\n\tat org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1193)\r\n\tat org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:126)\r\n\tat org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)\r\n\tat org.testng.TestRunner.privateRun(TestRunner.java:744)\r\n\tat org.testng.TestRunner.run(TestRunner.java:602)\r\n\tat org.testng.SuiteRunner.runTest(SuiteRunner.java:380)\r\n\tat org.testng.SuiteRunner.runSequentially(SuiteRunner.java:375)\r\n\tat org.testng.SuiteRunner.privateRun(SuiteRunner.java:340)\r\n\tat org.testng.SuiteRunner.run(SuiteRunner.java:289)\r\n\tat org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)\r\n\tat org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)\r\n\tat org.testng.TestNG.runSuitesSequentially(TestNG.java:1301)\r\n\tat org.testng.TestNG.runSuitesLocally(TestNG.java:1226)\r\n\tat org.testng.TestNG.runSuites(TestNG.java:1144)\r\n\tat org.testng.TestNG.run(TestNG.java:1115)\r\n\tat org.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:72)\r\n\tat org.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:127)\r\n"},"stage":"finished","description":"Test Description: Login test with wrong username and wrong password.","start":1509227886529,"stop":1509227895323,"steps":[{"name":"Open N11 Step...","status":"passed","stage":"finished","start":1509227886689,"stop":1509227892440},{"name":"Go to Login Page Step...","status":"passed","stage":"finished","start":1509227892441,"stop":1509227894179}],"attachments":[{"name":"Page screenshot","source":"02fa0f70-7e11-48b0-98d6-389e7eea2d14-attachment","type":"image/png"},{"name":"{0}","source":"cec0756f-df6d-4aff-8acd-6d835365ad7f-attachment","type":"text/plain"}],"parameters":[]} -------------------------------------------------------------------------------- /allure-results/c84735f5-2a55-4c65-8286-7412ab288d54-attachment: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/swtestacademy/ExcelReadWrite/3b4a6bb89e860b86c82dedbe24a3d69d04253aca/allure-results/c84735f5-2a55-4c65-8286-7412ab288d54-attachment -------------------------------------------------------------------------------- /allure-results/cde84020-382f-4de7-880f-5acbd3a9ea10-container.json: -------------------------------------------------------------------------------- 1 | {"uuid":"cde84020-382f-4de7-880f-5acbd3a9ea10","name":"tests.LoginTests","start":1509229314063,"stop":1509229340100,"children":["9dd9f0ba-53b2-4b1b-9c3d-e470f8591b0c"],"befores":[{"name":"Class Level Setup!","status":"passed","stage":"finished","description":"Class Level Setup!","start":1509229314112,"stop":1509229324069}],"afters":[{"name":"Class Level Teardown!","status":"passed","stage":"finished","description":"Class Level Teardown!","start":1509229336326,"stop":1509229338958}]} -------------------------------------------------------------------------------- /allure-results/cec0756f-df6d-4aff-8acd-6d835365ad7f-attachment: -------------------------------------------------------------------------------- 1 | invalidLoginTest_InvalidUserNameInvalidPassword failed and screenshot taken! -------------------------------------------------------------------------------- /allure-results/e6962be1-6f8b-4325-ad91-46c977670fa2-container.json: -------------------------------------------------------------------------------- 1 | {"uuid":"e6962be1-6f8b-4325-ad91-46c977670fa2","name":"LoginTest","start":1509235276381,"stop":1509235309593,"children":["8c00490b-2865-4a31-9b48-638fd7a18c55","7fed4d34-8f30-440e-ac34-77ec0aced91b"],"befores":[{"name":"setupTestData","status":"passed","stage":"finished","description":"","start":1509235276449,"stop":1509235278956}]} -------------------------------------------------------------------------------- /allure-results/eb389e27-c12e-4cfa-81e3-8e4ad15d6bbe-container.json: -------------------------------------------------------------------------------- 1 | {"uuid":"eb389e27-c12e-4cfa-81e3-8e4ad15d6bbe","name":"tests.LoginTests","start":1509227876338,"stop":1509227900411,"children":["c0204b50-8d91-4088-8c66-ee3e9ad9ed99"],"befores":[{"name":"Class Level Setup!","status":"passed","stage":"finished","description":"Class Level Setup!","start":1509227876799,"stop":1509227885497}],"afters":[{"name":"Class Level Teardown!","status":"passed","stage":"finished","description":"Class Level Teardown!","start":1509227895560,"stop":1509227898424}]} -------------------------------------------------------------------------------- /extentreports/ExtentReportResults.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | ExtentReports 2.0 19 | 20 | 21 | 22 | 23 | 24 | 25 | 32 | 33 | 34 | 35 | 36 | 37 | 63 | 64 | 65 | 66 |
67 | 68 | 69 |
70 |
71 |
72 |
73 | Total Tests 74 | 75 |
76 |
77 |
78 |
79 | Total Steps 80 | 81 |
82 |
83 |
84 |
85 | Total Time Taken (Current Run) 86 | 0h 0m 24s+130ms 87 |
88 |
89 |
90 |
91 | Total Time Taken (Overall) 92 | 0h 0m 24s+130ms 93 |
94 |
95 |
96 |
97 | Start 98 | 2017-10-29 03:01:25 99 |
100 |
101 |
102 |
103 | End 104 | 2017-10-29 03:01:49 105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 | Tests View 113 |
114 | 117 |
118 | 119 |
120 |
121 | test(s) passed 122 |
123 |
124 | test(s) failed, others 125 |
126 |
127 |
128 |
129 |
130 |
131 | Steps View 132 |
133 | 136 |
137 | 138 |
139 |
140 | step(s) passed 141 |
142 |
143 | step(s) failed, others 144 |
145 |
146 |
147 |
148 |
149 | Pass Percentage 150 | 151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 | Environment 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 |
ParamValue
User Nameobaskirt
OSWindows 10
Java Version1.8.0_131
Host NameONUR-PC
187 |
188 |
189 |
190 |
191 | 192 | 193 | 194 |
195 |
196 |
197 |
198 |
Tests
199 |
200 |
201 |
202 | 203 | 204 | 205 | 213 |
214 |
215 | 216 | 217 | 218 |
219 |
220 | 221 | 222 | 223 |
224 |
225 | 226 | 227 | 228 |
229 | 237 |
238 |
239 |
240 |
    241 |
  • 242 |
    243 | invalidLoginTest_InvalidUserNameInvalidPassword 244 | unknown 245 | 246 |
    247 |
    248 |
    249 | 2017-10-29 03:01:25 250 | 251 | 252 |
    253 |
    254 |
    255 |
    256 |
    257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 |
    StatusTimestampDetails
    268 |
      269 |
    270 |
    271 |
    272 |
  • 273 |
  • 274 |
    275 | invalidLoginTest_InvalidUserNameInvalidPassword 276 | pass 277 | 278 |
    279 |
    280 |
    281 | 2017-10-29 03:01:26 282 | 283 | 284 |
    285 |
    Invalid Login Scenario with wrong username and password.
    286 |
    287 |
    288 |
    289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 |
    StatusTimestampDetails
    03:01:36Test passed
    03:01:37Test passed
    310 |
      311 |
    312 |
    313 |
    314 |
  • 315 |
  • 316 |
    317 | invalidLoginTest_EmptyUserEmptyPassword 318 | unknown 319 | 320 |
    321 |
    322 |
    323 | 2017-10-29 03:01:37 324 | 325 | 326 |
    327 |
    328 |
    329 |
    330 |
    331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 |
    StatusTimestampDetails
    342 |
      343 |
    344 |
    345 |
    346 |
  • 347 |
  • 348 |
    349 | invalidLoginTest_EmptyUserEmptyPassword 350 | pass 351 | 352 |
    353 |
    354 |
    355 | 2017-10-29 03:01:37 356 | 2017-10-29 03:01:47 357 | 0h 0m 10s+621ms 358 |
    359 |
    Invalid Login Scenario with empty username and password.
    360 |
    361 |
    362 |
    363 | 364 | 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | 376 | 377 | 378 | 379 | 380 | 381 | 382 | 383 |
    StatusTimestampDetails
    03:01:45Test passed
    03:01:45Test passed
    384 |
      385 |
    386 |
    387 |
    388 |
  • 389 |
390 |
391 |
392 |
393 |
394 |
395 |
396 |
397 |
398 |
399 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 |
408 |
409 |
410 |
411 |
412 |
413 |
414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 425 |
426 | 427 | 428 | 429 | 445 | 446 | 447 | 448 | 479 | 480 | 481 | 482 | 483 | 484 | 493 | 494 | 495 | -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 4.0.0 6 | 7 | ExcelReader 8 | ExcelReader 9 | 1.0-SNAPSHOT 10 | 11 | 12 | 1.8.10 13 | UTF-8 14 | 15 | 16 | 17 | 18 | 19 | org.seleniumhq.selenium 20 | selenium-java 21 | 3.141.59 22 | 23 | 24 | 25 | com.relevantcodes 26 | extentreports 27 | 2.41.2 28 | 29 | 30 | 31 | 32 | org.testng 33 | testng 34 | 6.14.3 35 | 36 | 37 | 38 | ru.yandex.qatools.ashot 39 | ashot 40 | 1.5.4 41 | 42 | 43 | 44 | io.qameta.allure 45 | allure-testng 46 | 2.10.0 47 | 48 | 49 | 50 | org.apache.poi 51 | poi 52 | 4.0.1 53 | 54 | 55 | 56 | org.apache.poi 57 | poi-ooxml 58 | 4.0.1 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | org.apache.maven.plugins 67 | maven-compiler-plugin 68 | 69 | 1.8 70 | 1.8 71 | 72 | 73 | 74 | org.apache.maven.plugins 75 | maven-surefire-plugin 76 | 2.21 77 | 78 | 79 | TestNG.xml 80 | 81 | 82 | -javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar" 83 | 84 | 85 | 86 | 87 | org.aspectj 88 | aspectjweaver 89 | ${aspectj.version} 90 | 91 | 92 | 93 | 94 | 95 | 96 | -------------------------------------------------------------------------------- /src/main/java/pages/BasePage.java: -------------------------------------------------------------------------------- 1 | package pages; 2 | 3 | import io.qameta.allure.Attachment; 4 | import org.openqa.selenium.By; 5 | import org.openqa.selenium.OutputType; 6 | import org.openqa.selenium.TakesScreenshot; 7 | import org.openqa.selenium.WebDriver; 8 | import org.openqa.selenium.support.ui.WebDriverWait; 9 | import org.testng.annotations.AfterClass; 10 | 11 | public class BasePage { 12 | public WebDriver driver; 13 | public WebDriverWait wait; 14 | 15 | //Constructor 16 | public BasePage (WebDriver driver, WebDriverWait wait){ 17 | this.driver = driver; 18 | this.wait = wait; 19 | } 20 | 21 | //Click Method 22 | public void click (By elementLocation) { 23 | driver.findElement(elementLocation).click(); 24 | } 25 | 26 | //Write Text 27 | public void writeText (By elementLocation, String text) { 28 | driver.findElement(elementLocation).sendKeys(text); 29 | } 30 | 31 | //Read Text 32 | public String readText (By elementLocation) { 33 | return driver.findElement(elementLocation).getText(); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/pages/HomePage.java: -------------------------------------------------------------------------------- 1 | package pages; 2 | 3 | import io.qameta.allure.Step; 4 | import org.openqa.selenium.By; 5 | import org.openqa.selenium.WebDriver; 6 | import org.openqa.selenium.support.ui.WebDriverWait; 7 | 8 | public class HomePage extends BasePage { 9 | 10 | //*********Constructor********* 11 | public HomePage (WebDriver driver, WebDriverWait wait) { 12 | super(driver, wait); 13 | } 14 | 15 | //*********Page Variables********* 16 | String baseURL = "http://www.n11.com/"; 17 | 18 | //*********Web Elements********* 19 | String signInButtonClass = "btnSignIn"; 20 | 21 | 22 | //*********Page Methods********* 23 | 24 | //Go to Homepage 25 | @Step("Open N11 Step...") 26 | public void goToN11 (){ 27 | driver.get(baseURL); 28 | //driver.navigate().to(baseURL) 29 | } 30 | 31 | //Go to LoginPage 32 | @Step("Go to Login Page Step...") 33 | public void goToLoginPage (){ 34 | click(By.className(signInButtonClass)); 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/pages/LoginPage.java: -------------------------------------------------------------------------------- 1 | package pages; 2 | 3 | import io.qameta.allure.Step; 4 | import org.apache.poi.xssf.usermodel.XSSFRow; 5 | import org.openqa.selenium.By; 6 | import org.openqa.selenium.WebDriver; 7 | import org.openqa.selenium.support.ui.WebDriverWait; 8 | import org.testng.Assert; 9 | 10 | public class LoginPage extends BasePage { 11 | 12 | //*********Constructor********* 13 | public LoginPage(WebDriver driver, WebDriverWait wait) { 14 | super(driver, wait); 15 | } 16 | 17 | //*********Web Elements********* 18 | String usenameId = "email"; 19 | String passwordId = "password"; 20 | String loginButtonId = "loginButton"; 21 | String errorMessageUsernameXpath = "//*[@id=\"loginForm\"]/div[1]/div/div"; 22 | String errorMessagePasswordXpath = "//*[@id=\"loginForm\"]/div[2]/div/div"; 23 | 24 | //*********Page Methods********* 25 | @Step("Login Step with username: {0}, password: {1}, for method: {method} step...") 26 | public void loginToN11 (XSSFRow row){ 27 | //Enter Username(Email) 28 | writeText(By.id(usenameId),row.getCell(1).toString()); 29 | //Enter Password 30 | writeText(By.id(passwordId), row.getCell(2).toString()); 31 | //Click Login Button 32 | click(By.id(loginButtonId)); 33 | } 34 | 35 | //Verify Username Condition 36 | @Step("Verify username: {0} step...") 37 | public void verifyLoginUserName (String expectedUserNameMessage) { 38 | Assert.assertEquals(readText(By.xpath(errorMessageUsernameXpath)), expectedUserNameMessage); 39 | } 40 | 41 | //Verify Password Condition 42 | @Step("Verify verifyLoginPassword: {0} step...") 43 | public void verifyLoginPassword (String expectedPasswordMessage) { 44 | Assert.assertEquals(readText(By.xpath(errorMessagePasswordXpath)), expectedPasswordMessage); 45 | } 46 | 47 | } 48 | -------------------------------------------------------------------------------- /src/test/java/resources/testdata.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/swtestacademy/ExcelReadWrite/3b4a6bb89e860b86c82dedbe24a3d69d04253aca/src/test/java/resources/testdata.xlsx -------------------------------------------------------------------------------- /src/test/java/tests/BaseTest.java: -------------------------------------------------------------------------------- 1 | package tests; 2 | 3 | import org.openqa.selenium.WebDriver; 4 | import org.openqa.selenium.chrome.ChromeDriver; 5 | import org.openqa.selenium.support.ui.WebDriverWait; 6 | import org.testng.annotations.AfterClass; 7 | import org.testng.annotations.BeforeClass; 8 | import org.testng.annotations.BeforeTest; 9 | import utils.excelutils.ExcelUtil; 10 | 11 | public class BaseTest { 12 | public WebDriver driver; 13 | public WebDriverWait wait; 14 | //Global test data excel file 15 | public static final String testDataExcelFileName = "testdata.xlsx"; 16 | 17 | 18 | public WebDriver getDriver() { 19 | return driver; 20 | } 21 | 22 | 23 | @BeforeClass (description = "Class Level Setup!") 24 | public void setup () { 25 | //Create a Chrome driver. All test classes use this. 26 | driver = new ChromeDriver(); 27 | 28 | //Create a wait. All test classes use this. 29 | wait = new WebDriverWait(driver,15); 30 | 31 | //Maximize Window 32 | driver.manage().window().maximize(); 33 | } 34 | 35 | @AfterClass(description = "Class Level Teardown!") 36 | public void teardown () { 37 | driver.quit(); 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /src/test/java/tests/LoginTests.java: -------------------------------------------------------------------------------- 1 | package tests; 2 | 3 | import io.qameta.allure.*; 4 | import org.openqa.selenium.By; 5 | import org.openqa.selenium.support.ui.ExpectedConditions; 6 | import org.testng.annotations.BeforeTest; 7 | import org.testng.annotations.Listeners; 8 | import org.testng.annotations.Test; 9 | import pages.HomePage; 10 | import pages.LoginPage; 11 | import utils.excelutils.ExcelUtil; 12 | import utils.extentreports.ExtentTestManager; 13 | import utils.listeners.TestListener; 14 | 15 | 16 | 17 | //In order to eliminate attachment problem for Allure, you should add @Listener line. 18 | //link: https://github.com/allure-framework/allure1/issues/730 19 | @Listeners({ TestListener.class }) 20 | @Epic("Regression Tests") 21 | @Feature("Login Tests") 22 | public class LoginTests extends BaseTest { 23 | 24 | @BeforeTest 25 | public void setupTestData () { 26 | //Set Test Data Excel and Sheet 27 | System.out.println("************Setup Test Level Data**********"); 28 | ExcelUtil.setExcelFileSheet("LoginData"); 29 | } 30 | 31 | @Test (priority = 0, description="Invalid Login Scenario with wrong username and password.") 32 | @Severity(SeverityLevel.BLOCKER) 33 | @Description("Test Description: Login test with wrong username and wrong password.") 34 | @Story("Invalid username and password login test") 35 | public void invalidLoginTest_InvalidUserNameInvalidPassword () throws InterruptedException { 36 | //extentreports Description 37 | ExtentTestManager.getTest().setDescription("Invalid Login Scenario with wrong username and password."); 38 | 39 | //*************PAGE INSTANTIATIONS************* 40 | HomePage homePage = new HomePage(driver,wait); 41 | LoginPage loginPage = new LoginPage(driver,wait); 42 | 43 | //*************PAGE METHODS******************** 44 | //Open N11 HomePage 45 | homePage.goToN11(); 46 | 47 | //Go to LoginPage 48 | homePage.goToLoginPage(); 49 | 50 | //Login to N11 with first row of the login data 51 | loginPage.loginToN11(ExcelUtil.getRowData(1)); 52 | 53 | //Set test row number to 1 54 | ExcelUtil.setRowNumber(1); 55 | 56 | //Set Test Status Column number to 5 57 | ExcelUtil.setColumnNumber(5); 58 | 59 | //*************ASSERTIONS*********************** 60 | wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//*[@id=\"loginForm\"]/div[2]/div/div"))); 61 | //Verify password message by using excel's 2st row, 5th column 62 | //Row and Column numbers starting from 0. Thus we need to write 1 and 4, instead of 2 and 5! 63 | loginPage.verifyLoginPassword(ExcelUtil.getCellData(1,4)); 64 | } 65 | 66 | @Test (priority = 1, description="Invalid Login Scenario with empty username and password.") 67 | @Severity(SeverityLevel.CRITICAL) 68 | @Description("Test Description: Login test with empty username and empty password.") 69 | @Story("Empty username and password login test") 70 | public void invalidLoginTest_EmptyUserEmptyPassword () throws InterruptedException { 71 | //extentreports Description 72 | ExtentTestManager.getTest().setDescription("Invalid Login Scenario with empty username and password."); 73 | 74 | //*************PAGE INSTANTIATIONS************* 75 | HomePage homePage = new HomePage(driver,wait); 76 | LoginPage loginPage = new LoginPage(driver,wait); 77 | 78 | //*************PAGE METHODS******************** 79 | homePage.goToN11(); 80 | homePage.goToLoginPage(); 81 | 82 | //Login to N11 with second row of the login data 83 | loginPage.loginToN11(ExcelUtil.getRowData(2)); 84 | 85 | //Set test row number to 2 86 | ExcelUtil.setRowNumber(2); 87 | 88 | //Set Test Status column number to 5 89 | ExcelUtil.setColumnNumber(5); 90 | 91 | //*************ASSERTIONS*********************** 92 | wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//*[@id=\"loginForm\"]/div[1]/div/div"))); 93 | //Verify by 3rd row and 4th column 94 | loginPage.verifyLoginUserName(ExcelUtil.getCellData(2,3)); 95 | //Verify by 3rd row and 5th column 96 | loginPage.verifyLoginPassword(ExcelUtil.getCellData(2,4)); 97 | } 98 | 99 | } 100 | -------------------------------------------------------------------------------- /src/test/java/utils/excelutils/ExcelUtil.java: -------------------------------------------------------------------------------- 1 | package utils.excelutils; 2 | 3 | import org.apache.poi.ss.usermodel.DataFormatter; 4 | import org.apache.poi.xssf.usermodel.XSSFCell; 5 | import org.apache.poi.xssf.usermodel.XSSFRow; 6 | import org.apache.poi.xssf.usermodel.XSSFSheet; 7 | import org.apache.poi.xssf.usermodel.XSSFWorkbook; 8 | import org.openqa.selenium.Platform; 9 | 10 | import java.io.FileInputStream; 11 | import java.io.FileOutputStream; 12 | import java.io.IOException; 13 | 14 | import static tests.BaseTest.testDataExcelFileName; 15 | 16 | /** 17 | * Created by obaskirt on 28-Oct-17. 18 | * Updated by obaskirt on 02-Apr-2019 19 | */ 20 | public class ExcelUtil { 21 | //Main Directory of the project 22 | public static final String currentDir = System.getProperty("user.dir"); 23 | 24 | //Location of Test data excel file 25 | public static String testDataExcelPath = null; 26 | 27 | //Excel WorkBook 28 | private static XSSFWorkbook excelWBook; 29 | 30 | //Excel Sheet 31 | private static XSSFSheet excelWSheet; 32 | 33 | //Excel cell 34 | private static XSSFCell cell; 35 | 36 | //Excel row 37 | private static XSSFRow row; 38 | 39 | //Row Number 40 | public static int rowNumber; 41 | 42 | //Column Number 43 | public static int columnNumber; 44 | 45 | //Setter and Getters of row and columns 46 | public static void setRowNumber(int pRowNumber) { 47 | rowNumber = pRowNumber; 48 | } 49 | 50 | public static int getRowNumber() { 51 | return rowNumber; 52 | } 53 | 54 | public static void setColumnNumber(int pColumnNumber) { 55 | columnNumber = pColumnNumber; 56 | } 57 | 58 | public static int getColumnNumber() { 59 | return columnNumber; 60 | } 61 | 62 | // This method has two parameters: "Test data excel file name" and "Excel sheet name" 63 | // It creates FileInputStream and set excel file and excel sheet to excelWBook and excelWSheet variables. 64 | public static void setExcelFileSheet(String sheetName) { 65 | //MAC or Windows Selection for excel path 66 | if (Platform.getCurrent().toString().equalsIgnoreCase("MAC")) { 67 | testDataExcelPath = currentDir + "//src//test//java//resources//"; 68 | } else if (Platform.getCurrent().toString().contains("WIN")) { 69 | testDataExcelPath = currentDir + "\\src\\test\\java\\resources\\"; 70 | } 71 | try { 72 | // Open the Excel file 73 | FileInputStream ExcelFile = new FileInputStream(testDataExcelPath + testDataExcelFileName); 74 | excelWBook = new XSSFWorkbook(ExcelFile); 75 | excelWSheet = excelWBook.getSheet(sheetName); 76 | } catch (Exception e) { 77 | try { 78 | throw (e); 79 | } catch (IOException e1) { 80 | e1.printStackTrace(); 81 | } 82 | } 83 | } 84 | 85 | //This method reads the test data from the Excel cell. 86 | //We are passing row number and column number as parameters. 87 | public static String getCellData(int RowNum, int ColNum) { 88 | try { 89 | cell = excelWSheet.getRow(RowNum).getCell(ColNum); 90 | DataFormatter formatter = new DataFormatter(); 91 | String cellData = formatter.formatCellValue(cell); 92 | return cellData; 93 | } catch (Exception e) { 94 | throw (e); 95 | } 96 | } 97 | 98 | //This method takes row number as a parameter and returns the data of given row number. 99 | public static XSSFRow getRowData(int RowNum) { 100 | try { 101 | row = excelWSheet.getRow(RowNum); 102 | return row; 103 | } catch (Exception e) { 104 | throw (e); 105 | } 106 | } 107 | 108 | //This method gets excel file, row and column number and set a value to the that cell. 109 | public static void setCellData(String value, int RowNum, int ColNum) { 110 | try { 111 | row = excelWSheet.getRow(RowNum); 112 | cell = row.getCell(ColNum); 113 | if (cell == null) { 114 | cell = row.createCell(ColNum); 115 | cell.setCellValue(value); 116 | } else { 117 | cell.setCellValue(value); 118 | } 119 | // Constant variables Test Data path and Test Data file name 120 | FileOutputStream fileOut = new FileOutputStream(testDataExcelPath + testDataExcelFileName); 121 | excelWBook.write(fileOut); 122 | fileOut.flush(); 123 | fileOut.close(); 124 | } catch (Exception e) { 125 | try { 126 | throw (e); 127 | } catch (IOException e1) { 128 | e1.printStackTrace(); 129 | } 130 | } 131 | } 132 | } 133 | -------------------------------------------------------------------------------- /src/test/java/utils/extentreports/ExtentManager.java: -------------------------------------------------------------------------------- 1 | package utils.extentreports; 2 | 3 | import com.relevantcodes.extentreports.ExtentReports; 4 | 5 | //OB: extentreports extent instance created here. That instance can be reachable by getReporter() method. 6 | 7 | public class ExtentManager { 8 | 9 | private static ExtentReports extent; 10 | 11 | public synchronized static ExtentReports getReporter(){ 12 | if(extent == null){ 13 | //Set HTML reporting file location 14 | String workingDir = System.getProperty("user.dir"); 15 | extent = new ExtentReports(workingDir+"\\extentreports\\ExtentReportResults.html", true); 16 | } 17 | return extent; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/test/java/utils/extentreports/ExtentTestManager.java: -------------------------------------------------------------------------------- 1 | package utils.extentreports; 2 | 3 | import com.relevantcodes.extentreports.ExtentReports; 4 | import com.relevantcodes.extentreports.ExtentTest; 5 | 6 | import java.util.HashMap; 7 | import java.util.Map; 8 | 9 | /* OB: extentTestMap holds the information of thread ids and ExtentTest instances. 10 | extentreports instance created by calling getReporter() method from ExtentManager. 11 | At startTest() method, an instance of ExtentTest created and put into extentTestMap with current thread id. 12 | At endTest() method, test ends and ExtentTest instance got from extentTestMap via current thread id. 13 | At getTest() method, return ExtentTest instance in extentTestMap by using current thread id. 14 | */ 15 | 16 | public class ExtentTestManager { 17 | static Map extentTestMap = new HashMap(); 18 | static ExtentReports extent = ExtentManager.getReporter(); 19 | 20 | public static synchronized ExtentTest getTest() { 21 | return (ExtentTest)extentTestMap.get((int) (long) (Thread.currentThread().getId())); 22 | } 23 | 24 | public static synchronized void endTest() { 25 | extent.endTest((ExtentTest)extentTestMap.get((int) (long) (Thread.currentThread().getId()))); 26 | } 27 | 28 | public static synchronized ExtentTest startTest(String testName, String desc) { 29 | ExtentTest test = extent.startTest(testName, desc); 30 | extentTestMap.put((int) (long) (Thread.currentThread().getId()), test); 31 | return test; 32 | } 33 | } -------------------------------------------------------------------------------- /src/test/java/utils/listeners/AnnotationTransformer.java: -------------------------------------------------------------------------------- 1 | package utils.listeners; 2 | 3 | import org.testng.IAnnotationTransformer; 4 | import org.testng.annotations.ITestAnnotation; 5 | 6 | import java.lang.reflect.Constructor; 7 | import java.lang.reflect.Method; 8 | 9 | public class AnnotationTransformer implements IAnnotationTransformer { 10 | 11 | @Override 12 | public void transform(ITestAnnotation annotation, Class testClass, Constructor testConstructor, Method testMethod) { 13 | annotation.setRetryAnalyzer(Retry.class); 14 | } 15 | } 16 | 17 | -------------------------------------------------------------------------------- /src/test/java/utils/listeners/Retry.java: -------------------------------------------------------------------------------- 1 | package utils.listeners; 2 | 3 | import com.relevantcodes.extentreports.LogStatus; 4 | import org.openqa.selenium.OutputType; 5 | import org.openqa.selenium.TakesScreenshot; 6 | import org.openqa.selenium.WebDriver; 7 | import org.testng.IRetryAnalyzer; 8 | import org.testng.ITestResult; 9 | import tests.BaseTest; 10 | import utils.extentreports.ExtentTestManager; 11 | 12 | public class Retry implements IRetryAnalyzer { 13 | 14 | private int count = 0; 15 | private static int maxTry = 1; //Run the failed test 2 times 16 | 17 | @Override 18 | public boolean retry(ITestResult iTestResult) { 19 | if (!iTestResult.isSuccess()) { //Check if test not succeed 20 | if (count < maxTry) { //Check if maxtry count is reached 21 | count++; //Increase the maxTry count by 1 22 | iTestResult.setStatus(ITestResult.FAILURE); //Mark test as failed and take base64Screenshot 23 | extendReportsFailOperations(iTestResult); //extentreports fail operations 24 | return true; //Tells TestNG to re-run the test 25 | } 26 | } else { 27 | iTestResult.setStatus(ITestResult.SUCCESS); //If test passes, TestNG marks it as passed 28 | } 29 | return false; 30 | } 31 | 32 | public void extendReportsFailOperations (ITestResult iTestResult) { 33 | Object testClass = iTestResult.getInstance(); 34 | WebDriver webDriver = ((BaseTest) testClass).getDriver(); 35 | String base64Screenshot = "data:image/png;base64,"+((TakesScreenshot)webDriver).getScreenshotAs(OutputType.BASE64); 36 | ExtentTestManager.getTest().log(LogStatus.FAIL,"Test Failed", 37 | ExtentTestManager.getTest().addBase64ScreenShot(base64Screenshot)); 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /src/test/java/utils/listeners/TestListener.java: -------------------------------------------------------------------------------- 1 | package utils.listeners; 2 | 3 | import com.relevantcodes.extentreports.LogStatus; 4 | import io.qameta.allure.Attachment; 5 | import org.openqa.selenium.OutputType; 6 | import org.openqa.selenium.TakesScreenshot; 7 | import org.openqa.selenium.WebDriver; 8 | import org.testng.ITestContext; 9 | import org.testng.ITestListener; 10 | import org.testng.ITestResult; 11 | import tests.BaseTest; 12 | import utils.excelutils.ExcelUtil; 13 | import utils.extentreports.ExtentManager; 14 | import utils.extentreports.ExtentTestManager; 15 | 16 | 17 | public class TestListener extends BaseTest implements ITestListener { 18 | 19 | private static String getTestMethodName(ITestResult iTestResult) { 20 | return iTestResult.getMethod().getConstructorOrMethod().getName(); 21 | } 22 | 23 | //Text attachments for Allure 24 | @Attachment(value = "Page screenshot", type = "image/png") 25 | public byte[] saveScreenshotPNG (WebDriver driver) { 26 | return ((TakesScreenshot)driver).getScreenshotAs(OutputType.BYTES); 27 | } 28 | 29 | //Text attachments for Allure 30 | @Attachment(value = "{0}", type = "text/plain") 31 | public static String saveTextLog (String message) { 32 | return message; 33 | } 34 | 35 | //HTML attachments for Allure 36 | @Attachment(value = "{0}", type = "text/html") 37 | public static String attachHtml(String html) { 38 | return html; 39 | } 40 | 41 | @Override 42 | public void onStart(ITestContext iTestContext) { 43 | System.out.println("I am in onStart method " + iTestContext.getName()); 44 | iTestContext.setAttribute("WebDriver", this.driver); 45 | } 46 | 47 | @Override 48 | public void onFinish(ITestContext iTestContext) { 49 | System.out.println("I am in onFinish method " + iTestContext.getName()); 50 | //Do tier down operations for extentreports reporting! 51 | ExtentTestManager.endTest(); 52 | ExtentManager.getReporter().flush(); 53 | } 54 | 55 | @Override 56 | public void onTestStart(ITestResult iTestResult) { 57 | System.out.println("I am in onTestStart method " + getTestMethodName(iTestResult) + " start"); 58 | //Start operation for extentreports. 59 | ExtentTestManager.startTest(iTestResult.getMethod().getMethodName(),""); 60 | } 61 | 62 | @Override 63 | public void onTestSuccess(ITestResult iTestResult) { 64 | System.out.println("I am in onTestSuccess method " + getTestMethodName(iTestResult) + " succeed"); 65 | //Extentreports log operation for passed tests. 66 | ExtentTestManager.getTest().log(LogStatus.PASS, "Test passed"); 67 | //Update the test result on excel sheet 68 | ExcelUtil.setCellData("PASSED", ExcelUtil.getRowNumber(), ExcelUtil.getColumnNumber()); 69 | } 70 | 71 | @Override 72 | public void onTestFailure(ITestResult iTestResult) { 73 | System.out.println("I am in onTestFailure method " + getTestMethodName(iTestResult) + " failed"); 74 | 75 | //Get driver from BaseTest and assign to local webdriver variable. 76 | Object testClass = iTestResult.getInstance(); 77 | WebDriver driver = ((BaseTest) testClass).getDriver(); 78 | 79 | //Allure ScreenShotRobot and SaveTestLog 80 | if (driver instanceof WebDriver) { 81 | System.out.println("Screenshot captured for test case:" + getTestMethodName(iTestResult)); 82 | saveScreenshotPNG(driver); 83 | } 84 | 85 | //Save a log on allure. 86 | saveTextLog(getTestMethodName(iTestResult) + " failed and screenshot taken!"); 87 | 88 | //Take base64Screenshot screenshot for extent reports 89 | String base64Screenshot = "data:image/png;base64,"+((TakesScreenshot)driver). 90 | getScreenshotAs(OutputType.BASE64); 91 | 92 | //Extentreports log and screenshot operations for failed tests. 93 | ExtentTestManager.getTest().log(LogStatus.FAIL,"Test Failed", 94 | ExtentTestManager.getTest().addBase64ScreenShot(base64Screenshot)); 95 | 96 | //Update the test result on excel sheet 97 | ExcelUtil.setCellData("FAILED", ExcelUtil.getRowNumber(), ExcelUtil.getColumnNumber()); 98 | } 99 | 100 | @Override 101 | public void onTestSkipped(ITestResult iTestResult) { 102 | System.out.println("I am in onTestSkipped method "+ getTestMethodName(iTestResult) + " skipped"); 103 | //Extentreports log operation for skipped tests. 104 | ExtentTestManager.getTest().log(LogStatus.SKIP, "Test Skipped"); 105 | 106 | //Update the test result on excel sheet 107 | ExcelUtil.setCellData("SKIPPED", ExcelUtil.getRowNumber(), ExcelUtil.getColumnNumber()); 108 | } 109 | 110 | @Override 111 | public void onTestFailedButWithinSuccessPercentage(ITestResult iTestResult) { 112 | System.out.println("Test failed but it is in defined success ratio " + getTestMethodName(iTestResult)); 113 | 114 | //Update the test result on excel sheet 115 | //ExcelUtil.setCellData("FAILED", ExcelUtil.getRowNumber(), ExcelUtil.getColumnNumber()); 116 | } 117 | 118 | } 119 | -------------------------------------------------------------------------------- /target/test-classes/testdata.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/swtestacademy/ExcelReadWrite/3b4a6bb89e860b86c82dedbe24a3d69d04253aca/target/test-classes/testdata.xlsx -------------------------------------------------------------------------------- /target/test-classes/~$testdata.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/swtestacademy/ExcelReadWrite/3b4a6bb89e860b86c82dedbe24a3d69d04253aca/target/test-classes/~$testdata.xlsx --------------------------------------------------------------------------------