Удаленка для jenkins+selenide+selenoid+allure+docker спецов на 2-3 часа в день. 100% remote! Присоединиться к проекту

Browserstack exceptions в сессии для ЗЕЛЕНЫХ джобов дженкиска, использую selenide

saucelabs
jenkins
browserstack
selenide
testng
Теги: #<Tag:0x00007fedbfc97070> #<Tag:0x00007fedbfc96f30> #<Tag:0x00007fedbfc96d78> #<Tag:0x00007fedbfc96c10> #<Tag:0x00007fedbfc96aa8>

(Tatyana Durova) #1

Не знаю куда разместить данную тему, положила в Общие вопросы.

В jenkins билд зеленый, тесты все успешно прошли, но именно для этой же сессии запуска в browserstack я вижу ошибки, это очень странно. В логе запуска теста (ни на локальной машине, ни на дженксинс) таких исключений нет. Не знаю в чем проблема…

Выдержка лога из Browserstack

2017-8-18 13:13:38:953 REQUEST [2017-8-18 13:13:38:953] POST /session/53c4786bbc11b42ce2cb691adaa10dc3fbb9cf94/element {"using":"css selector","value":".alert-success"}
2017-8-18 13:13:39:334 RESPONSE {
    "state":"no such element",
    "sessionId":"53c4786bbc11b42ce2cb691adaa10dc3fbb9cf94",
    "hCode":17193880,
    "value":{
        "additionalInformation":"\nDriver info: org.openqa.selenium.chrome.ChromeDriver\nCapabilities [{applicationCacheEnabled=false, rotatable=false, mobileEmulationEnabled=false, networkConnectionEnabled=false, chrome={chromedriverVersion=2.28.455520 (cc17746adff54984afff480136733114c6b3704b), userDataDir=C:\\Windows\\proxy\\scoped_dir5484_1222}, takesHeapSnapshot=true, pageLoadStrategy=normal, databaseEnabled=false, handlesAlerts=true, hasTouchScreen=false, version=55.0.2883.75, platform=XP, browserConnectionEnabled=false, nativeEvents=true, acceptSslCerts=true, locationContextEnabled=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true, unexpectedAlertBehaviour=}]\nSession ID: 7f8197d07662ffcfd221e58fa1c1d5b8\n*** Element info: {Using=css selector, value=.alert-success}",
        "localizedMessage":"no such element: Unable to locate element: {\"method\":\"css selector\",\"selector\":\".alert-success\"}\n  (Session info: chrome=55.0.2883.75)\n  (Driver info: chromedriver=2.28.455520 (cc17746adff54984afff480136733114c6b3704b),platform=Windows NT 10.0.14393 x86_64) (WARNING: The server did not provide any stacktrace information)\nCommand duration or timeout: 61 milliseconds\nFor documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html\nBuild info: version: '2.53.0', revision: '35ae25b', time: '2016-03-15 17:00:58'\nSystem info: host: '185-129-68-52', ip: '185.129.68.52', os.name: 'windows', os.arch: 'x86', os.version: '10.0', java.version: '1.8.0_121'\nDriver info: org.openqa.selenium.chrome.ChromeDriver\nCapabilities [{applicationCacheEnabled=false, rotatable=false, mobileEmulationEnabled=false, networkConnectionEnabled=false, chrome={chromedriverVersion=2.28.455520 (cc17746adff54984afff480136733114c6b3704b), userDataDir=C:\\Windows\\proxy\\scoped_dir5484_1222}, takesHeapSnapshot=true, pageLoadStrategy=normal, databaseEnabled=false, handlesAlerts=true, hasTouchScreen=false, version=55.0.2883.75, platform=XP, browserConnectionEnabled=false, nativeEvents=true, acceptSslCerts=true, locationContextEnabled=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true, unexpectedAlertBehaviour=}]\nSession ID: 7f8197d07662ffcfd221e58fa1c1d5b8\n*** Element info: {Using=css selector, value=.alert-success}",
        "supportUrl":"http://seleniumhq.org/exceptions/no_such_element.html",
        "systemInformation":"System info: host: '185-129-68-52', ip: '185.129.68.52', os.name: 'windows', os.arch: 'x86', os.version: '10.0', java.version: '1.8.0_121'",
        "cause":null,
        "stackTrace":[
            {
                "fileName":null,
                "nativeMethod":true,
                "methodName":"newInstance0",
                "className":"sun.reflect.NativeConstructorAccessorImpl",
                "hCode":513928194,
                "lineNumber":-2,
                "class":"java.lang.StackTraceElement"
            },
            {
                "fileName":null,
                "nativeMethod":false,
                "methodName":"newInstance",
                "className":"sun.reflect.NativeConstructorAccessorImpl",
                "hCode":-432498851,
                "lineNumber":-1,
                "class":"java.lang.StackTraceElement"
            },
            {
                "fileName":null,
                "nativeMethod":false,
                "methodName":"newInstance",
                "className":"sun.reflect.DelegatingConstructorAccessorImpl",
                "hCode":-2147429624,
                "lineNumber":-1,
                "class":"java.lang.StackTraceElement"
            },
            {
                "fileName":null,
                "nativeMethod":false,
                "methodName":"newInstance",
                "className":"java.lang.reflect.Constructor",
                "hCode":-1851634561,
                "lineNumber":-1,
                "class":"java.lang.StackTraceElement"
            },
            {
                "fileName":"ErrorHandler.java",
                "nativeMethod":false,
                "methodName":"createThrowable",
                "className":"org.openqa.selenium.remote.ErrorHandler",
                "hCode":514255488,
                "lineNumber":206,
                "class":"java.lang.StackTraceElement"
            },
            {
                "fileName":"ErrorHandler.java",
                "nativeMethod":false,
                "methodName":"throwIfResponseFailed",
                "className":"org.openqa.selenium.remote.ErrorHandler",
                "hCode":1091067085,
                "lineNumber":158,
                "class":"java.lang.StackTraceElement"
            },
            {
                "fileName":"RemoteWebDriver.java",
                "nativeMethod":false,
                "methodName":"execute",
                "className":"org.openqa.selenium.remote.RemoteWebDriver",
                "hCode":1767885165,
                "lineNumber":678,
                "class":"java.lang.StackTraceElement"
            },
            {
                "fileName":"RemoteWebDriver.java",
                "nativeMethod":false,
                "methodName":"findElement",
                "className":"org.openqa.selenium.remote.RemoteWebDriver",
                "hCode":-1451838400,
                "lineNumber":363,
                "class":"java.lang.StackTraceElement"
            },
            {
                "fileName":"RemoteWebDriver.java",
                "nativeMethod":false,
                "methodName":"findElementByCssSelector",
                "className":"org.openqa.selenium.remote.RemoteWebDriver",
                "hCode":-1697033114,
                "lineNumber":492,
                "class":"java.lang.StackTraceElement"
            },
            {
                "fileName":"By.java",
                "nativeMethod":false,
                "methodName":"findElement",
                "className":"org.openqa.selenium.By$ByCssSelector",
                "hCode":-961868940,
                "lineNumber":430,
                "class":"java.lang.StackTraceElement"
            },
            {
                "fileName":"RemoteWebDriver.java",
                "nativeMethod":false,
                "methodName":"findElement",
                "className":"org.openqa.selenium.remote.RemoteWebDriver",
                "hCode":-1451838408,
                "lineNumber":355,
                "class":"java.lang.StackTraceElement"
            },
            {
                "fileName":null,
                "nativeMethod":false,
                "methodName":"invoke",
                "className":"sun.reflect.GeneratedMethodAccessor19",
                "hCode":784658443,
                "lineNumber":-1,
                "class":"java.lang.StackTraceElement"
            },
            {
                "fileName":null,
                "nativeMethod":false,
                "methodName":"invoke",
                "className":"sun.reflect.DelegatingMethodAccessorImpl",
                "hCode":506642458,
                "lineNumber":-1,
                "class":"java.lang.StackTraceElement"
            },
            {
                "fileName":null,
                "nativeMethod":false,
                "methodName":"invoke",
                "className":"java.lang.reflect.Method",
                "hCode":708160817,
                "lineNumber":-1,
                "class":"java.lang.StackTraceElement"
            },
            {
                "fileName":"EventFiringWebDriver.java",
                "nativeMethod":false,
                "methodName":"invoke",
                "className":"org.openqa.selenium.support.events.EventFiringWebDriver$2",
                "hCode":-1760971951,
                "lineNumber":103,
                "class":"java.lang.StackTraceElement"
            },
            {
                "fileName":null,
                "nativeMethod":false,
                "methodName":"findElement",
                "className":"com.sun.proxy.$Proxy1",
                "hCode":-1260421814,
                "lineNumber":-1,
                "class":"java.lang.StackTraceElement"
            },
            {
                "fileName":"EventFiringWebDriver.java",
                "nativeMethod":false,
                "methodName":"findElement",
                "className":"org.openqa.selenium.support.events.EventFiringWebDriver",
                "hCode":1351809791,
                "lineNumber":188,
                "class":"java.lang.StackTraceElement"
            },
            {
                "fileName":"FindElement.java",
                "nativeMethod":false,
                "methodName":"call",
                "className":"org.openqa.selenium.remote.server.handler.FindElement",
                "hCode":2129867627,
                "lineNumber":48,
                "class":"java.lang.StackTraceElement"
            },
            {
                "fileName":"FindElement.java",
                "nativeMethod":false,
                "methodName":"call",
                "className":"org.openqa.selenium.remote.server.handler.FindElement",
                "hCode":2129867580,
                "lineNumber":1,
                "class":"java.lang.StackTraceElement"
            },
            {
                "fileName":null,
                "nativeMethod":false,
                "methodName":"run",
                "className":"java.util.concurrent.FutureTask",
                "hCode":424519275,
                "lineNumber":-1,
                "class":"java.lang.StackTraceElement"
            },
            {
                "fileName":"DefaultSession.java",
                "nativeMethod":false,
                "methodName":"run",
                "className":"org.openqa.selenium.remote.server.DefaultSession$1",
                "hCode":-255143467,
                "lineNumber":176,
                "class":"java.lang.StackTraceElement"
            },
            {
                "fileName":null,
                "nativeMethod":false,
                "methodName":"runWorker",
                "className":"java.util.concurrent.ThreadPoolExecutor",
                "hCode":-1208971944,
                "lineNumber":-1,
                "class":"java.lang.StackTraceElement"
            },
            {
                "fileName":null,
                "nativeMethod":false,
                "methodName":"run",
                "className":"java.util.concurrent.ThreadPoolExecutor$Worker",
                "hCode":-166011880,
                "lineNumber":-1,
                "class":"java.lang.StackTraceElement"
            },
            {
                "fileName":null,
                "nativeMethod":false,
                "methodName":"run",
                "className":"java.lang.Thread",
                "hCode":1432591020,
                "lineNumber":-1,
                "class":"java.lang.StackTraceElement"
            }
        ],
        "suppressed":[

        ],
        "message":"no such element: Unable to locate element: {\"method\":\"css selector\",\"selector\":\".alert-success\"}\n  (Session info: chrome=55.0.2883.75)\n  (Driver info: chromedriver=2.28.455520 (cc17746adff54984afff480136733114c6b3704b),platform=Windows NT 10.0.14393 x86_64) (WARNING: The server did not provide any stacktrace information)\nCommand duration or timeout: 61 milliseconds\nFor documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html\nBuild info: version: '2.53.0', revision: '35ae25b', time: '2016-03-15 17:00:58'\nSystem info: host: '185-129-68-52', ip: '185.129.68.52', os.name: 'windows', os.arch: 'x86', os.version: '10.0', java.version: '1.8.0_121'\nDriver info: org.openqa.selenium.chrome.ChromeDriver\nCapabilities [{applicationCacheEnabled=false, rotatable=false, mobileEmulationEnabled=false, networkConnectionEnabled=false, chrome={chromedriverVersion=2.28.455520 (cc17746adff54984afff480136733114c6b3704b), userDataDir=C:\\Windows\\proxy\\scoped_dir5484_1222}, takesHeapSnapshot=true, pageLoadStrategy=normal, databaseEnabled=false, handlesAlerts=true, hasTouchScreen=false, version=55.0.2883.75, platform=XP, browserConnectionEnabled=false, nativeEvents=true, acceptSslCerts=true, locationContextEnabled=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true, unexpectedAlertBehaviour=}]\nSession ID: 7f8197d07662ffcfd221e58fa1c1d5b8\n*** Element info: {Using=css selector, value=.alert-success}",
        "hCode":8097413,
        "class":"org.openqa.selenium.NoSuchElementException",
        "buildInformation":{
            "buildRevision":"35ae25b",
            "buildTime":"2016-03-15 17:00:58",
            "releaseLabel":"2.53.0",
            "hCode":24100541,
            "class":"org.openqa.selenium.internal.BuildInfo"
        },
        "screen":"https://s3.amazonaws.com/testautomation/53c4786bbc11b42ce2cb691adaa10dc3fbb9cf94/screenshot-exception-960331ccbe.png"
    },
    "class":"org.openqa.selenium.remote.Response",
    "status":7
}

Jenkins log:

Started by upstream project "Multi-configuration-selenium-tests-for-rrr" build number 45
originally caused by:
 Started by an SCM change
[EnvInject] - Loading node environment variables.
Building in workspace /var/lib/jenkins/jobs/Multi-configuration-selenium-tests-for-rrr/workspace/environment/win10_chrome55/profile/staging/test/com.eee.cross_site_iframes.script_inside.**.*
 > /usr/bin/git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > /usr/bin/git config remote.origin.url git@selenium.github.com:eee/selenium-tests.git # timeout=10
Fetching upstream changes from git@selenium.github.com:eee/selenium-tests.git
 > /usr/bin/git --version # timeout=10
 > /usr/bin/git fetch --tags --progress git@selenium.github.com:eee/selenium-tests.git +refs/heads/*:refs/remotes/origin/*
Checking out Revision 8a377e7b78f003b2588233271f1e45be062e07b0 (refs/remotes/origin/dev)
Commit message: "Fix test cases for LoginPageTest"
 > /usr/bin/git config core.sparsecheckout # timeout=10
 > /usr/bin/git checkout -f 8a377e7b78f003b2588233271f1e45be062e07b0
 > /usr/bin/git rev-list 8a377e7b78f003b2588233271f1e45be062e07b0 # timeout=10
[BrowserStack] BROWSERSTACK_BUILD=jenkins-Multi-configuration-selenium-tests-for-rrr-environment=win10_chrome55,profile=staging,test=com.eee.cross_site_iframes.script_inside.**.*-45
[BrowserStack] BROWSERSTACK_LOCAL=false
Injecting SonarQube environment variables using the configuration: Sonar
[BrowserStack] BROWSERSTACK_BUILD=jenkins-Multi-configuration-selenium-tests-for-rrr-environment=win10_chrome55,profile=staging,test=com.eee.cross_site_iframes.script_inside.**.*-45
[BrowserStack] BROWSERSTACK_LOCAL=false
[com.eee.cross_site_iframes.script_inside.**.*] $ /var/lib/jenkins/tools/hudson.tasks.Maven_MavenInstallation/mvn_3.0.5/bin/mvn -f rrr-tests/pom.xml clean test -Pstaging -Dtest=com.eee.cross_site_iframes.script_inside.**.* -Denvironment=win10_chrome55
[INFO] Scanning for projects...
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] Building rrrTests 4.0.0
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ rrrTests ---
[INFO] Deleting /var/lib/jenkins/jobs/Multi-configuration-selenium-tests-for-rrr/workspace/environment/win10_chrome55/profile/staging/test/com.eee.cross_site_iframes.script_inside.**.*/rrr-tests/target
[INFO] 
[INFO] --- maven-resources-plugin:2.7:resources (default-resources) @ rrrTests ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.3:compile (default-compile) @ rrrTests ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 9 source files to /var/lib/jenkins/jobs/Multi-configuration-selenium-tests-for-rrr/workspace/environment/win10_chrome55/profile/staging/test/com.eee.cross_site_iframes.script_inside.**.*/rrr-tests/target/classes
[INFO] /var/lib/jenkins/jobs/Multi-configuration-selenium-tests-for-rrr/workspace/environment/win10_chrome55/profile/staging/test/com.eee.cross_site_iframes.script_inside.**.*/rrr-tests/src/main/java/webdriver/WebDriverFactory.java: /var/lib/jenkins/jobs/Multi-configuration-selenium-tests-for-rrr/workspace/environment/win10_chrome55/profile/staging/test/com.eee.cross_site_iframes.script_inside.**.*/rrr-tests/src/main/java/webdriver/WebDriverFactory.java uses unchecked or unsafe operations.
[INFO] /var/lib/jenkins/jobs/Multi-configuration-selenium-tests-for-rrr/workspace/environment/win10_chrome55/profile/staging/test/com.eee.cross_site_iframes.script_inside.**.*/rrr-tests/src/main/java/webdriver/WebDriverFactory.java: Recompile with -Xlint:unchecked for details.
[INFO] 
[INFO] --- maven-resources-plugin:2.7:testResources (default-testResources) @ rrrTests ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 4 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.3:testCompile (default-testCompile) @ rrrTests ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 14 source files to /var/lib/jenkins/jobs/Multi-configuration-selenium-tests-for-rrr/workspace/environment/win10_chrome55/profile/staging/test/com.eee.cross_site_iframes.script_inside.**.*/rrr-tests/target/test-classes
[INFO] /var/lib/jenkins/jobs/Multi-configuration-selenium-tests-for-rrr/workspace/environment/win10_chrome55/profile/staging/test/com.eee.cross_site_iframes.script_inside.**.*/rrr-tests/src/test/java/com/eee/TestNgTestBase.java: Some input files use unchecked or unsafe operations.
[INFO] /var/lib/jenkins/jobs/Multi-configuration-selenium-tests-for-rrr/workspace/environment/win10_chrome55/profile/staging/test/com.eee.cross_site_iframes.script_inside.**.*/rrr-tests/src/test/java/com/eee/TestNgTestBase.java: Recompile with -Xlint:unchecked for details.
[INFO] 
[INFO] --- automate-maven-plugin:0.7.2-SNAPSHOT:test-compile (default) @ rrrTests ---
[INFO] 
[INFO] --- maven-surefire-plugin:2.18.1:test (default-test) @ rrrTests ---
[INFO] Surefire report directory: /var/lib/jenkins/jobs/Multi-configuration-selenium-tests-for-rrr/workspace/environment/win10_chrome55/profile/staging/test/com.eee.cross_site_iframes.script_inside.**.*/rrr-tests/target/surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running com.eee.cross_site_iframes.script_inside.CrossSiteIframeTest
Configuring TestNG with: TestNG652Configurator
15:06:31.830  INFO   com.eee.cross_site_iframes.script_inside.CrossSiteIframeTest -> Running tests on environment win10_chrome55
Aug 18, 2017 3:06:38 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: OSS
15:06:59.587  INFO   com.eee.cross_site_iframes.script_inside.CrossSiteIframeTest -> Page{
[MESSAGES]                 --->    []
[READLOG]                  --->    [AdFormatCode,AdDetectionFlag,IframeFlag,AdMeasuredHeight,AdMeasuredWidth,AdSourceDecoded,AdWPPartFlag,AdAdvertiser,AdCampaign,AdPlacement,AdZone,AdSite,AdCreative,AdParameterA,AncestorOrigins,AncestorOriginCount,AdEventSticky,AdEventDisappear,AdEventAppear,RobotProperties, SS,0,3,600,160,http://testsuite1.eee.de/render/creative/9,0,,,,,,,,http://testsuite.eee.de,1,,,,, ,3,3,,,,0,,,,,,,,http://testsuite.eee.de,1,,,,]
[NUMBER OF FAILED TESTS]   --->    0
[RAW DATA]                 --->    {yr=1, dy=0, jx=102, ja=1503061609839333330, vp=1, yi=[{ag=, fy=0, av=3014, al=0, au=, aq=0, aj=, aa=0, af=1, ay=600, ab=2, ao=114206, ap=3015, fx=0, ai=114206, ax=160, am=, ah=0, at=SS, ar=0, ad=0, ac=0, ak=, an=}, {fy=0, ag=, au=, av=, al=, aq=, aa=null, aj=MR_300x250, ay=1, af=, ap=, ao=28267, ab=, ai=28267, fx=0, ax=1, am=, ah=, at=, ar=, ad=3, ak=null, ac=, an=null}], vt=0, di=1503061609839333330, iu=CED04D53-D856-464B-78D4-0DA17A990D22, et=0, dp=5, jv=0, ig=0, ys=0:0:1024:600:600/, dv=2017-08-10-09:46-333330-staging-, df=1, iq=3014, io=WIN Windows NT 10.0, ic=0, ij=0, de=2, dm=3, vq=requestfullscreen fullscreenenabled engine_chrome_44 window_webkitstorageinfo window_webkitindexeddb window_webkitrequestanimationframe window_webkitcancelanimationframe window_webkitcancelrequestanimationframe window_webkitrequestfilesystem window_webkitresolvelocalfilesystemurl css_webkit, ko=http://testsuite.eee.de, jo=600, db=186, it=1503061609843, dt=1 pjid=333330&size=MR_300x250&buster=huf8gxehal|1 pjid=333330&size=MR_300x250&buster=huf8gxehal, jl=0, dl=0:0:0:0:0:4:::28267:::::MR%5f300x250/0:0:160:600:0:0::http%3a%2f%2ftestsuite1%2eeee%2ede%2frender%2fcreative%2f9:114206:SS::::::::IMG/, dh=1, jn=116, jw=139, pa=http://testsuite1.eee.de/render/iframe/665, dj=10, ie=0, jz=0, kp=, ya=1, ir=http://testsuite.eee.de/render/page/258, ib=AWK Chrome 55.0.2883.75, vx=0, dk=id=CED04D53-D856-464B-78D4-0DA17A990D22; mxad_id=59054B71-324A-8092-E144-552CBFC36135, jt=1, jh=1503061614668ma7105fy7r, kn=1, ih=0, iv=3014, du=59054B71-324A-8092-E144-552CBFC36135, ia=Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.75 Safari/537.36, ju=0, ds=0:0:160:600:600/0:0:0:0:0:14:0:0:0/1:0:160:600:600:1/3:0:0:0:0:1:28267:0:0/39:0:0:0:0:24:0:0:0:44/0:0:0:0:0:23:0:0:0:44/12:0:0:0:0:28:0:1024:768/, kb=0, eu=3, es=0, yt=[], im=0, jp=333330, if=a9bdd8d82da93feee8c7f6bb45515d6e, yf=0:0:300:250:0:3:::030002501:MR::::MR%5f300x250::/, yy=1, ki=0, id=3015, dc=0, yc=1, ik=333330, vf=1, dr=1503061613018, ip=1503061613018, ii=43401, da=1503061613018, jr=http://testsuite1.eee.de/render/iframe/665, jm=0, d2=333330, pd=null, vi=43401}
}
browserstack:session:4a9e6b1ae387c03c68a7fc347d538bb851cc3c90:test:caf67e062c65299685fed1982d6d0b3bb368adf7{0}
15:07:14.859  INFO   com.eee.cross_site_iframes.script_inside.CrossSiteIframeTest -> Page{
[MESSAGES]                 --->    []
[READLOG]                  --->    [AdFormatCode,AdDetectionFlag,IframeFlag,AdMeasuredHeight,AdMeasuredWidth,AdSourceDecoded,AdWPPartFlag,AdAdvertiser,AdCampaign,AdPlacement,AdZone,AdSite,AdCreative,AdParameterA,AncestorOrigins,AncestorOriginCount,AdEventSticky,AdEventDisappear,AdEventAppear,RobotProperties, SS,1,3,600,160,http://testsuite1.eee.de/render/creative/9,0,,,,,,,,http://testsuite.eee.de,1,,,,]
[NUMBER OF FAILED TESTS]   --->    0
[RAW DATA]                 --->    {pd=null, d2=333330:pretime, vi=43401, jm=0, da=1503061628811, jr=http://testsuite1.eee.de/render/iframe/665, ii=43403, ip=1503061628811, dr=1503061628811, dc=1, ik=333330, vf=1, yc=1, id=3054, ki=0, yy=1, yf=0:0:160:600:0:3:::016006001:SS::::SS%5f160x600::/, jp=333330, if=a9bdd8d82da93feee8c7f6bb45515d6e, im=0, yt=[], es=0, eu=3, kb=0, ds=0:0:160:600:600/0:0:0:0:0:14:0:0:0/1:0:160:600:600:1/5:0:0:0:0:1:89163:0:0/27:0:0:0:0:43:114206:1%7c1%7c1:89163/0:0:0:0:0:19:114206:5:89163/42:0:0:0:0:28:0:1024:768/25:0:0:0:0:24:0:0:0:116/0:0:0:0:0:23:0:0:0:116/, ju=0, ia=Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.75 Safari/537.36, du=59054B71-324A-8092-E144-552CBFC36135, ih=0, iv=3053, kn=1, jt=1, jh=1503061630498qorbpw5wal, dk=id=CED04D53-D856-464B-78D4-0DA17A990D22; mxad_id=59054B71-324A-8092-E144-552CBFC36135, vx=0, ib=AWK Chrome 55.0.2883.75, ya=1, ir=http://testsuite.eee.de/render/page/258, ie=0, kp=, jz=0, dj=10, pa=http://testsuite1.eee.de/render/iframe/665, jn=98, jw=81, dh=1, dl=0:0:0:0:0:4:::89163:::::SS%5f160x600/0:0:160:600:0:5::http%3a%2f%2ftestsuite1%2eeee%2ede%2frender%2fcreative%2f9:114206:SS::::::::IMG/, dt=1 pjid=333330&size=SS_160x600&buster=k2c42l3gdg|1 pjid=333330&size=SS_160x600&buster=k2c42l3gdg, jl=0, it=1503061625636, db=186, jo=600, ko=http://testsuite.eee.de, vq=requestfullscreen fullscreenenabled engine_chrome_44 window_webkitstorageinfo window_webkitindexeddb window_webkitrequestanimationframe window_webkitcancelanimationframe window_webkitcancelrequestanimationframe window_webkitrequestfilesystem window_webkitresolvelocalfilesystemurl css_webkit, dm=3, de=2, ij=0, ic=0, io=WIN Windows NT 10.0, iq=3053, df=1, dv=2017-08-10-09:46-333330-staging-, jv=0, ig=0, ys=0:0:1024:600:600/, dp=5, et=0, iu=CED04D53-D856-464B-78D4-0DA17A990D22, di=1503061625632333330, vt=0, yi=[{an=null, ak=null, ac=0, ad=1, ar=0, at=SS, ah=0, am=, fx=0, ai=114206, ax=160, ao=114206, ap=3054, ab=2, af=1, ay=600, aa=0, aj=SS_160x600, aq=0, au=, av=3053, al=0, fy=0, ag=}], vp=1, ja=1503061625632333330, jx=33, yr=1, dy=0}
}
browserstack:session:4a9e6b1ae387c03c68a7fc347d538bb851cc3c90:test:7490993370cc4846097d4c1f28ea899083a755df{0}
15:07:30.097  INFO   com.eee.cross_site_iframes.script_inside.CrossSiteIframeTest -> Page{
[MESSAGES]                 --->    []
[READLOG]                  --->    [AdFormatCode,AdDetectionFlag,IframeFlag,AdMeasuredHeight,AdMeasuredWidth,AdSourceDecoded,AdWPPartFlag,AdAdvertiser,AdCampaign,AdPlacement,AdZone,AdSite,AdCreative,AdParameterA,AncestorOrigins,AncestorOriginCount,AdEventSticky,AdEventDisappear,AdEventAppear,RobotProperties, SB,1,3,90,728,http://testsuite2.eee.de/render/creative/11,0,,,,,,,,http://testsuite.eee.de http://testsuite1.eee.de,2,,,,]
[NUMBER OF FAILED TESTS]   --->    0
[RAW DATA]                 --->    {ie=0, kp=, jz=0, ya=1, ir=http://testsuite1.eee.de/render/iframe/415, ib=AWK Chrome 55.0.2883.75, vx=0, dk=id=CED04D53-D856-464B-78D4-0DA17A990D22; mxad_id=59054B71-324A-8092-E144-552CBFC36135, jt=1, jh=1503061645836pmjpmh2viy, ih=0, iv=3024, kn=2, ia=Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.75 Safari/537.36, ju=0, du=59054B71-324A-8092-E144-552CBFC36135, kb=0, ds=0:0:728:90:90/0:0:0:0:0:14:0:0:0/1:0:728:90:90:1/3:0:0:0:0:1:173910:0:0/15:0:0:0:0:43:69314:1%7c1%7c1:173910/0:0:0:0:0:19:69314:5:173910/32:0:0:0:0:24:0:0:0:52/0:0:0:0:0:23:0:0:0:52/3:0:0:0:0:28:0:1024:768/, eu=3, im=0, es=0, yt=[], ki=0, id=3025, if=a9bdd8d82da93feee8c7f6bb45515d6e, jp=333330, yy=1, yf=0:0:728:90:0:3:::072800901:SB::::SB%5f728x90::/, ik=333330, dc=1, vf=1, yc=1, dr=1503061644207, ip=1503061644207, da=1503061644207, jm=0, jr=http://testsuite2.eee.de/render/iframe/416, ii=43405, pd=null, vi=43401, d2=333330:pretime, yr=1, dy=0, jx=76, ja=1503061641053333330, vp=1, yi=[{ac=0, ak=null, an=null, ar=0, ad=1, am=, ah=0, at=SB, fx=0, ai=69314, ax=728, af=1, ay=90, ab=2, ao=69314, ap=3025, aa=0, aj=SB_728x90, al=0, av=3024, au=, aq=0, ag=, fy=0}], vt=0, et=0, dp=5, di=1503061641053333330, iu=CED04D53-D856-464B-78D4-0DA17A990D22, ig=0, jv=0, ys=0:0:1024:600:600/, df=1, iq=3024, dv=2017-08-10-09:46-333330-staging-, io=WIN Windows NT 10.0, ic=0, de=2, ij=0, ko=http://testsuite.eee.de http://testsuite1.eee.de, dm=3, vq=requestfullscreen fullscreenenabled engine_chrome_44 window_webkitstorageinfo window_webkitindexeddb window_webkitrequestanimationframe window_webkitcancelanimationframe window_webkitcancelrequestanimationframe window_webkitrequestfilesystem window_webkitresolvelocalfilesystemurl css_webkit, db=186, jo=90, it=1503061641057, dt=1 pjid=333330&size=SB_728x90&buster=z13jgd2hof|1 pjid=333330&size=SB_728x90&buster=z13jgd2hof, jl=0, dh=1, dl=0:0:0:0:0:4:::173910:::::SB%5f728x90/0:0:728:90:0:5::http%3a%2f%2ftestsuite2%2eeee%2ede%2frender%2fcreative%2f11:69314:SB::::::::IMG/, jw=161, jn=103, pa=http://testsuite2.eee.de/render/iframe/416, dj=10}
}
browserstack:session:4a9e6b1ae387c03c68a7fc347d538bb851cc3c90:test:d7fedc51b1a3306d2800fa26f7a2ba570e761779{0}
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 83.564 sec - in com.eee.cross_site_iframes.script_inside.CrossSiteIframeTest

Results :

Tests run: 3, Failures: 0, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:32 min
[INFO] Finished at: 2017-08-18T15:07:54+02:00
[INFO] Final Memory: 34M/344M
[INFO] ------------------------------------------------------------------------
TestNG Reports Processing: START
Looking for TestNG results report in workspace using pattern: **/rrr-tests/target/surefire-reports/testng-results.xml
Saving reports...
Processing '/var/lib/jenkins/jobs/Multi-configuration-selenium-tests-for-rrr/configurations/axis-environment/win10_chrome55/axis-profile/staging/axis-test/com.eee.cross_site_iframes.script_inside.**.*/builds/45/testng/testng-results.xml'
TestNG Reports Processing: FINISH
Started calculate disk usage of build
Finished Calculation of disk usage of build in 0 seconds
Started calculate disk usage of workspace
Finished Calculation of disk usage of workspace in 0 seconds
Unable to connect to Elasticsearch service. Check Elasticsearch is running in the correct namespace
Finished: SUCCESS

(asolntsev) #2

А где ошибки-то?
Вы имеете в виду Unable to locate element: {\"method\":\"css selector\",\"selector\":\".alert-success\"}\n?

Так может, это совершенно нормально, если, например, у вас такой тест:
$(".alert-success").shouldNotBe(visible);


(Tatyana Durova) #3

Почему тогда в логах мавена и testng этих сообщений не видно? Ассерты да, есть такие. Смущает, что browserstack такие exceptions помещает на специальную вкладку с ошибками и делает для них скриншоты, это реально сбивает с толку.


(Oleksandr Khotemskyi) #4

Ошибки Selenium !== ошибки тестов.

Давайте рассмотрим простой пример
Запускаем тесты на том же browserstack (хотя то же самое будет в любой конфигурации)

Представим что у нас в тесте простой случай:

try {
let foo = $('foo')
console.log('Мы нашли элемент!')
} catch (err) {
console.log('Элемента нет, ну и ладно')
}

Если ошибка и вылетела - мы игнорируем и ничего не делаем.

Как это выглядит на уровне селениум сервера -

  • Прилетает запрос (HTTP) найти элемент.
  • Такого элемента нет
  • Селениум отвечает на запрос приблизительно таким ответом -
"message":"no such element: Unable to locate element: {\"method\":\"css selector\",\"selector\":\"foo\"}\n  bla bla bla куча дополнительной информации

И теперь это уже проблема на стороне клиента который отправил запрос правильно обработать это исключение.

Мы же просто завернули в try/catch - значит тест не упадет - ошибка просто проигнорируется.

Вот так в тестах может быть зеленым, а в логах селениума - ошибки.

В реальной жизни все намного сложней - например ожидания, в которых то что элемента не будет - это часть логики ожидания. Ведь как работает ожидание - мы просто шлем запросы на поиск элемента и проверку его свойств пока они не будут такие как нам нужны, и игнорируем ошибки, пока не будет таймаут нашего ожидания.


(Tatyana Durova) #5

Тогда на они сессии browserstack смотреть в последнюю очередь и только вместе или после проверки логов мавена - testng?