This is a simple tutorial how to set up Selenium test with PHPUnit and phantomjs for easy and fast testing.
Today I wanted to learn something about Selenium. It’s very popular testing tool for any application that can be launched using a web browser, regardless of programming language or technology. I don’t know it very much, in fact, I know only how to set it up and write the simplest test 😉 But I want to share my today’s experiences because I cannot find any simple tutorial and had to glue together scripts, setting and libraries from all across the internet 😉
If you don’t like reading tutorials and want rather dig into example code I created the repository on GitHub where you can find everything I talk about here.
I use git for about 3 years. First I knew only how to use it with PhpStorm –
cmd + t to update branch,
cmd + k to commit and push changes. To make new branch I used menu and let the IDE do the work. It was fine until I heard about
squash. I heard that it is often used when you contribute to someone’s repository. Maintainer of the repo often want clean history – if you want to contribute you must make pull requests with only one commit. And you may do it using squash.
It was a bit too much for me at that time:
push --force. No thanks 😉
Some time later a couple of people in my company started to use git more. They started to make squashes, rebases and so on. So if they wanted to use it I had to learn it too.