Tuesday, October 18, 2011

My story with software testing (checking) automation (part 2)

Part 1 of this story.

How to automate ?
Being the student of context-driven school I know that there are no best practice for automation checking. We needed to consider our context before we started to try with any of the available tools or technologies.
Things we tried to take into account :

- Which layer of the application we are able to use for automation?
- Which automation tool will easily handle web application based heavily on AJAX
- What types of web browsers we need to cover?
- Does anyone from the team has some previous experience with automation tool?
- Is our automation going to be a part of CI?
- Are we allowed by company policy to use any open-source tools?
- What are the programming skills among the team.
- Which programming language will be the easiest to learn for new team members?
- Who will be using our automation scripts besides testers and developers?
- How often we have changes in core functionality and UI and what approach and what tools will best deal with such situation?
- Is there possibility to reuse automation scripts or framework for user acceptance/validation part?
- Can we have tools that will let the stakeholder be involved in creating scenarios for automation checking scripts?
- What kind of report we want to deliver at the end of the day?

Thanks to above questions we could easily start looking for things that would best fit our context.

Tools
We started from QTP but this tool was not able to deal with our web application (or we gave up to early). Then we gave a chance to Selenium 1.0 and Watir but we had a problems with automating some sophisticated HTML 5 elements. Eventually we tried Selenium WebDriver and it was it! We were able to manipulate almost all of the application's elements. We could also use C# programming language. In addition Selenium seemed to have a big and active community which is crucial in any open-source project. Selenium WebDriver works also on our required web browsers : Internet Explorer and Firefox. Having the tool selected we could start developing the automation framework.

Approach
We decided to develop the application using Page Object pattern which seemed promising. We liked the idea of separating checks(assertions) from the UI interacting elements. Secondly with Page Objects we could easily split the work among the team members . But most important was the fact that using Page Object pattern in case of UI change we needed to apply the fix just in one place because there was no duplicated code.

Going further
The above approach to automation was great but it was not enough. To crate checks we needed someone who has a basic programming skills. In addition with that framework we were not able to involve stakeholders in user acceptance/validation part. We started to looking for ways to overcome this limitation. We found the Cucumber. Then we went to Specflow which aims for .net projects and the GIVEN-WHEN-THEN story has begun...

Alek

No comments:

Post a Comment