Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Codeception\Util\Mink module is not configured #37

Open
dstankovd opened this issue Mar 12, 2015 · 7 comments
Open

Codeception\Util\Mink module is not configured #37

dstankovd opened this issue Mar 12, 2015 · 7 comments

Comments

@dstankovd
Copy link

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!

@elchesco
Copy link

any chance you have php-curl installed?

@dstankovd
Copy link
Author

Yes, it is installed and running.

@elchesco
Copy link

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:

Codeception/Codeception#533
Codeception/Codeception#320
Codeception/Codeception#412
Codeception/Codeception#1036

@dstankovd
Copy link
Author

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:

  1. Install webception with composer
  2. 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.

@elchesco
Copy link

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?

@dstankovd
Copy link
Author

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.

@elliotboney
Copy link

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:
image

The newer version of codeception does not have behat/mink as a dependency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants