rest - Behat selenium tests trust self signed SSL cerificate -
for our automated testing of our drupal site, using behat test scripts. on our local development machines using self signed ssl certificate created acquia devdesktop. running tests in different browsers behat no problem since can trust certificate in browser itself. rest interfaces no browser being opened different story. behat not accept self signed certificate since "unsecure".
when running rest test error get:
curl error 60: ssl certificate problem: self signed certificate (see http://curl.haxx.se/libcurl/c/libcurl-errors.html) (guzzlehttp\exception\requestexception)
with testcase nothing wrong because worked before enabled ssl certificate. tried edit configuration .yml file options documentation , other tickets no luck.
is there way trust self signed certificate rest interface tests? if need more information please let me know.
edit: added yml config , composer.json file
//composer.json { "require": { "drupal/drupal-extension": "~3.0", "emuse/behat-html-formatter": "dev-master", "behatch/contexts": "*", "guzzlehttp/guzzle": "dev-master", "behat/mink-goutte-driver": "dev-master" }, "config": { "bin-dir": "bin/" } }
note removed url yml file below.
default: suites: default: contexts: - featurecontextdrupal - behatch:browser - drupal\drupalextension\context\minkcontext - drupal\drupalextension\context\drupalcontext - drupal\drupalextension\context\drushcontext - drupal\drupalextension\context\messagecontext - behatch:debug - behatch:system - behatch:json - behatch:table - behatch:rest - behatch:xml formatters: html: output_path: %paths.base%/build/html/behat extensions: sanpi\behatch\extension: ~ emuse\behathtmlformatter\behathtmlformatterextension: name: html behat\minkextension: goutte: guzzle_parameters: verify: false ssl.certificate_authority: false selenium2: wd_host: http://localhost:4444/wd/hub base_url: "https://myurl.devcloud.acquia-sites.com/" drupal\drupalextension: blackbox: ~ api_driver: 'drupal' drush: alias: 'ns-test' drupal: drupal_root: '/var/www/html/utcfs.dev/docroot' chrome: extensions: behat\minkextension: selenium2: browser: chrome capabilities: { "browser": "chrome", "browsername": "chrome", "version": "*", "browserversion": "*" } iexplore: extensions: behat\minkextension: selenium2: browser: internet explorer capabilities: { "browser": "internet explorer", "browsername": "internet explorer", "version": "*", "browserversion": "*" }
found answer on github:
for behat3/minkextension2.2
extensions: behat\minkextension: base_url: 'https://localhost' sessions: default: goutte: guzzle_parameters: defaults: verify: false
lower versions (1.x)
extensions: behat\minkextension: goutte: guzzle_parameters: verify: false
Comments
Post a Comment