So I put together a quick example of how to go about building your first Selenium test with PHPUnit.
Why PHPUnit? Because there are less moving parts to understand at first.
Remember, the most important part of testing is to have tests to run. You can work on how you build those tests later.
This is an awesome little game by @seldaek for the GitHub Game Off 2012. You should go check out! Tons of fun!
Here is the video from my talk about how to be a better developer. For more information, check out my page dedicated to the talk.
I was setting up a basic Selenium test setup and ran into a pretty immediate show stopper:
Cannot find firefox binary in PATH. Make sure firefox is installed. OS appears to be: MAC
I hadn’t yet installed Firefox. After I installed it, however, I still continued to get the error.
My googling lead me to this page, and while the advice is generally what needs to happen, I wanted to detail my exact fix, and make life a little simpler for everyone else.
As you can see, the solution is two fold:
- Create a file at ~/bin/firefox with the short script to run firefox. I got unclear errors w/ the source page’s suggestion, and this resolves it.
- Create a ~/.profile to add ~/bin/ to your path.
Restart your terminals, fire the Selenium server back up, and you’re good to go!
I was thinking about what my dream job would be today, and it occurred to me that I have already figured out my dream job, and how to get it. I have it, in fact. I just haven’t figured out how to actually get paid for it.
See, I have always liked to help people. Never doing well in school, though, ruled out a whole list of options. However, one thing I have always enjoyed is programming.
I wonder how I ended up helping out in #symfony? It seems I made up my own dream job.
So, having your dream job is great, but not being paid to do it, well, that’s not going to work. I have a family to take care of, and they have this unfortunate habit of eating.
So — it’s a work in progress. I suppose that’s pretty much like everything else we do, no?