Search code examples
phprestcodeceptionbrowserstack

How do I configure REST module in Codeception to use browserstack?


I am writing acceptance codeception tests on a web application. It will require me to check headers, specifically response codes. I have found that the codeception REST module can be used, but it appears to require phpbrowser. I am required though to use browserstack. How would the configuration look using browserstack as aposed to phpbrowser. My acceptance.suite.yml is currently set up like:

chrome-dev:
        modules:
            enabled:
                - WebDriver
                - \Helper\
            config:
                WebDriver:
                  url: 'https://XXXXXXXXXXXXXXXXXX.com'
                  host: 'XXXXXXXX@XXXXXXXX.com:XXXXXXXXXX.browserstack.com'
                  port: 80
                  browser: 'chrome'
                  window_size: maximize
                  capabilities:
                      'os': 'Windows'
                      'os_version': '10'
                      'browser_version': '57'
                      'acceptSslCerts': true
                      'resolution': '1600x1200'
                      'browserstack.chrome.enablePopups': true
                      'browserstack.chrome.allowAllCookies': true

My question here is how would I insert the REST module without using phpbrowser? It appears that it may be required, but does anybody know otherwise?


Solution

  • It is impossible - WebDriver and REST modules are incompatible.