Reputation: 32407
I use JUnit and Selenium (1) to write automated integration tests. I've used it on a couple of projects so far.
I find the Selenium API too low-level, and end up writing generic 'wrapper' code, to deal with things like:
Is this an inevitable part of writing your own test harness? Or is there a wrapper library somewhere / should I bother to create one?
Upvotes: 3
Views: 1417
Reputation: 32407
These days I would use FluentLenium which covers a lot of what I asked for originally: https://github.com/FluentLenium/FluentLenium
Upvotes: 1
Reputation: 7989
You can create DSL for application driver using the Page Object pattern and the windowlicker (Java GUI testing framework which uses Selenium 2) for implementation.
More theory and practice techniques see in:
http://www.wakaleo.com/blog/279-selenium-2web-driver-the-land-where-page-objects-are-king
http://www.slideshare.net/alimenkou/dsl-page-object-and-selenium-a-way-to-reliable-functional-tests/
http://www.growing-object-oriented-software.com/
Groove developers can use Tellurium Automated Testing Framework:
http://code.google.com/p/aost/
Tellurium vs Selenium : Compare
Upvotes: 1
Reputation: 612
Personally I think that Selenium 2 is about the right abstraction level for a browser automation framework. I agree with you that there are some annoying things like handling waiting for ajax calls which could have a bit more support in the framework but in Selenium 2 there's a support package which will probably contain those features when it is right to include them.
The rest of the points you mention seem to me like project specific features which you wouldn't want in the core framework. You can easily roll your own framework which is right for your kind of projects (and you should) or you can search the internet for projects which contain stuff you also find usefull and adjust. For example I've based my testsuite on this: http://code.google.com/p/design-of-selenium-tests-for-asp-net/ but there are many more higher level frameworks ( some super highlevel ) built on top of selenium which you will find with a search ( http://code.google.com/hosting/search?q=selenium&projectsearch=Search+projects ).
So yeah, I think it's inevitable but it shouldn't cost you that much work.
Upvotes: 1