Skip to main content

Running Tests Inside Containers

Setup PhpStorm to run tests inside docker containers

  1. Add a new CLI interpreter

test-in-docker-01

  1. Select From Docker, Vagrant, […]

test-in-docker-02

  1. Set type to "Docker compose"
  • Point Configuration files path to Zoo's docker-compose.yml
  • All the projects will be loaded in Service list. Select "farfalla" (or the corresponding project)

test-in-docker-03

  1. After confirming and going back to CLI Interpreters, edit the Lifecycle configuration to connect to the existing container instead of starting a new one

test-in-docker-04

  1. Go to "Test frameworks" settings
  • Add new (+)
  • Select "Pest by Remote Interpreter"
  • Select "farfalla" (or the corresponding project) interpreter you've just created

test-in-docker-05

You can now run tests from PhpStorm IDE and those will run in the project's container


X

Graph View