Friday, May 16, 2014

Divide et impera - How to set up your Automation Framework

Let's look at a basic architecture example that you can use to create your Automation Framework.
If you look at this diagram here, looks fairly simple. But there're some very key things going on here.




The biggest thing that's happening is that your Test Scripts are depending on an Automation Framework and they're not depending directly on Selenium.

We are gonna have our Tests Scripts only depending on our Automation Framework that we are gonna create. And then the Automation Framework is gonna depend on Selenium.

Technically we could swap out the Selenium layer and replace it with a different type of Automation Tool besides Selenium. And just modify the connecting pieces from our Automation Framework and our Tests Scripts should still be able to run.



The goal of our Automation Framework is to support our Tests Scripts. You can also think about what concepts are related to this different layers here:

So, the Tests Scripts are gonna be focused on things like, pages in your applications, workflows. Things that are very domain specific to your application. It's actually going to share the same domain knowledge with your application.

At the Automation Framework layer we are gonna be focused on smaller pieces like the DOM (Document Object Model), things that exist in the browser. This is where we're going to be getting elements from the pages and we're going to be focused on how to manipulate pages and how to best navigate through the application.

Than at the Selenium layer we are at a very low level. It's focused on the actual HTML, the elements. It's parsing the pages. It's using the Browser API. It's at the very lowest level.

No comments:

Post a Comment