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

Add selenium & tests #482

Closed
wants to merge 8 commits into from
Closed

Conversation

freelibre
Copy link
Contributor

This is a Work in progress for issue:
#391

With this you can log in a Selenium grid console with 2 browers (chrome & firefox):
http://localhost:4444/grid/console
An exemple test case is added in side format (exported from firefox selenium IDE)
A new npm package is added to launch side test from CLI

Next steps proposal:

  • try to launch side-runner tests automatically and get result in grid thru VNC
  • try to add it in Travis
  • try to add existing behat test

@alexsegura alexsegura added the WIP label Oct 15, 2018
@freelibre freelibre changed the title Add selenium & a test Add selenium & tests Oct 20, 2018
@alexsegura
Copy link
Member

Thank you for this 👏

IMHO, the final goal is to have browser tests written in Behat/Gherkin language.
I think this is more maintainable, and we can have access to the database, to create fixtures, for example.

Selenium IDE can be cool, so that "random" users can help us write tests.
I found salmabenhadjali/gherkinator that allows to convert *.ide files to Gherkin language.
A pretty nice workflow would be:

  • People create *.ide files without any knowledge of Gherkin
  • We convert them to Gherkin language automatically

Actually, I would like to give a try to symfony/panther, it looks like it is way easier to use than full-stack Selenium.
Let me try to setup symfony/panther on the project. It looks like it is not supported out of the box in Behat (see Behat/Symfony2Extension#145), but it should be easy.

@freelibre
Copy link
Contributor Author

Thank you for your feeback. I think *.ide file will be deprecated soon so I've proposed *.side files generated by the new IDE version. It should be possible to then use selenium-side-runner to run tests. You are right such files generated are indeed more for people willing to contribute by adding some End 2 End scenario without lot of coding knowledge as it just needs the browser extension you can grab firefox extension for example and such tests could be generated and updated very quickly. I'm trying behat/mink facebook\php webdriver to interface with selenium hub but your solution seems much wiser.

@alexsegura
Copy link
Member

alexsegura commented Nov 2, 2018

While digging around I came across Zalenium.
It seems to have more features enabled out of the box.

@freelibre
Copy link
Contributor Author

freelibre commented Nov 3, 2018

Yes you are right Zalenium add more features. If you want I will change to Zalenium. I've just push the VNC support to current selenium install so now you can connect to a node URL:5900 with a VNC client like TigerVNC or Remmina (the login password is : secret) and then you will be able to see the tests playing in a browser.

@alexsegura
Copy link
Member

See #502

@alexsegura alexsegura closed this Nov 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants