Road Map and Future State
It is very easy to get lost into the maze of technologies once we get into the weeds of implementation. So I am going to take a pause here and first define the road map and future state, so that I can pivot myself during implementation to stay aligned with the road map. If I deviate too much, I will re-consider if the road map and future state needs to be revised.
So I need to take a concrete example or workflow and model that while building an automation framework. Below are the some considerations I will keep in mind while we design the framework and it is followed by a workflow example.
- I should be able to specify test data i.e. my data file that contains test data at execution time.
- I should be able to switch environments at execution time (dev, qa, pre-prod and so on) i.e. I should have configuration settings to specify which application environment to use.
- Which browser ? – specify at execution time
- Model the web pages in code to align with readability, maintainability etc.
- Handle synchronous and asynchronous behavior – This is a tough one as asynchronous behavior is dependent on too many things.
- Where to execute – Execute locally (on my box) or cloud (Sauce Labs for example)
- Sequential or Parallel
- Facility to provide optional settings at execution/run time
Nice to have:
- Automated way to detect bad code aka. technical debt
- Code coverage tools
- Bar charts, pie-charts and user-specified charts [on CI server]
- Integration with Java World [yes this is possible via jRuby]
Both the above list i.e. “must have” and “nice to have” will keep growing in time as Automation is an ongoing effort and new situations will reveal new capabilities to add. That said, lets define a concrete workflow on the web application, that we want to model within our framework.
The below are the steps I want to perform on http://automationpractice.com website. This is an e-commerce website and I would like to complete the shopping cart workflow as it touches many pages in the workflow.
- Hit the website
- Click ‘Sign in’, enter credentials and login
- Hover on top menu and select Women – Summer Dresses
- On the product listing page, select the “Printed Summer dress” and add to cart and proceed to checkout
- On the checkout page, complete each of
- Sign In
- On the final page, verify that you were able to successfully purchase
As we can see, we touch many web pages on this workflow and we have to perform actions as we move across pages. So how do we model this entire workflow. This is what we would be going step-by-step by talking about how each “type” of framework contributes to a certain capability, thereby modeling the “state and behavior” of the web application. Pardon my scribbling, I will post a more aesthetic picture in the future when I have more time, for now, I believe it is legible. Please click on the image to get a full view.