docksal / behat

A self-contained Docker image to run Behat with no external dependencies
34 stars 22 forks source link

Cannot run example 'No such container: behat' #2

Closed clemens-tolboom closed 6 years ago

clemens-tolboom commented 6 years ago

I have available

docker run --rm -v $(pwd):/src docksal/behat --version

behat version 3.1.0

next trying the example

git clone https://github.com/docksal/behat.git docksal-behat
cd docksal-behat/example
./run-behat features/blackbox.feature

Error: No such container: behat To view HTML report visit: http://\<your-docker-host-ip>:8000/html_report

Running the script with set -x gives

./run-behat ++ docker-compose ps -q behat

  • docker exec behat --colors --format=pretty --out=std --format=html --out=html_report Error: No such container: behat
  • echo 'To view HTML report visit: http://\<your-docker-host-ip>:8000/html_report' To view HTML report visit: http://\<your-docker-host-ip>:8000/html_report

Spinning up the containers then run the example gives some results

docksal-behat/example % docker-compose up

then in a different terminal

docksal-behat/example % ./run-behat

docksal-behat/example % ./run-behat ++ docker-compose ps -q behat

  • docker exec 89d6d28bd51cc74eb3c1b65b0a81ca0f5b15feaa6edf4f028a677e5254993f94 behat --colors --format=pretty --out=std --format=html --out=html_report
@javascript
Feature: Getbootstrap smoke testing
  As an anonymous user
  I should be able to navigate through website pages using Nav buttons

  Scenario: Open home page and find text                                                                                                                       # features/blackbox-javascript.feature:7
    Given I am on "http://getbootstrap.com/"

Not sure what is wrong. I know how to fix the tests (PR #1) but not this ./run-behat script.

lmakarov commented 6 years ago

Thanks for pointing this out. I updated instruction in README to clarify the usage.

clemens-tolboom commented 6 years ago

Thanks. I'll check that hopefully this week.