Hi

97 views
Skip to first unread message

Nagajyothi Arun

unread,
Apr 21, 2015, 7:36:12 AM4/21/15
to seleniu...@googlegroups.com
Why we use Keyword driven framework?

Sudhansu Sekhar panda

unread,
Apr 21, 2015, 7:53:50 AM4/21/15
to seleniu...@googlegroups.com
Hi Nagajyothi,

I am explaining you in a simpler way... This methodology uses keywords (or action words) to symbolize a functionality to be tested.

suppose one TC is login to gmail.com, then how will it be in keyword driven framework.

-->create a method(basically keyword) loginToGmail() in some where in your code. What basically a keyword driven framework dies is, it will try to find the method logInToGmail() in the code and if the match found it will execute the script. Here remember that the method is nothing but the keyword. Keyword should be unique.

Thanks,

Sudhansu

Anand S.

unread,
Apr 21, 2015, 8:39:48 AM4/21/15
to seleniu...@googlegroups.com
Addition to Sudhansu,

You can have same function name loginToGmail() with different parameters.
loginToGmail('user','pwd')
loginToGmail('user','pwd','message')

Click('Save')
Click('Save','ConfirmationMessage')

It's all depends on you, how much steps you want to add in one function.



On Tuesday, 21 April 2015 17:06:12 UTC+5:30, Nagajyothi Arun wrote:

Anand S.

unread,
Apr 21, 2015, 8:42:08 AM4/21/15
to seleniu...@googlegroups.com
+ You can have Business Keywords like CreateUser() / DeleteUser() and Also Action Keywords (Click(), EnterText()).


On Tuesday, 21 April 2015 17:06:12 UTC+5:30, Nagajyothi Arun wrote:

Brian Smith

unread,
Apr 27, 2015, 1:22:07 AM4/27/15
to seleniu...@googlegroups.com
You should steer away from keyword driven frameworks and instead create methods describing an action or behavior a user performs. An example could be submitCredentials(username, password) and within that method would exist the necessary method calls to complete the action.

See my open Selenium framework at http://github.com/crazycabo/selenium_core for examples.

Abhishek Singh

unread,
Apr 28, 2015, 11:37:52 AM4/28/15
to seleniu...@googlegroups.com

Hi Nagajuothi,
I can quote one of the main advantage of KDF from business perspective.

  • Decreases technical nature of application automation – Working with keyword data tables for everyday application automation is a lot less technical than working with code statements. Therefore individuals that are not as technical can be brought onto the team to help create automated tests.

I feel the USP of Using keyword driven testing is, you can empower business user or test engineers with limited knowledge of underlying Selenium framework to automate test cases just by using keywords file and data file. (No need to write codes/programs)

Hence we can easily train team members ( or for that matter 3rd party contractors) to help automate manual test cases without worrying about writing code.
Basically if you have KDF in place, with just few training sessions, you can enable mutiple testers to write/automate your manual test cases.

This saves lots of $ :-)

Note - We have invested in creating a KDF framework once and it has resulted in huge benfits , due to less dependency on coding skills.

Hope this help.

Regards,
Abhishek

Oscar Rieken

unread,
Apr 28, 2015, 1:02:28 PM4/28/15
to seleniu...@googlegroups.com
Sounds like an interview question to me

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/832fbf8b-6b6f-4b79-a8e9-1d4a65dea2c4%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Mercious

unread,
May 4, 2015, 8:06:52 PM5/4/15
to seleniu...@googlegroups.com
Why has noone addressed what Brian Smith said?

I want to become clear about how to design tests properly using Selenium. 

Now we have two contradicting opinions in this particular thread. Can someone maybe give it a few words?

I think everyone is kind of agreeing on using a Page Object Model design pattern?

Mike Pietsch

unread,
May 5, 2015, 12:40:23 AM5/5/15
to seleniu...@googlegroups.com
Saying you want to design tests properly is like saying I want the best. There is no best, just what what works best in terms of achieving your or your organizations objectives. Personally I think the page object model is clumsy and more effort to maintain than it is worth and it would slow me down in terms of tests we produce, but it doesn't mean my solution is best. It doesn't mean it isn't proper. It does however provide the proper amount of testing for what we need. 
Every good engineer, no matter the discipline, knows that any solution is a series of trade offs. A Lamborghini is a properly engineered vehicle and so is a Ford pickup. The trade offs in one make it a little bit better for bringing home lumber.  Using selenium really isn't that much different, same goes for the use of page object patterns. Look at the the benefits and costs of different solutions before deciding what is best for your org. 
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.

Mercious

unread,
May 5, 2015, 3:23:32 AM5/5/15
to seleniu...@googlegroups.com
I dont know if i agree with your answer.

Partially, yes.

But you take away the effort of writing maintainable and stable tests a little. I have no use of tests that are unstable and give false positives from time to time. Thats senseless and if thats the case then i wasted all of my time writing these tests for nothing.

I feel like a design pattern, even if its only for Selenium tests, is neccessary. We have a team that works a lot of external developers, meaning new people will come and go every now and then. They need to be able to quickly adjust the tests without knowing what exactly the other person had in mind. 

If you are not using any Page Object Pattern or whatever represents the idea of it ... How do you assure that your tests are maintainable with minimal effort? Assume that you are not the only person that has to maintain them.

Mike Pietsch

unread,
May 5, 2015, 11:53:46 AM5/5/15
to seleniu...@googlegroups.com
Well it is good to disagree, it means you are on your way to doing things right for your situation.  Mr. Ferrari started a car company when he disagreed with  Mr. Lamborghini, and now we have lots more $400,000+ supercars because of it.  If people all agreed we’d still be riding carts behind the smelly end of a horse.

Don’t assume that Page Objects are the only design pattern that results in maintainable code.  I’ve been writing code for 30+ years and have Page Objects as one of many tools in my toolkit, not the only one.  My point in my previous response was that there are different ways of doing things and what is right for one environment isn’t necessarily right for another. Terms like proper, right, best, etc, are relative to the environment/organization. 

As far as how I insure maintainable tests, with minimal effort….different design patterns.  Let’s just say that the highlight of it all is a recursive serialization, a threaded tree that builds a test dynamically, code that checks itself for false positives when it encounters an issue in execution and re-writes itself if necessary, test objects that create new rules for updating when necessary, test objects that are free to select a headless browser if the test has met a threshold of reliability over time, and it’s all implemented in a way that notifies the dev of what it is doing in real time.  Selenium is part of this system, but it isn’t all of it and a Page Object design pattern just happens to not be.



--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages