initial commit

This commit is contained in:
a.krasnov
2019-09-22 21:26:13 +03:00
commit 5392fa46c2
62 changed files with 1835 additions and 0 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

@@ -0,0 +1,41 @@
INFO root:screenshots.py:103 Try make screenshots. Attempts: 0
INFO root:screenshots.py:32 Scroll to «window.scrollTo(0, 0)»
INFO root:screenshots.py:32 Scroll to «window.scrollTo(0, 600)»
INFO root:screenshots.py:32 Scroll to «window.scrollTo(0, 1200)»
INFO root:screenshots.py:32 Scroll to «window.scrollTo(0, 1800)»
INFO root:screenshots.py:32 Scroll to «window.scrollTo(0, 2400)»
INFO root:screenshots.py:32 Scroll to «window.scrollTo(0, 3000)»
INFO root:screenshots.py:32 Scroll to «window.scrollTo(0, 3600)»
INFO root:screenshots.py:32 Scroll to «window.scrollTo(0, 4200)»
INFO root:screenshots.py:32 Scroll to «window.scrollTo(0, 4800)»
INFO root:image_processor.py:101 Screen size: (1600, 9600)
INFO root:image_processor.py:105 Image added, offset is 0
INFO root:image_processor.py:105 Image added, offset is 1200
INFO root:image_processor.py:105 Image added, offset is 2400
INFO root:image_processor.py:105 Image added, offset is 3600
INFO root:image_processor.py:105 Image added, offset is 4800
INFO root:image_processor.py:105 Image added, offset is 6000
INFO root:image_processor.py:105 Image added, offset is 7200
INFO root:image_processor.py:105 Image added, offset is 8400
INFO root:screenshots.py:75 element: .search2, coordinates: (366, 542, 1570, 614)
INFO root:screenshots.py:32 Scroll to «window.scrollTo(0, 0)»
INFO root:screenshots.py:32 Scroll to «window.scrollTo(0, 600)»
INFO root:screenshots.py:32 Scroll to «window.scrollTo(0, 1200)»
INFO root:screenshots.py:32 Scroll to «window.scrollTo(0, 1800)»
INFO root:screenshots.py:32 Scroll to «window.scrollTo(0, 2400)»
INFO root:screenshots.py:32 Scroll to «window.scrollTo(0, 3000)»
INFO root:screenshots.py:32 Scroll to «window.scrollTo(0, 3600)»
INFO root:screenshots.py:32 Scroll to «window.scrollTo(0, 4200)»
INFO root:screenshots.py:32 Scroll to «window.scrollTo(0, 4800)»
INFO root:image_processor.py:101 Screen size: (1600, 9600)
INFO root:image_processor.py:105 Image added, offset is 0
INFO root:image_processor.py:105 Image added, offset is 1200
INFO root:image_processor.py:105 Image added, offset is 2400
INFO root:image_processor.py:105 Image added, offset is 3600
INFO root:image_processor.py:105 Image added, offset is 4800
INFO root:image_processor.py:105 Image added, offset is 6000
INFO root:image_processor.py:105 Image added, offset is 7200
INFO root:image_processor.py:105 Image added, offset is 8400
INFO root:screenshots.py:75 element: .search2, coordinates: (366, 544, 1570, 616)
INFO root:screenshots.py:122 Coords test: (366, 542, 1570, 614), coords prod: (366, 544, 1570, 616)
INFO root:screenshots.py:123 Size test: 1206, size prod: 1206
@@ -0,0 +1 @@
https://yandex.ru/
Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

@@ -0,0 +1,45 @@
INFO root:screenshots.py:103 Try make screenshots. Attempts: 0
INFO root:screenshots.py:32 Scroll to «window.scrollTo(0, 0)»
INFO root:screenshots.py:32 Scroll to «window.scrollTo(0, 600)»
INFO root:screenshots.py:32 Scroll to «window.scrollTo(0, 1200)»
INFO root:screenshots.py:32 Scroll to «window.scrollTo(0, 1800)»
INFO root:screenshots.py:32 Scroll to «window.scrollTo(0, 2400)»
INFO root:screenshots.py:32 Scroll to «window.scrollTo(0, 3000)»
INFO root:screenshots.py:32 Scroll to «window.scrollTo(0, 3600)»
INFO root:screenshots.py:32 Scroll to «window.scrollTo(0, 4200)»
INFO root:screenshots.py:32 Scroll to «window.scrollTo(0, 4800)»
INFO root:screenshots.py:32 Scroll to «window.scrollTo(0, 5400)»
INFO root:image_processor.py:101 Screen size: (1600, 10800)
INFO root:image_processor.py:105 Image added, offset is 0
INFO root:image_processor.py:105 Image added, offset is 1200
INFO root:image_processor.py:105 Image added, offset is 2400
INFO root:image_processor.py:105 Image added, offset is 3600
INFO root:image_processor.py:105 Image added, offset is 4800
INFO root:image_processor.py:105 Image added, offset is 6000
INFO root:image_processor.py:105 Image added, offset is 7200
INFO root:image_processor.py:105 Image added, offset is 8400
INFO root:image_processor.py:105 Image added, offset is 9600
INFO root:screenshots.py:75 element: .news__header, coordinates: (24, 104, 1082, 412)
INFO root:screenshots.py:32 Scroll to «window.scrollTo(0, 0)»
INFO root:screenshots.py:32 Scroll to «window.scrollTo(0, 600)»
INFO root:screenshots.py:32 Scroll to «window.scrollTo(0, 1200)»
INFO root:screenshots.py:32 Scroll to «window.scrollTo(0, 1800)»
INFO root:screenshots.py:32 Scroll to «window.scrollTo(0, 2400)»
INFO root:screenshots.py:32 Scroll to «window.scrollTo(0, 3000)»
INFO root:screenshots.py:32 Scroll to «window.scrollTo(0, 3600)»
INFO root:screenshots.py:32 Scroll to «window.scrollTo(0, 4200)»
INFO root:screenshots.py:32 Scroll to «window.scrollTo(0, 4800)»
INFO root:screenshots.py:32 Scroll to «window.scrollTo(0, 5400)»
INFO root:image_processor.py:101 Screen size: (1600, 10800)
INFO root:image_processor.py:105 Image added, offset is 0
INFO root:image_processor.py:105 Image added, offset is 1200
INFO root:image_processor.py:105 Image added, offset is 2400
INFO root:image_processor.py:105 Image added, offset is 3600
INFO root:image_processor.py:105 Image added, offset is 4800
INFO root:image_processor.py:105 Image added, offset is 6000
INFO root:image_processor.py:105 Image added, offset is 7200
INFO root:image_processor.py:105 Image added, offset is 8400
INFO root:image_processor.py:105 Image added, offset is 9600
INFO root:screenshots.py:75 element: .news__header, coordinates: (24, 104, 1082, 412)
INFO root:screenshots.py:122 Coords test: (24, 104, 1082, 412), coords prod: (24, 104, 1082, 412)
INFO root:screenshots.py:123 Size test: 1102, size prod: 1102
Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

@@ -0,0 +1 @@
https://yandex.ru/
+2
View File
@@ -0,0 +1,2 @@
"Epic","Feature","Story","FAILED","BROKEN","PASSED","SKIPPED","UNKNOWN"
"","","","2","0","0","0","0"
1 Epic Feature Story FAILED BROKEN PASSED SKIPPED UNKNOWN
2 2 0 0 0 0
+29
View File
@@ -0,0 +1,29 @@
{
"uid" : "b1a8273437954620fa374b796ffaacdd",
"name" : "behaviors",
"children" : [ {
"name" : "test_search_field",
"uid" : "ff3cf8e351b44c24",
"parentUid" : "b1a8273437954620fa374b796ffaacdd",
"status" : "failed",
"time" : {
"start" : 1569176221591,
"stop" : 1569176247587,
"duration" : 25996
},
"flaky" : false,
"parameters" : [ ]
}, {
"name" : "test_news_widget",
"uid" : "35bf2eac0f3b5d9d",
"parentUid" : "b1a8273437954620fa374b796ffaacdd",
"status" : "failed",
"time" : {
"start" : 1569176222538,
"stop" : 1569176250120,
"duration" : 27582
},
"flaky" : false,
"parameters" : [ ]
} ]
}
+2
View File
@@ -0,0 +1,2 @@
"Category","FAILED","BROKEN","PASSED","SKIPPED","UNKNOWN"
"Product defects","2","0","0","0","0"
1 Category FAILED BROKEN PASSED SKIPPED UNKNOWN
2 Product defects 2 0 0 0 0
+41
View File
@@ -0,0 +1,41 @@
{
"uid" : "4b4757e66a1912dae1a509f688f20b0f",
"name" : "categories",
"children" : [ {
"name" : "Product defects",
"children" : [ {
"name" : "AssertionError: «Поисковый блок» отличается на страницах:\nhttps://yandex.ru/\nи\nhttps://yandex.ru/",
"children" : [ {
"name" : "test_search_field",
"uid" : "ff3cf8e351b44c24",
"parentUid" : "21cceaf81a44534c14791402ab60e7a0",
"status" : "failed",
"time" : {
"start" : 1569176221591,
"stop" : 1569176247587,
"duration" : 25996
},
"flaky" : false,
"parameters" : [ ]
} ],
"uid" : "21cceaf81a44534c14791402ab60e7a0"
}, {
"name" : "AssertionError: «Хэдер с новостями» отличается на страницах:\nhttps://yandex.ru/\nи\nhttps://yandex.ru/",
"children" : [ {
"name" : "test_news_widget",
"uid" : "35bf2eac0f3b5d9d",
"parentUid" : "3095de4d040f98faf6d1c7fbdd61b3ce",
"status" : "failed",
"time" : {
"start" : 1569176222538,
"stop" : 1569176250120,
"duration" : 27582
},
"flaky" : false,
"parameters" : [ ]
} ],
"uid" : "3095de4d040f98faf6d1c7fbdd61b3ce"
} ],
"uid" : "8fb3a91ba5aaf9de24cc8a92edc82b5d"
} ]
}
+33
View File
@@ -0,0 +1,33 @@
{
"uid" : "83edc06c07f9ae9e47eb6dd1b683e4e2",
"name" : "packages",
"children" : [ {
"name" : "screenshot_tests.tests.yandex_main_page_test",
"children" : [ {
"name" : "test_search_field",
"uid" : "ff3cf8e351b44c24",
"parentUid" : "4a62f88a06567bac990f04c32bc01572",
"status" : "failed",
"time" : {
"start" : 1569176221591,
"stop" : 1569176247587,
"duration" : 25996
},
"flaky" : false,
"parameters" : [ ]
}, {
"name" : "test_news_widget",
"uid" : "35bf2eac0f3b5d9d",
"parentUid" : "4a62f88a06567bac990f04c32bc01572",
"status" : "failed",
"time" : {
"start" : 1569176222538,
"stop" : 1569176250120,
"duration" : 27582
},
"flaky" : false,
"parameters" : [ ]
} ],
"uid" : "screenshot_tests.tests.yandex_main_page_test"
} ]
}
+3
View File
@@ -0,0 +1,3 @@
"Status","Start Time","Stop Time","Duration in ms","Parent Suite","Suite","Sub Suite","Test Class","Test Method","Name","Description"
"failed","Sun Sep 22 21:17:01 MSK 2019","Sun Sep 22 21:17:27 MSK 2019","25996","screenshot_tests.tests","yandex_main_page_test","TestYandexMainPage","","","test_search_field",""
"failed","Sun Sep 22 21:17:02 MSK 2019","Sun Sep 22 21:17:30 MSK 2019","27582","screenshot_tests.tests","yandex_main_page_test","TestYandexMainPage","","","test_news_widget","Test for news widget."
1 Status Start Time Stop Time Duration in ms Parent Suite Suite Sub Suite Test Class Test Method Name Description
2 failed Sun Sep 22 21:17:01 MSK 2019 Sun Sep 22 21:17:27 MSK 2019 25996 screenshot_tests.tests yandex_main_page_test TestYandexMainPage test_search_field
3 failed Sun Sep 22 21:17:02 MSK 2019 Sun Sep 22 21:17:30 MSK 2019 27582 screenshot_tests.tests yandex_main_page_test TestYandexMainPage test_news_widget Test for news widget.
+41
View File
@@ -0,0 +1,41 @@
{
"uid" : "98d3104e051c652961429bf95fa0b5d6",
"name" : "suites",
"children" : [ {
"name" : "screenshot_tests.tests",
"children" : [ {
"name" : "yandex_main_page_test",
"children" : [ {
"name" : "TestYandexMainPage",
"children" : [ {
"name" : "test_search_field",
"uid" : "ff3cf8e351b44c24",
"parentUid" : "14e9fffecf2f365bb44ac41687f56ae6",
"status" : "failed",
"time" : {
"start" : 1569176221591,
"stop" : 1569176247587,
"duration" : 25996
},
"flaky" : false,
"parameters" : [ ]
}, {
"name" : "test_news_widget",
"uid" : "35bf2eac0f3b5d9d",
"parentUid" : "14e9fffecf2f365bb44ac41687f56ae6",
"status" : "failed",
"time" : {
"start" : 1569176222538,
"stop" : 1569176250120,
"duration" : 27582
},
"flaky" : false,
"parameters" : [ ]
} ],
"uid" : "14e9fffecf2f365bb44ac41687f56ae6"
} ],
"uid" : "09b294b6c70fff4ed23fcba65129c6aa"
} ],
"uid" : "24b6faeef3ea7966bb42e6050a32e636"
} ]
}
@@ -0,0 +1,214 @@
{
"uid" : "35bf2eac0f3b5d9d",
"name" : "test_news_widget",
"fullName" : "screenshot_tests.tests.yandex_main_page_test.TestYandexMainPage#test_news_widget",
"historyId" : "3ef35865270ff1d210fb39b9ab2432e0",
"time" : {
"start" : 1569176222538,
"stop" : 1569176250120,
"duration" : 27582
},
"description" : "Test for news widget.",
"descriptionHtml" : "<p>Test for news widget.</p>\n",
"status" : "failed",
"statusMessage" : "AssertionError: «Хэдер с новостями» отличается на страницах:\nhttps://yandex.ru/\nи\nhttps://yandex.ru/",
"statusTrace" : "self = <yandex_main_page_test.TestYandexMainPage object at 0x103a6d2b0>\n\n def test_news_widget(self):\n \"\"\"Test for news widget.\"\"\"\n page = self.get_page(YandexMainPage)\n> self.check_by_screenshot(page.news_header)\n\nscreenshot_tests/tests/yandex_main_page_test.py:12: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nself = <yandex_main_page_test.TestYandexMainPage object at 0x103a6d2b0>\nelement = <screenshot_tests.page_objects.custom_web_element.CustomWebElement object at 0x103ab4710>\nargs = (), kwargs = {}, diff = 435\nsaved_url = ParseResult(scheme='https', netloc='yandex.ru', path='/', params='', query='', fragment='')\nprod_url = ParseResult(scheme='https', netloc='yandex.ru', path='/', params='', query='', fragment='')\ninfo = '«Хэдер с новостями»'\n\n def check_by_screenshot(self, element: CustomWebElement, *args, **kwargs):\n diff, saved_url, prod_url = self._get_diff(element, *args, **kwargs)\n info = element.description\n> assert diff == 0, f\"{info} отличается на страницах:\\n{saved_url.geturl()}\\nи\\n{prod_url.geturl()}\"\nE AssertionError: «Хэдер с новостями» отличается на страницах:\nE https://yandex.ru/\nE и\nE https://yandex.ru/\n\nscreenshot_tests/utils/screenshots.py:143: AssertionError",
"flaky" : false,
"beforeStages" : [ {
"name" : "_verify_url",
"time" : {
"start" : 1569176221097,
"stop" : 1569176221097,
"duration" : 0
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false,
"hasContent" : false
}, {
"name" : "screenshot_prepare",
"time" : {
"start" : 1569176221097,
"stop" : 1569176221097,
"duration" : 0
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false,
"hasContent" : false
}, {
"name" : "driver",
"time" : {
"start" : 1569176221097,
"stop" : 1569176222535,
"duration" : 1438
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false,
"hasContent" : false
}, {
"name" : "set_driver",
"time" : {
"start" : 1569176222536,
"stop" : 1569176222536,
"duration" : 0
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false,
"hasContent" : false
}, {
"name" : "base_url",
"time" : {
"start" : 1569176221096,
"stop" : 1569176221096,
"duration" : 0
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false,
"hasContent" : false
}, {
"name" : "configure",
"time" : {
"start" : 1569176221097,
"stop" : 1569176221097,
"duration" : 0
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false,
"hasContent" : false
} ],
"testStage" : {
"description" : "Test for news widget.",
"status" : "failed",
"statusMessage" : "AssertionError: «Хэдер с новостями» отличается на страницах:\nhttps://yandex.ru/\nи\nhttps://yandex.ru/",
"statusTrace" : "self = <yandex_main_page_test.TestYandexMainPage object at 0x103a6d2b0>\n\n def test_news_widget(self):\n \"\"\"Test for news widget.\"\"\"\n page = self.get_page(YandexMainPage)\n> self.check_by_screenshot(page.news_header)\n\nscreenshot_tests/tests/yandex_main_page_test.py:12: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nself = <yandex_main_page_test.TestYandexMainPage object at 0x103a6d2b0>\nelement = <screenshot_tests.page_objects.custom_web_element.CustomWebElement object at 0x103ab4710>\nargs = (), kwargs = {}, diff = 435\nsaved_url = ParseResult(scheme='https', netloc='yandex.ru', path='/', params='', query='', fragment='')\nprod_url = ParseResult(scheme='https', netloc='yandex.ru', path='/', params='', query='', fragment='')\ninfo = '«Хэдер с новостями»'\n\n def check_by_screenshot(self, element: CustomWebElement, *args, **kwargs):\n diff, saved_url, prod_url = self._get_diff(element, *args, **kwargs)\n info = element.description\n> assert diff == 0, f\"{info} отличается на страницах:\\n{saved_url.geturl()}\\nи\\n{prod_url.geturl()}\"\nE AssertionError: «Хэдер с новостями» отличается на страницах:\nE https://yandex.ru/\nE и\nE https://yandex.ru/\n\nscreenshot_tests/utils/screenshots.py:143: AssertionError",
"steps" : [ ],
"attachments" : [ {
"uid" : "15b144bb82e16a13",
"name" : "diff",
"source" : "15b144bb82e16a13.png",
"type" : "image/png",
"size" : 63598
}, {
"uid" : "8f9801e50746a9d2",
"name" : "actual",
"source" : "8f9801e50746a9d2.png",
"type" : "image/png",
"size" : 63036
}, {
"uid" : "ae0890108418dd6e",
"name" : "expected",
"source" : "ae0890108418dd6e.png",
"type" : "image/png",
"size" : 63550
}, {
"uid" : "d77bd5a097581fae",
"name" : "log",
"source" : "d77bd5a097581fae.txt",
"type" : "text/plain",
"size" : 3118
} ],
"parameters" : [ ],
"stepsCount" : 0,
"attachmentsCount" : 4,
"shouldDisplayMessage" : true,
"hasContent" : true
},
"afterStages" : [ {
"name" : "driver::0",
"time" : {
"start" : 1569176250196,
"stop" : 1569176250287,
"duration" : 91
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ {
"uid" : "7c5f405b92682e2f",
"name" : "last url",
"source" : "7c5f405b92682e2f.uri",
"type" : "text/uri-list",
"size" : 18
} ],
"parameters" : [ ],
"stepsCount" : 0,
"attachmentsCount" : 1,
"shouldDisplayMessage" : false,
"hasContent" : true
} ],
"labels" : [ {
"name" : "testType",
"value" : "screenshotDiff"
}, {
"name" : "parentSuite",
"value" : "screenshot_tests.tests"
}, {
"name" : "suite",
"value" : "yandex_main_page_test"
}, {
"name" : "subSuite",
"value" : "TestYandexMainPage"
}, {
"name" : "host",
"value" : "macbook-pro"
}, {
"name" : "thread",
"value" : "53352-MainThread"
}, {
"name" : "framework",
"value" : "pytest"
}, {
"name" : "language",
"value" : "cpython3"
}, {
"name" : "package",
"value" : "screenshot_tests.tests.yandex_main_page_test"
}, {
"name" : "resultFormat",
"value" : "allure2"
} ],
"parameters" : [ ],
"links" : [ ],
"hidden" : false,
"retry" : false,
"extra" : {
"severity" : "normal",
"retries" : [ ],
"categories" : [ {
"name" : "Product defects",
"matchedStatuses" : [ ],
"flaky" : false
} ],
"tags" : [ ]
},
"source" : "35bf2eac0f3b5d9d.json",
"parameterValues" : [ ]
}
@@ -0,0 +1,253 @@
{
"uid" : "ff3cf8e351b44c24",
"name" : "test_search_field",
"fullName" : "screenshot_tests.tests.yandex_main_page_test.TestYandexMainPage#test_search_field",
"historyId" : "1c6180a6a50469c5cd152002213dbd36",
"time" : {
"start" : 1569176221591,
"stop" : 1569176247587,
"duration" : 25996
},
"status" : "failed",
"statusMessage" : "AssertionError: «Поисковый блок» отличается на страницах:\nhttps://yandex.ru/\nи\nhttps://yandex.ru/",
"statusTrace" : "self = <yandex_main_page_test.TestYandexMainPage object at 0x10cb5ccc0>\n\n def test_search_field(self):\n words = [\"foo\", \"bar\", \"lol\", \"kek\", \"cheburek\", \"otus\", \"yandex\", \"google\"]\n page = self.get_page(YandexMainPage)\n \n def action():\n page.search_input.send_keys(random.choice(words))\n \n> self.check_by_screenshot(page.search_field, action)\n\nscreenshot_tests/tests/yandex_main_page_test.py:21: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nself = <yandex_main_page_test.TestYandexMainPage object at 0x10cb5ccc0>\nelement = <screenshot_tests.page_objects.custom_web_element.CustomWebElement object at 0x10cb875c0>\nargs = (<function TestYandexMainPage.test_search_field.<locals>.action at 0x10cb717b8>,)\nkwargs = {}, diff = 16\nsaved_url = ParseResult(scheme='https', netloc='yandex.ru', path='/', params='', query='', fragment='')\nprod_url = ParseResult(scheme='https', netloc='yandex.ru', path='/', params='', query='', fragment='')\ninfo = '«Поисковый блок»'\n\n def check_by_screenshot(self, element: CustomWebElement, *args, **kwargs):\n diff, saved_url, prod_url = self._get_diff(element, *args, **kwargs)\n info = element.description\n> assert diff == 0, f\"{info} отличается на страницах:\\n{saved_url.geturl()}\\nи\\n{prod_url.geturl()}\"\nE AssertionError: «Поисковый блок» отличается на страницах:\nE https://yandex.ru/\nE и\nE https://yandex.ru/\n\nscreenshot_tests/utils/screenshots.py:143: AssertionError",
"flaky" : false,
"beforeStages" : [ {
"name" : "set_driver",
"time" : {
"start" : 1569176221588,
"stop" : 1569176221588,
"duration" : 0
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false,
"hasContent" : false
}, {
"name" : "base_url",
"time" : {
"start" : 1569176221097,
"stop" : 1569176221097,
"duration" : 0
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false,
"hasContent" : false
}, {
"name" : "configure",
"time" : {
"start" : 1569176221097,
"stop" : 1569176221098,
"duration" : 1
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false,
"hasContent" : false
}, {
"name" : "driver",
"time" : {
"start" : 1569176221098,
"stop" : 1569176221588,
"duration" : 490
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false,
"hasContent" : false
}, {
"name" : "screenshot_prepare",
"time" : {
"start" : 1569176221098,
"stop" : 1569176221098,
"duration" : 0
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false,
"hasContent" : false
}, {
"name" : "_verify_url",
"time" : {
"start" : 1569176221097,
"stop" : 1569176221097,
"duration" : 0
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ ],
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false,
"hasContent" : false
} ],
"testStage" : {
"status" : "failed",
"statusMessage" : "AssertionError: «Поисковый блок» отличается на страницах:\nhttps://yandex.ru/\nи\nhttps://yandex.ru/",
"statusTrace" : "self = <yandex_main_page_test.TestYandexMainPage object at 0x10cb5ccc0>\n\n def test_search_field(self):\n words = [\"foo\", \"bar\", \"lol\", \"kek\", \"cheburek\", \"otus\", \"yandex\", \"google\"]\n page = self.get_page(YandexMainPage)\n \n def action():\n page.search_input.send_keys(random.choice(words))\n \n> self.check_by_screenshot(page.search_field, action)\n\nscreenshot_tests/tests/yandex_main_page_test.py:21: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nself = <yandex_main_page_test.TestYandexMainPage object at 0x10cb5ccc0>\nelement = <screenshot_tests.page_objects.custom_web_element.CustomWebElement object at 0x10cb875c0>\nargs = (<function TestYandexMainPage.test_search_field.<locals>.action at 0x10cb717b8>,)\nkwargs = {}, diff = 16\nsaved_url = ParseResult(scheme='https', netloc='yandex.ru', path='/', params='', query='', fragment='')\nprod_url = ParseResult(scheme='https', netloc='yandex.ru', path='/', params='', query='', fragment='')\ninfo = '«Поисковый блок»'\n\n def check_by_screenshot(self, element: CustomWebElement, *args, **kwargs):\n diff, saved_url, prod_url = self._get_diff(element, *args, **kwargs)\n info = element.description\n> assert diff == 0, f\"{info} отличается на страницах:\\n{saved_url.geturl()}\\nи\\n{prod_url.geturl()}\"\nE AssertionError: «Поисковый блок» отличается на страницах:\nE https://yandex.ru/\nE и\nE https://yandex.ru/\n\nscreenshot_tests/utils/screenshots.py:143: AssertionError",
"steps" : [ {
"name" : "Send text ['lol'] to «Поисковый инпут»",
"time" : {
"start" : 1569176223631,
"stop" : 1569176223862,
"duration" : 231
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ {
"name" : "locator_type",
"value" : "'css selector'"
}, {
"name" : "locator",
"value" : "'.input__control'"
} ],
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false,
"hasContent" : true
}, {
"name" : "Send text ['cheburek'] to «Поисковый инпут»",
"time" : {
"start" : 1569176235178,
"stop" : 1569176235397,
"duration" : 219
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ ],
"parameters" : [ {
"name" : "locator_type",
"value" : "'css selector'"
}, {
"name" : "locator",
"value" : "'.input__control'"
} ],
"stepsCount" : 0,
"attachmentsCount" : 0,
"shouldDisplayMessage" : false,
"hasContent" : true
} ],
"attachments" : [ {
"uid" : "d807dd446712ec34",
"name" : "diff",
"source" : "d807dd446712ec34.png",
"type" : "image/png",
"size" : 5806
}, {
"uid" : "43262d127c532fc2",
"name" : "actual",
"source" : "43262d127c532fc2.png",
"type" : "image/png",
"size" : 5602
}, {
"uid" : "e4728e62a9273013",
"name" : "expected",
"source" : "e4728e62a9273013.png",
"type" : "image/png",
"size" : 5814
}, {
"uid" : "6f4fd4816dedd724",
"name" : "log",
"source" : "6f4fd4816dedd724.txt",
"type" : "text/plain",
"size" : 2838
} ],
"parameters" : [ ],
"stepsCount" : 2,
"attachmentsCount" : 4,
"shouldDisplayMessage" : true,
"hasContent" : true
},
"afterStages" : [ {
"name" : "driver::0",
"time" : {
"start" : 1569176247715,
"stop" : 1569176247818,
"duration" : 103
},
"status" : "passed",
"steps" : [ ],
"attachments" : [ {
"uid" : "f764d0c1f0c002e8",
"name" : "last url",
"source" : "f764d0c1f0c002e8.uri",
"type" : "text/uri-list",
"size" : 18
} ],
"parameters" : [ ],
"stepsCount" : 0,
"attachmentsCount" : 1,
"shouldDisplayMessage" : false,
"hasContent" : true
} ],
"labels" : [ {
"name" : "testType",
"value" : "screenshotDiff"
}, {
"name" : "parentSuite",
"value" : "screenshot_tests.tests"
}, {
"name" : "suite",
"value" : "yandex_main_page_test"
}, {
"name" : "subSuite",
"value" : "TestYandexMainPage"
}, {
"name" : "host",
"value" : "macbook-pro"
}, {
"name" : "thread",
"value" : "53353-MainThread"
}, {
"name" : "framework",
"value" : "pytest"
}, {
"name" : "language",
"value" : "cpython3"
}, {
"name" : "package",
"value" : "screenshot_tests.tests.yandex_main_page_test"
}, {
"name" : "resultFormat",
"value" : "allure2"
} ],
"parameters" : [ ],
"links" : [ ],
"hidden" : false,
"retry" : false,
"extra" : {
"severity" : "normal",
"retries" : [ ],
"categories" : [ {
"name" : "Product defects",
"matchedStatuses" : [ ],
"flaky" : false
} ],
"tags" : [ ]
},
"source" : "ff3cf8e351b44c24.json",
"parameterValues" : [ ]
}
+41
View File
@@ -0,0 +1,41 @@
{
"uid" : "ab17fc5a4eb3bca4b216b548c7f9fcbc",
"name" : "timeline",
"children" : [ {
"name" : "macbook-pro",
"children" : [ {
"name" : "53353-MainThread",
"children" : [ {
"name" : "test_search_field",
"uid" : "ff3cf8e351b44c24",
"parentUid" : "4dc7c33bb080a46cee81e32def5d44d1",
"status" : "failed",
"time" : {
"start" : 1569176221591,
"stop" : 1569176247587,
"duration" : 25996
},
"flaky" : false,
"parameters" : [ ]
} ],
"uid" : "4dc7c33bb080a46cee81e32def5d44d1"
}, {
"name" : "53352-MainThread",
"children" : [ {
"name" : "test_news_widget",
"uid" : "35bf2eac0f3b5d9d",
"parentUid" : "49e92ccdd5930a6380d1611838fa2485",
"status" : "failed",
"time" : {
"start" : 1569176222538,
"stop" : 1569176250120,
"duration" : 27582
},
"flaky" : false,
"parameters" : [ ]
} ],
"uid" : "49e92ccdd5930a6380d1611838fa2485"
} ],
"uid" : "45427d043511ae68e4401efdf1d10cf3"
} ]
}