In the RichFaces team, we are strong believers in testing approaches, which can be seen with our test suite written using jsf-test framework and with our outstanding functional tests suite written in Ajocado/Selenium.
However we would like to deepen a test coverage even more, especially by employing new testing techniques and leveraging existing tools.
The initiative should lead into better JSF UI testability, but not only for framework developers, but also for framework users.
Your feedback is a critical part of this discussion to ensure the design and usability will be of the highest level - these approaches are intended to evolve into regular testing tools and methodologies which could simply be grabbed and would fit into a bigger testing picture.
Arquillian Containers / Test Enrichment
First of all, we would like to support Arquillian project and leverage their outstanding container support and test enrichment capability, which would improve our ability to test on certain containers.
It would open new possibilities in space of a back-end coverage, especially regarding servlets.
ShrinkWrap should allow us use unified approach for test packaging.
Its extension ShrinkWrap Descriptors should enable one to test the framework in different configurations of JSF (like a partial state saving, a client state saving, etc.). Some improvements such as support for JSF specific descriptors may be necessary here.
When speaking about extensibility, we are going to leverage JSFUnit, a tool which enables to verify both, client and server, in one test method, making JSF integration testing a breeze, without need for mocking the JSF API.
Some extensions to JSFUnit were identified as crucial points for completeness and effectiveness:
- enable usage of Selenium 2
- verify state at arbitrary phases of the JSF lifecycle
- introduce spying on the JSF API calls
Selenium 2 / Graphene 2
Selenium 2 was identified as a critical tool for JSF test development, since it allows one to easily write front-end tests and provides outstanding support for multiple browsers through a unified API.
Graphene is then the project which helps to test AJAX applications by filling in the gaps of Selenium.
Summary of these efforts can be found in Arquillian Dev space.
Testable Data Model
One approach which could be potentially really useful in end-user testing is automation and it’s cost/effectiveness.
To this end, the RichFaces QE team is working on providing a high-level API for testing UI components which is built on top of Selenium (as low-level API).
I’m starting discussions in many places to share our thoughts with other open source teams in order to make sure this initiative really fits not only us, but the community as the whole!
Let’s make JSF test-driven development a breeze!