2012-02-29 5 views
0

内部ITアプリケーションをユーザーの観点からテストするためには、Cookieベースのシングルサインオンソリューションへのログインを含むシナリオのBehatバックグラウンドを確立する必要があります。HTTPSベースのログインサービスへのミンクテストを実行するとBehatが失敗するのはなぜですか?

これは、Givensでのログを設定するための最小限のテストです。これが成功すれば、当然「いつ」と「それから」が増えるでしょう。

Feature: Bouncerize 
    In order to log in to internal applications 
    As an application user 
    I need to be able to use the SSO system 

    Scenario: Log in to Bouncer 
     Given I am on "https://private_url/login/" 
     And I fill in "pass_word" with "a hard to guess password" 
     And I fill in "id" with "username" 
     And I press "Sign In" 

私はこのシナリオを実行すると、与えられた最初のエラーで失敗します。

Scenario: Log in to Bouncer         # features/bouncer.feature:8 
    Given I am on "https://gh.bouncer.login.yahoo.com/login/" # FeatureContext::visit() 
     A cookie name is required to generate a field value for this cookie 

はこれまでのところ、それはあなたがかもしれないようBehat\Mink\Behat\Context\MinkContext

答えて

3

が鳴る延びていることを除いてFeatureContextにはカスタマイズはありません遭遇しましたhttps://github.com/Behat/Mink/issues/161 - 私はバグレポートから引用します:

This is not a problem with Behat or Goutte, I reported to ZF: http://framework.zend.com/issues/browse/ZF2-169

しかし、それは上流側でも解決されているように見えるので、今はうまくいくはずです。

関連する問題