Calling Developers!
We are reenergizing our code contribution process! Learn More

What are the Slack Archives?

It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

Hello all! I am trying to run codecept in my local environment for my own test units, and I get thes

U01S9J6LBFE Posts: 1 🧑🏻‍🚀 - Cadet
edited March 2021 in Slack General

Hello all! I am trying to run codecept in my local environment for my own test units, and I get these errors:

In ConnectionFactory.php line 42:

Unable to open connection

In PdoAdapter.php line 72:

Unable to open PDO connection

In PdoConnection.php line 64:

SQLSTATE[08006] [7] could not connect to server: Connection refused
Is the server running on host "" and accepting
TCP/IP connections on port 5432?

But I am not accessing DB, and my DB is MySQL (not using that port).

That happens when I run:
docker/sdk testing codecept run -c tests/PyzTest/Zed/MyModule/codeception.yml


  • U018XELUZS9
    U018XELUZS9 Posts: 167 🧑🏻‍🚀 - Cadet

    I just switched yesterday to plain PHPUnit-Tests for real Unit-Tests (some call them also Micro-Tests). We store them in a different folder and we also have a separate step in our CI pipeline to start them. We still have the Codeception tests, but use them only for integration and API tests.

  • Try to add \SprykerTest\Shared\Propel\Helper\ConnectionHelper to your codeception.yml.

  • U0134CBTUKS
    U0134CBTUKS Posts: 42 🧑🏻‍🚀 - Cadet
    edited March 2021

    check Testify/_support/Helper/Environment.php APPLICATION_ENV