My experience helped me to considerable extent, while writing this blog. The most important reason behind starting this new blogsite (i already have one blog site where i share my personal, non-tech experiences), is to share my day in and day out experience with the following – 1) Software Testing 2) Java & Selenium and 3) Finance.
So obviously, before putting up this first post, the first question that came to my mind was – which topic to be put first? And to feed to the confusion was another question – how to sequence my posts?
Now, its impossible to get an answer for both of those questions and hence i decided to jump into the pool straight away without thinking anymore.
Basically, with this blog site, my aim is to unload all the useful information that I’ve stored in my Google Docs – the info i had dug out googling while learning anything.
This post i am going to discuss about what i know about Data driven and Keyword driven automation testing.
1. Data driven :
Lets take one example – gmail login page. The user id field will accept the alphanumeric characters. Suppose if i hardcode the value vishwas_shenoy for username field, it is going to test only one combination. This anyways is not so difficult to test manually also.But that will not do comprehensive testing of that field and page. We can come up with so many combination of input data for that field. This combination of various inputs can be listed in a excel and the test can be run as many input data that are there. This is data driven testing in principle. How we implement it depends on the tool that we use.
2. Keyword driven:
Using the same example of gmail – there are so many things that a user can do after login like check mail, compose etc. I want to simulate a use case – real time scenario such as 1. Login, check mail , logout
2. Login, do nothing, Logout
3. Login, compose by reply, logout
4. Login, forward a mail, logout.
If we look at these examples, the login, logout are common functions. So instead of writing the code for these functions separately in each of the script, we can reuse the common functions if write them one each separately and give them a logical name – login, logout etc. So for use case 3, i can just write Call “Login” and write the rest of the code.
Most of the times, the two frameworks are implemented together and naturally this framework is termed as Hybrid Framework.