Вопрос

I have Travis-CI running Sauce Connect to run Behat tests. Everything works just fine if I tell Sauce to use Firefox 26 on Windows 7. But if I change the browser to Internet Explorer (any of the three versions that Sauce Labs makes available on Windows 7--that is, IE8, IE9, and IE10), then it doesn't work.

On the Sauce page that shows the IE browser test, it shows a long video of it displaying nothing other than This is the initial start page for the WebDriver server. The error message shown at the top of the page that shows that browser screenshot is: Test did not see a new command for 90 seconds. Timing out. However, the screencast is over 13 minutes long so it was at least receiving some commands even if it was never acting on them.

Meanwhile, on the Travis side, I'm seeing this:

2014-02-18 04:34:13,124 - Request started: GET http://ctldl.windowsupdate.com/msdownload/update/v3/static/trustedr/en/disallowedcertstl.cab?f20efc77fc170e42
2014-02-18 04:34:13,211 - GET http://ctldl.windowsupdate.com/msdownload/update/v3/static/trustedr/en/disallowedcertstl.cab?f20efc77fc170e42 -> 200 (88ms, 6356 bytes)
2014-02-18 04:34:13,417 - Request started: GET https://ieonline.microsoft.com/iedomainsuggestions/ie10/201402/suggestions.en-US
2014-02-18 04:34:13,503 - GET https://ieonline.microsoft.com/iedomainsuggestions/ie10/201402/suggestions.en-US -> 200 (87ms, 18176 bytes)
No output has been received in the last 10 minutes, this potentially indicates a stalled build or something wrong with the build itself.
The build has been terminated

I did find an entry in the Sauce Labs support docs in indicating that this can be caused by unconventional ports, but I'm running my app over HTTPS on port 443, so that wouldn't seem to be the issue.

Here's my Behat YAML config file for running Internet Explorer 9 via Sauce:

# Use this profile to run tests on Sauce against the Travis-CI instance
default:
    context:
        class: "FeatureContext"
    extensions:
        Behat\MinkExtension\Extension:
            base_url: https://localhost
            default_session: saucelabs
            javascript_session: saucelabs
            saucelabs:
                browser: "internet explorer"
                capabilities:
                    platform: "Windows 7"
                    version: 9

I am running Behat 2.5.2, although I had the same issue with 2.4.x.

I'm not sure where to go or what to do from here. What should my next step be?

Это было полезно?

Решение 2

I was able to solve this problem by changing:

base_url: https://localhost

to

base_url: https://realhostname

in the Behat\MinkExtension\Extension: section of the behat config.

This hostname is set in the .travis.yml file using the hosts addon

addons:
  hosts:
    - realhostname

I believe this has something to do with additional proxying done via sauce connect for localhost which is mentioned at the bottom of: https://saucelabs.com/docs/connect I have no idea why this only affects IE, but this solution seems to work.

Другие советы

I had the same problem using internet explorer with saucelabs. I was sending a POST /session to request a new session and was expecting back an {object} An object describing the session's capabilities as per the Json wire protocol. Instead nothing was being sent back except a header:

                                                              Transfer-Encoding 
                                                                      "chunked" 
                                                                           Date 
                                                "Mon, 24 Feb 2014 15:19:06 GMT" 
                                                                   Content-Type 
                                                                    "text/html" 
                                                                       Location 
"http://ondemand.saucelabs.com/wd/hub/session/865ae26f6b5c461c9a30f3d1454f486a" 
                                                                         Server 
                                                                 "monocle/0.26" 
                                                                         status 
                                                                          "302" 
                                                                  statusMessage 
                                                                        "Found" 

The location contained the session id from which I was able to continue my session.

From the twitter feed https://twitter.com/sauceops looks like they were having probems with a redirect loop

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top