sebuilder/se-builder — pull request #72 by dickolsson (2013-09-11 20:29:31+00:00)
Title: Format phpunit

Here's a new format that is meant to work with the Selenium 2 extension for PHPUnit (https://github.com/sebastianbergmann/phpunit-selenium).

Here's a gist with an example JSON script and PHP export of what's covered: https://gist.github.com/dickolsson/6529005

Here's some random notes:

- The test script from above is generic and works agains Wikipedia, so it should be possible for anyone to try
- I've only tested the exported test with SauceLabs' hosted service. Therefore, the patch currently includes their namespace and base class. However, there are no real dependencies on SauceLabs, so I'm gonna set up a local environment and figure out a better way to ship this formatter.
- I've added quite a lot of comments to the exported PHP to make it easier to read and debug
- Window and frame related steps are there, but I haven't found opportunity to test them yet
- Some (less common?) implementations are still missing

So, even though the thing works well it's still a work-in-progress. But it might take a long while before I have time to revisit this again, so I thought it was a good idea to post the pull request already.

Quick feedback on the overall experiencing developing for se-builder:

- Generally a good experience!
- I missed documentation about how callbacks worked (how to use `doSubs`, what `escapeValue` really was, and what properties `step` contained etc). After some digging in `io.js` I was of course able to figure it out, but some documentation would improve the experience.
- It took some time for me to wrap my head around the `boolean_*` concept and how it was different to the normal `assert`, `waitFor` etc. This could use some explaining in the docs.

Cheers!