report.html

Report generated on 01-Jan-2023 at 08:52:39 by pytest-html v2.1.1

Environment

Packages {"pluggy": "0.13.1", "py": "1.9.0", "pytest": "6.1.0"}
Platform Windows-10-10.0.19041-SP0
Plugins {"allure-pytest": "2.8.18", "datadir": "1.3.1", "html": "2.1.1", "metadata": "1.10.0"}
Python 3.8.5

Summary

8 tests ran in 5854.65 seconds.

2 passed, 0 skipped, 6 failed, 0 errors, 0 expected failures, 0 unexpected passes

Results

Result Test Duration Links
Failed test_page_section_check.py::TestPageSectionCheck::test_check_page_section_for_certificate_program_url 2044.74
self = <test_page_section_check.TestPageSectionCheck object at 0x000002343384C5B0>

@pytest.mark.test_details("SLUB-T0000","high","Page Section Check","Prince")
def test_check_page_section_for_certificate_program_url(self):
self._test_add_rows_in_csv()
count=0
with open("certificate_program_prod.txt")as url_file:
filename = "Report.csv"
count = 0
for city_url in url_file:
city_url = city_url.rstrip('\n')
pytest.driver.get(city_url)
time.sleep(2)
missing_section = pg_university_load.certificate_page_section_present()
if len(missing_section)>1:
rows = [['Certificate Program',city_url,'Fail',missing_section]]
with open(filename, 'a', newline='\n') as csvfile:
csvwriter = csv.writer(csvfile)
csvwriter.writerows(rows)
count = count+1
else:
rows = [['Certificate Program',city_url,'Pass','NA']]
with open(filename, 'a', newline='\n') as csvfile:
csvwriter = csv.writer(csvfile)
csvwriter.writerows(rows)
print("value of count is :", count)
if count>=1:
> pytest.fail(f"Missing section, hence failed")
E Failed: Missing section, hence failed

test_prod\test_page_section_check.py:60: Failed
------------------------------Captured stdout call------------------------------
value of count is : 0 value of count is : 0 value of count is : 0 value of count is : 0 value of count is : 0 value of count is : 0 value of count is : 0 value of count is : 0 value of count is : 0 value of count is : 0 value of count is : 0 value of count is : 0 value of count is : 0 value of count is : 0 value of count is : 0 value of count is : 0 value of count is : 0 value of count is : 0 value of count is : 0 value of count is : 0 value of count is : 0 value of count is : 0 value of count is : 0 value of count is : 0 value of count is : 0 value of count is : 0 value of count is : 0 value of count is : 0 value of count is : 0 value of count is : 0 value of count is : 1 value of count is : 2 value of count is : 2 value of count is : 2 value of count is : 2 value of count is : 2 value of count is : 2 value of count is : 2 value of count is : 2 value of count is : 2 value of count is : 2 value of count is : 2 value of count is : 3 value of count is : 4 value of count is : 4 value of count is : 4 value of count is : 5 value of count is : 5 value of count is : 5 value of count is : 6 value of count is : 6 value of count is : 7 value of count is : 8 value of count is : 8 value of count is : 9 value of count is : 9 value of count is : 10 value of count is : 11 value of count is : 11 value of count is : 12 value of count is : 12 value of count is : 13 value of count is : 13 value of count is : 14 value of count is : 15 value of count is : 15 value of count is : 16 value of count is : 16 value of count is : 17 value of count is : 18 value of count is : 19 value of count is : 20 value of count is : 20 value of count is : 20 value of count is : 21 value of count is : 22 value of count is : 22 value of count is : 23 value of count is : 23
Failed test_page_section_check.py::TestPageSectionCheck::test_check_page_section_for_classroom_program_url 226.38
self = <test_page_section_check.TestPageSectionCheck object at 0x0000023433A8ECD0>

@pytest.mark.test_details("SLUB-T0000","high","Page Section Check","Prince")
def test_check_page_section_for_classroom_program_url(self):
#self._test_add_rows_in_csv()
count=0
with open("classroom_program_prod.txt")as url_file:
filename = "Report.csv"
count = 0
for city_url in url_file:
city_url = city_url.rstrip('\n')
pytest.driver.get(city_url)
time.sleep(2)
missing_section = pg_university_load.classroom_page_section_present()
if len(missing_section)>1:
rows = [['Classroom Program',city_url,'Fail',missing_section]]
with open(filename, 'a', newline='\n') as csvfile:
csvwriter = csv.writer(csvfile)
csvwriter.writerows(rows)
count = count+1
else:
rows = [['Classroom Program',city_url,'Pass','NA']]
with open(filename, 'a', newline='\n') as csvfile:
csvwriter = csv.writer(csvfile)
csvwriter.writerows(rows)
print("value of count is :", count)
if count>=1:
> pytest.fail(f"Missing section, hence failed")
E Failed: Missing section, hence failed

test_prod\test_page_section_check.py:87: Failed
------------------------------Captured stdout call------------------------------
value of count is : 0 value of count is : 0 value of count is : 0 value of count is : 0 value of count is : 1 value of count is : 2 value of count is : 2 value of count is : 2 value of count is : 3 value of count is : 3 value of count is : 3 value of count is : 3
Failed test_page_section_check.py::TestPageSectionCheck::test_check_page_section_for_master_program_url 639.48
self = <test_page_section_check.TestPageSectionCheck object at 0x0000023433A70A90>

@pytest.mark.test_details("SLUB-T0000","high","Page Section Check","Prince")
def test_check_page_section_for_master_program_url(self):
#self._test_add_rows_in_csv()
count=0
with open("Master_program_prod.txt")as url_file:
filename = "Report.csv"
count = 0
for city_url in url_file:
city_url = city_url.rstrip('\n')
pytest.driver.get(city_url)
time.sleep(2)
missing_section = pg_university_load.master_page_section_present()
if len(missing_section)>1:
rows = [['Master Program',city_url,'Fail',missing_section]]
with open(filename, 'a', newline='\n') as csvfile:
csvwriter = csv.writer(csvfile)
csvwriter.writerows(rows)
count = count+1
else:
rows = [['Master Program',city_url,'Pass','NA']]
with open(filename, 'a', newline='\n') as csvfile:
csvwriter = csv.writer(csvfile)
csvwriter.writerows(rows)
if count>=1:
> pytest.fail(f"Missing section, hence failed")
E Failed: Missing section, hence failed

test_prod\test_page_section_check.py:113: Failed
Failed test_page_section_check.py::TestPageSectionCheck::test_check_page_section_for_PG_new_template_program_url 1172.89
self = <test_page_section_check.TestPageSectionCheck object at 0x0000023433A09F70>

@pytest.mark.test_details("SLUB-T0000","high","Page Section Check","Prince")
def test_check_page_section_for_PG_new_template_program_url(self):
#self._test_add_rows_in_csv()
count=0
with open("Pg_new_template_prod.txt")as url_file:
filename = "Report.csv"
count = 0
for city_url in url_file:
city_url = city_url.rstrip('\n')
pytest.driver.get(city_url)
time.sleep(2)
missing_section = pg_university_load.pg_new_template_section_present()
if len(missing_section)>1:
rows = [['PG New Template',city_url,'Fail',missing_section]]
with open(filename, 'a', newline='\n') as csvfile:
csvwriter = csv.writer(csvfile)
csvwriter.writerows(rows)
count = count+1
else:
rows = [['PG New Template',city_url,'Pass','NA']]
with open(filename, 'a', newline='\n') as csvfile:
csvwriter = csv.writer(csvfile)
csvwriter.writerows(rows)
if count>=1:
> pytest.fail(f"Missing section, hence failed")
E Failed: Missing section, hence failed

test_prod\test_page_section_check.py:166: Failed
Failed test_page_section_check.py::TestPageSectionCheck::test_check_page_section_for_PG_old_template_program_url 625.06
self = <test_page_section_check.TestPageSectionCheck object at 0x0000023433A0A1F0>

@pytest.mark.test_details("SLUB-T0000","high","Page Section Check","Prince")
def test_check_page_section_for_PG_old_template_program_url(self):
#self._test_add_rows_in_csv()
count=0
with open("Pg_old_template_prod.txt")as url_file:
filename = "Report.csv"
count = 0
for city_url in url_file:
city_url = city_url.rstrip('\n')
pytest.driver.get(city_url)
time.sleep(2)
missing_section = pg_university_load.pg_old_template_section_present()
if len(missing_section)>1:
rows = [['PG Old Template',city_url,'Fail',missing_section]]
with open(filename, 'a', newline='\n') as csvfile:
csvwriter = csv.writer(csvfile)
csvwriter.writerows(rows)
count = count+1
else:
rows = [['PG Old Template',city_url,'Pass','NA']]
with open(filename, 'a', newline='\n') as csvfile:
csvwriter = csv.writer(csvfile)
csvwriter.writerows(rows)
if count>=1:
> pytest.fail(f"Missing section, hence failed")
E Failed: Missing section, hence failed

test_prod\test_page_section_check.py:193: Failed
Failed test_page_section_check.py::TestPageSectionCheck::test_check_page_section_for_subdomain_program_url 932.98
self = <test_page_section_check.TestPageSectionCheck object at 0x0000023433ADB5E0>

@pytest.mark.test_details("SLUB-T0000","high","Page Section Check","Prince")
def test_check_page_section_for_subdomain_program_url(self):
#self._test_add_rows_in_csv()
count=0
with open("urls_list_prod.txt")as url_file:
filename = "Report.csv"
count = 0
for city_url in url_file:
city_url = city_url.rstrip('\n')
try:
pytest.driver.get(city_url)
time.sleep(2)
except:
logging.info(f'Page load failed for {city_url}')
missing_section = pg_university_load.subdomain_section_present()
if len(missing_section)>1:
rows = [['Subdomain',city_url,'Fail',missing_section]]
with open(filename, 'a', newline='\n') as csvfile:
csvwriter = csv.writer(csvfile)
csvwriter.writerows(rows)
count = count+1
else:
rows = [['Subdomain',city_url,'Pass','NA']]
with open(filename, 'a', newline='\n') as csvfile:
csvwriter = csv.writer(csvfile)
csvwriter.writerows(rows)
if count>=1:
> pytest.fail(f"Missing section, hence failed")
E Failed: Missing section, hence failed

test_prod\test_page_section_check.py:223: Failed
-------------------------------Captured log call--------------------------------
INFO  setup:test_page_section_check.py:209 Page load failed for https://onlinebootcamp.ce.uci.edu/cyber-security-certification-training
Passed test_page_section_check.py::TestPageSectionCheck::test_check_page_section_for_degree_program_url 101.94
No log output captured.
Passed test_page_section_check.py::TestPageSectionCheck::test_check_page_section_for_job_guarantee_program_url 108.84
-------------------------------Captured log call--------------------------------
WARNING  setup:page_factory.py:53 the locator btn_sticky_pricing_section_btn_text on url https://www.simplilearn.com/automation-testing-training-course-placement-guarantee#pricing is not visible INFO  setup:university_master_page.py:1033 No Text present for Pricing section