Keyword Driven Framework is a type of Framework where for a particular test case, you would first identify a set of Keywords and then associate an action (or method) which each of these keywords. Let us understand this concept with the help of an example. Let us consider that you have to automate a flow where you would need to do the following things in Facebook.
Now, let’s see how we can approach this test case from Keyword Driven Framework perspective. If you look at the above test case from pure Modular Framework point of view, you will be able to easily identify that you would need to write 3 different methods for the above test case. These 3 methods will be used to – Login to FB, Post status and logout. Once you have identified the methods, the next step is to identify some keywords and then associate the methods with these keywords. Below figure shows a pictorial representation of this concept. From the above image you can see that basically a Keyword Driven Framework is nothing but a collection of keywords & methods (or actions or operations) and the association between these two entities. So to create a keyword driven framework, all you have to do is -
To test this framework, download fb_testcase.xls and framework_java_code.zip. Provide location of fb_testcase.xls file in the Constants.java class and run ReadExcel class. Test report will be generated in the location you have provided inConstants class.
0 Comments
|