Reputation: 1666
I am trying to run codeception on my Laravel app. Using Homestead running on Vagrant VM. I made a simple acceptance test and get [GuzzleHttp\Exception\AdapterException] cURL error 7: Failed to connect to site.dev port 8000: Connection refused
All I've done is installed codeception and made a simple test. $I->amOnPage('/')
is the first step and that's where it fails.
Not sure what information is needed to debug this. I can connect to site.dev:8000 just fine.
my acceptance.suite.yml
class_name: AcceptanceTester
modules:
enabled:
- PhpBrowser
- AcceptanceHelper
config:
PhpBrowser:
url: 'http://site.dev:8000'
Upvotes: 1
Views: 5218
Reputation: 933
You Need to use a specify driver, like Webdriver or PHPBrowser.
I used to use Webdriver, with phantom js.
Edit your question with the configuration of what suit are you using (accepcante, functional, unit or a custom). Is a file called by the suite configuration name, acceptance.yaml, functional.yaml.
You should have enabled Webdriver on this configuration file. (Or PHPBRowser, or Selenium).
And should start it with a 8000 port to work property.
phantomjs --web-driver=8000
Edit: There are modules: there are 2 enable. PhpBrowser i can't get working to myself so I change to Webdriver. Webdriver work with phantom js like i said before.
Install Phantomjs 1.9.* on your machine for headless testing, configure acceptance.yaml to this:
class_name: AcceptanceTester
modules:
enabled: [WebDriver]
config:
WebDriver:
url: 'http://YOUR_MAIN_URL/'
browser: phantomjs
capabilities:
webStorageEnabled: true
Then should start working.
Then for a full guide, use WebDriver Docs
Upvotes: 2