Thursday, November 8, 2018

Journey into SET: Creating Test Framework in Selenium

So, I'm still on my journey back into becoming a Software Test Engineer (expert) and geesh, there's a lot to catch up on.

Today, I'm looking into creating a Test Framework with Selenium.

I googled on "selenium creating test framework" to see results and learn.

Why?
First, let's answer why I'm researching this topic. I am able to create test scripts using Selenium and my test are passing. However, as I'm creating a test suite and adding more tests, I find myself using the same code for multiple @Test. I'd like to reduce the code, use wrappers around Selenium's code, and condense my @Test to be specific on focusing on the test case. This also helps with test script maintenance. For instance, if I need all of my test scripts to navigate to their corresponding page (add form -> New Form, edit form -> Form, etc). Then, I realize I need the User to click OK to a dialog just implemented before displaying any form. I don't want to have to check this code for each test script in each @Test.

YouTube(s) I watched.
https://www.youtube.com/watch?v=DO8KVe00kcU

Article(s) I read.
https://simpleprogrammer.com/creating-automated-testing-framework-selenium/
Not very useful, unless going to author's course.
https://www.testingexcellence.com/develop-test-automation-framework-scratch/
I like the breakdown on this author's GitHub and see it's practical use. So, I decided to implement this same framework.

Pattern Insights
Since I'm using the PageObject pattern, this was very helpful to know.
https://github.com/SeleniumHQ/selenium/wiki/PageFactory



No comments:

Post a Comment