Cheers,
David
Today I want to talk about abstraction. Abstraction is a requirement to make testing maintainable and portable. Perhaps more importantly abstraction is critical to make test automation work, and to achieve a lights out regression system.
Abstraction is not a new term and from my research on the technology side has long been used in engineering teams. But now it is also firmly in the hands of test automation and regression teams. However we find that most feature tester and manual testers don't know what abstraction is. However this is one of the few concepts I have yet to find an analogy or even a comparison to something you do in everyday life.
Before I attempt to explain abstraction let me state the reason I bring this up is, I see the future of testers in all roles needing to know abstraction. Testing is changing and maturing as a career and the value and benefit to the company is being more widely recognized. That means more want to see testing and they want to see automation as a big contributor to raise quality, reduce time to market and control costs. So where abstraction was something applied at the end of testing assembly line, I see it moving upstream to the very beginning.
So here is abstraction. If I make a test case, and that test case requires a log-in into a software application I generally put that information into the test case. If I am functional tester this is fine, I test run the test case, uses my credentials and performs the test. What if I transfer that test case to another tester or put it into regression. I really don't want others to know my username and password. So I want to abstract that username and password. One common way to abstract is to create a reference file somewhere, where the test case can pull the data. Thus, now when I pass the test case I am not passing my credentials anymore, but the test case will still need to look for a file to run and if it is in regression, that team will need to create a file with another set of credentials. In this scenario we see that I protect my credentials but have created a dependency on a separate file. But let's look at a bigger benefit lets say I have 100 test cases that require an username and password, and I have abstracted them. Tomorrow IT tells me they are moving to a more robust password mechanism and my weak 6 letter password must be changed? Historically this means hours of waste time just changing a password in 100 test cases. But with abstraction I just need to change it once, yes just change it in the file and all those test cases that refer to that file are instantly updated. So there is a true benefit of abstraction for automation but also real value to the tester himself or herself .
Abstraction is the only way to make automation a reality without tremendously burdensome and constant maintenance for each and every test case. Abstraction is not new to automaton teams or regression teams and in the past is has been a very specialized skill because tools really didn't help those make abstraction easy. However technology has marched forward and tools are making abstraction easy, this can mean taking more coffee breaks for the automation teams, but what it really means is if you want to deliver the most value to the business , You need to accelerate testing and that means abstraction needs to happen when you first make the test case, this saves growing work downstream and means those who build and understand the test can build it right the first time. Besides, now you can keep your credentials private.