Posts

Pattern in Test Automation

Image
Keyword driven Keyword driven frame work was mostly popular initially when we had no testing framework like JUnit, TestNG. One use to write their own testing framework where he use to define ‘Keyword’ on excel/ xml and invoke a corresponding method in code using reflection. Keyword driven + Excel Here one can define multiple keyword and map them to a method name. Once can write a parse to iterate through the excel and pick the keywords and invoke the corresponding method and pass the corresponding argument. e.g. if one want to perform search he will have a keyword ‘Search’ then automation framework will invoke method ‘SearchForTerm’ using reflection. The SearchForTerm method will do its job of locating the text box element and setting the value of test box and clicking search button. Pros Simple to use Adding scenarios without touching code base. Ie. Keep reusing same keywords in excel Hence easy for people who have never done automation