Selenium Factory Design Pattern For Parallel Test Executtion

Hello Friends,

I read the article http://toolsqa.com/selenium-webdriver/factory-design-principle-in-frameworks/ which is very informative. I am already using such design in my framework. But not sure on the modifications to this design make it suitable for “Parallel Test Execution” .  I did not find the follow-up articles as mentioned in the above article.  Can someone point me to the article or give idea on improving the design ?

I am also using TestNG and Java.

Thanks
Sudhi

Default Asked on April 12, 2016 in Selenium WebDriver.
Add Comment
  • 2 Answer(s)

    Hey jsudhi,

    Thanks for reading that article. Tell me what information do you need to understand the design. I can address the problem per question.

    Virender

    Professor Answered on April 12, 2016.
    Add Comment

    Hey  Virender,

    I want to use this DriverFactory for my project. But according to you this is not thread safe and will not work for  parallel tests.   I want to run my test in multi browsers and parallel as well please help me how to create such type of objects.

    Your Article

    http://toolsqa.com/selenium-webdriver/factory-design-principle-in-frameworks.

    • As you can see that this is not thread safe, it means that it will not be able to work on parallel test environments. A few modifications in this class and it will become capable of handling parallel requests. We will learn about it in  coming articles on design principles in test frameworks.

     

    Thanks
    Sukhjinder Singh

    Default Answered on April 25, 2016.
    Add Comment
  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.