Monday, May 30, 2011

That awful WebDriver or Selenium 2 disadvantages

Actually I disappointed. Selenium 2 seems to be not ready for enterprise testing. I had to move my test engine back to Selenium RC. Certainly its a pity I have to renounce the object-oriented model, but I still keep the design (actually this has nothing to do with real OO design) with the help of set of adapters to make me get back to Selenium 2 since it will become somehow  finalized.
The features of Selenium 2 that I liked a lot and I feel the most sorry for:
- selecting only visible elements by xPath
- capability of retrieving the list of the objects representing html elements
- controlling of key sending. The capability of sending the symbols one-by-one

Monday, May 16, 2011

Ant custom task in application to the real purpose. Part One.

I found that a lot of ant tasks examples face the difficulties when they are got handled by the newbies. So, I decided to provide the detailed instruction on how to implement your own task and the example will be based on the real requirement that I had to create the solution for few days ago.
The problem we faced in our project can be described in the following way:
1. We have some set of files in different folders and of different formats (.properties, .xml, .somethingelse)
2. We need to customize some  values there
3. We use ANT to process those files
4. ANT script is divided in several targets
5. Once some target gets failed the previous ones which have been completed cause changes in some sub-set initial set
6. We require the simple way to re-run the scenario so we won't have the "incremental customization". I mean if we added the string to the file and some further customization failed, we should not have two identical strings after the second run after something went wrong

So the way I have chosen is to determine which ANT standard (or well-known packages) tasks are used  in our customization scripts. The actual set appeared to be not so huge. Like: replace, copy, xmltask. I prototyped the solution for the replace task. Some extended class called SafeReplaceTask was created. It implemented the following functionality:

1. To determine the set of files to be handled in the task
2. To back-up the files
3. To save the mapping of original files - back-up files (the most simple way is to serialize HashMap object)
4. To call the original execute() method of the Class we're extending
5. On fail to restore all the back-ups using the information from de-serialized object

That was the problem I had to solve, and the technical details of this solution you will find in further posts.

Thank you!

-- PART II --

Thursday, May 05, 2011

QA team in scrum methodology

The more I'm involved in SCRUM development process the stronger I'm sure QA team has to be formed as some kind of service department. Some kind of team reporting to other ones. The same process (like cards, planning poker, etc.) but the only difference will be the consumer of "QA product". The product of the QA team will be consumed by the teams performing actual development.
The back-log will be filled with the stories like "I want to have the testplan for the functionality". That will make the product owners create detailed requirements earlier than usual. Once the iteration "n" will be ready and the test plan will be prepared, the team will be able to handle the story "I want the functionality is verified according to prepared test plan" in iteration "n+1".
Such approach will help to accumulate and consolidate QA resources within one administrative unit and use the collaborated knowledge of the overall resource.