0

I have knowledge of selenium and want to implement data driven framework. So, I need basic knowledge for this at a starting level so that I can proceed in my organization

3
  • What language are you using? Can you expand more on what exactly you are looking and where you are having problems?
    – Paul Muir
    Jun 2, 2015 at 11:21
  • I am writing in java and I am working in an ERP solution. I am able to write the scripts to automate the individual pages and but I have no idea how to manage all the individual scripts if I write many. So, I need help in designing a framework to manage them all
    – Som Ghosh
    Jun 3, 2015 at 5:36
  • I think this is too broad a question to really answer easily as it stands - SQA is a better fit for specific questions about the problems you've been running into.
    – testerab
    Jun 5, 2015 at 17:37

2 Answers 2

2

Don't start with designing framework: YAGNI principle applies. Start coding. Implement tests, refactor common parts - and framework will emerge. Difference is, this framework will have only features you need.

By definition, if you have to ask how to design a testing framework (don't already have skills to do it right), you should not try to foresee what you may need - because you cannot do it right.

Become a skilled programmer, and after trying for a while, you will see what works for your situation. Also, read code of other more skilled coders. Join some relevant open source projects.

1
  • That's a good point you are saying. I am able to write the scripts to automate the individual pages and but I have no idea how to manage all the individual scripts if I write many. Any suggestions ?
    – Som Ghosh
    Jun 3, 2015 at 5:38
1

I would tend to disagree with the comment of not designing and just coding. As with any testing you should aim to plan and find issues in requirements Before writing code. Its harder to change things later!

I am quite a fan of Page Object Model (POM) as an approach

http://seleniumeasy.com/selenium-tutorials/page-object-model-framework-introduction http://www.toolsqa.com/selenium-webdriver/page-object-model/

This approach keeps your tests, data and page elements separate from one another. For me, this makes the tests easy write, and just as importantly, to maintain.

For example if a test fails following this model its unlikely the test conditions have changed after it initially passed. That means the test code will probably not need changing.

Has the element moved? Update the element location Has the data changed? Update the data

Following concepts like "one test, one assert" will also mean your errors will likely tell you exactly what needs updating to fix your tests. Or better yet, what to raise a bug about ;)

3
  • Can you elaborate on how page objects make the test more data-driven?
    – user246
    Jun 4, 2015 at 16:24
  • In of itself no model Makes tests data-driven. It only offers methods of managing the data. What I suggest is the separation of elements and test data from the tests themselves. This will make things easier to scale (among other things)
    – ECiurleo
    Jun 5, 2015 at 9:15
  • I thought i may be useful to you (and others) to create a webdriver base project on GitHub, feel free to use it as a base for your project github.com/ECiurleo/webdriverBase
    – ECiurleo
    Jun 10, 2015 at 11:06

Not the answer you're looking for? Browse other questions tagged or ask your own question.