Webception
Webception copied to clipboard
Codeception\Util\Mink module is not configured
Hey, I've run into the following problem...
Codeception\Util\Mink module is not configured!
Provided URL can't be accessed by this driver.[curl] 6: Could not resolve host: localhost [url] http://localhost/admin/api/
I can open it just fine through the browser and postman. This is my acceptance.suite.yml
class_name: WebGuy
modules:
enabled:
- PhpBrowser
- WebHelper
- REST
config:
REST:
url: 'http://localhost/admin/api/'
timeout: 90
PhpBrowser:
url: 'http://localhost/admin/api/'
And the test is as follows:
$I = new WebGuy($scenario);
$I->wantTo('Login');
$I->sendPOST('pages/login', [
'username' => 'admin',
'password' => 'admin'
]
);($I);
$I->seeResponseCodeIs(200);
$I->seeResponseIsJson();
$I->seeResponseContains('"success": true');
I'm using Windows. Any help is appreciated!
any chance you have php-curl installed?
Yes, it is installed and running.
that usually happens when codeception can't see/connect to the host. sounds more like a configuration issue with your environment or maybe codeception. you can read more here:
https://github.com/Codeception/Codeception/issues/533 https://github.com/Codeception/Codeception/issues/320 https://github.com/Codeception/Codeception/issues/412 https://github.com/Codeception/Codeception/issues/1036
Thank you but unfortunately non of these helps :( The thing is I cant even run the default tests that come with webception. Tried several times with fresh installs of webception but still no luck... Here is what I do:
- Install webception with composer
- Change php to php path in composer.bat After this I try to run the default tests but they all fail with the same error:
Codeception\Util\Mink module is not configured!
Provided URL can't be accessed by this driver.[curl] 6: Could not resolve host: ...
Am I doing something wrong?
By the way I can run custom codeception tests of my admin system without any problems.
are you running this through a VM? or installed it through something like XAMPP? does it make a difference pointing to 127.0.0.1 instead of localhost, have you verified your virtual hosts config?
I've tried both WAMP and XAMPP, without any luck. If I use 127.0.0.1 instead of localhost it can't connect at all, getting connection timeout.
I found this to be a problem with trying to run older tests with the v2.x version of codeception.
I use the codeception executable out of my testing directory, and if I were to run the example tests that ship with Webception, I receive the same error:
The newer version of codeception does not have behat/mink as a dependency.