New test application for RichFaces 4
ppitonak Apr 27, 2010 3:27 PMHi,
* plain components with all its attributes (see screenshot 3)
* various combinations of components and containers (e.g. calendar in data table, panel, modal panel etc.)
* it would be very easy to test not only rich and a4j components but also standard components
* it would be possible to add regression tests into this application
After you start the application, you will see list of all components (picture 1). ATM only a4j:commandLink works. When you select a component, a list of all available test cases will be displayed (picture 2). That might be e.g. plain link (picture 3), internationalized link, skinned link, some special cases for regression tests etc. The first and second list might be merged into one page and made more rich if desirable. I want all pages to be bookmarkable which will make selenium tests a bit simpler.
Palo
I studied Exadel's selenium tests a bit but since original authors don't work on it anymore and practically nobody is able to maintain it, I decided to create a new app because it seems to require much less effort. My application merges the best approaches from both applications. I commited new version of our future test application for RF 4.x to QE repo (http://anonsvn.jboss.org/repos/qa/people/ppitonak/testapp/). At the moment works only in JBoss 6, not Tomcat.
My idea is to have one complex application where almost everything could be tested:
* plain components with all its attributes (see screenshot 3)
* various combinations of components and containers (e.g. calendar in data table, panel, modal panel etc.)
* it would be very easy to test not only rich and a4j components but also standard components
* it would be possible to add regression tests into this application
There is a plan to separate Selenium tests into its own application (like in demo). Lukas already prepared a pom which can be used as a parent for all projects containing Selenium tests.
After you start the application, you will see list of all components (picture 1). ATM only a4j:commandLink works. When you select a component, a list of all available test cases will be displayed (picture 2). That might be e.g. plain link (picture 3), internationalized link, skinned link, some special cases for regression tests etc. The first and second list might be merged into one page and made more rich if desirable. I want all pages to be bookmarkable which will make selenium tests a bit simpler.
In the screenshot 3 you can see a simple page with a4j:commandLink. You can set whichever attribute of component you want. You can even set actions and action listeners. I'll add some kind of help so that anyone knows what can be inserted into input boxes.
Last but not least you can change a template of a page which, generally, will change container. I prepared a simple template which contains a div with red border for illustration (see picture 4). In practice, instead of red border there will be table, rich panel, modal panel etc.
I'll add logging and messages to the page later. I also plan to add prepared tests like in old test application. There are some automated tests in original application which might be useful but it requires further investigation.
Adding a new component is a matter of creating min. 2 xhtml, one managed bean, adding component's name into list of components and adding css and javascript files as needed. I prefer convention over configuration so maybe in future it will be even simpler.
In my humble opinion, this application could provide us a good base for very high coverage by Selenium tests. If we keep in mind some details, Selenium tests should run without problems also in portal environment. Are we going to provide support e.g. for Google App Engine?
Regards
Palo