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

Quickstrom #25

Open
wants to merge 19 commits into
base: main
Choose a base branch
from
Open

Quickstrom #25

wants to merge 19 commits into from

Conversation

marcosh
Copy link
Contributor

@marcosh marcosh commented Apr 14, 2022

This branch add end-to-end acceptance tests using Quickstrom

@marcosh marcosh requested a review from gdeest April 14, 2022 16:08
elm/README.md Outdated Show resolved Hide resolved
elm/README.md Outdated Show resolved Hide resolved
elm/README.md Outdated
--max-trailing-state-changes=1 \
--trailing-state-change-timeout=500 \
/spec/Tagger.spec.purs \
http://localhost:8000
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am following these instructions, but running into:

2022-06-13 15:34:33 ERROR  Error Unable to connect to WebDriver server

Do you have any idea ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this happens if you don't have the selenium/standalone-chrome container running.

Scripting the two commands together should prevent this from happening

@marcosh marcosh changed the base branch from elm-frontend to main June 14, 2022 08:49
@marcosh
Copy link
Contributor Author

marcosh commented Jun 14, 2022

@gdeest I created a script to run quickstrom. Could you try it and see if it works?

@gdeest
Copy link
Contributor

gdeest commented Jun 14, 2022

@marcosh Doing !

@gdeest
Copy link
Contributor

gdeest commented Jun 14, 2022

@marcosh Unfortunately I am still running into the same issue:

huginn@hel ~/c/servant-template ((d710ffb6…))> ./bin/test/quickstrom 
[sudo] password for huginn: 
webdriver
8646a25ccb5ea5962e91a1aa5abeae4c157ab0ca6ec343a9c96d8b3899a14bbd
   ____       _      _        _                               
  /___ \_   _(_) ___| | _____| |_ _ __ ___  _ __ ___         
 //  / / | | | |/ __| |/ / __| __| '__/ _ \| '_ ` _ \       
/ \_/ /| |_| | | (__|   <\__ \ |_| | | (_) | | | | | |     
\___,_\ \__,_|_|\___|_|\_\___/\__|_|  \___/|_| |_| |_|

Version: 0.4.0-0b875ef5322de16e3872788359796bc7daf04562

Running 10 tests...

――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

5 actions
2022-06-14 11:39:43 ERROR  Error Unable to connect to WebDriver server

――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

I confirmed that the webdriver container is running (the container ID matches the one started by the script) :

huginn@hel ~/c/servant-template ((d710ffb6…)) [1]> docker ps
CONTAINER ID   IMAGE                                          COMMAND                  CREATED          STATUS         PORTS                                                        NAMES
8646a25ccb5e   selenium/standalone-chrome:3.141.59-20200826   "/opt/bin/entry_poin…"   10 seconds ago   Up 9 seconds                                                                webdriver

@gdeest
Copy link
Contributor

gdeest commented Jun 14, 2022

Increasing the sleep value in the script doesn't seem to help, so I don't think it is a race condition but: we probably want to find a more clever way to wait for the webdriver server to start (e.g., wait until it accepts connection on the dedicated port).

@marcosh
Copy link
Contributor Author

marcosh commented Jun 14, 2022

Increasing the sleep value in the script doesn't seem to help, so I don't think it is a race condition but: we probably want to find a more clever way to wait for the webdriver server to start (e.g., wait until it accepts connection on the dedicated port).

makes sense to use something like https://github.com/Eficode/wait-for.

It's kind of strange that sleep did not solve it. I was able to replicate the issue and solved it that way. But maybe it was the same symptom for a different problem


docker run --rm -d \
--name webdriver \
--network=host \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a good reason to be running in host networking mode instead of -p 4444:4444 ?

I think host networking doesn't work on Mac.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I see, it allows the second docker container to connect.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

otherwise I guess we need a docker-compose.yml and a dedicated network. I just copied these from the quickstrom documentation

@marcosh
Copy link
Contributor Author

marcosh commented Jun 16, 2022

@gdeest I tried to move the script do use docker-compose. Hopefully this solves the issues. Could you try to run it?

@marcosh
Copy link
Contributor Author

marcosh commented Jul 1, 2022

@gdeest did you have the chance to try the new version?

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

Successfully merging this pull request may close these issues.

2 participants