Automated Software Testing is Software Development

Unfortunately, few specialists in test automation understand it. Unwillingness to take the right architecture decisions causes that maintenance the test scripts become incredibly expensive and sometimes even impossible. The most common mistake when writing test scripts is “copy-paste” – David Parnas says that if you use copy and paste while you’re coding, you’re probably committing a design error. Instead of copying code, move it into its own routine. Future modifications will be easier because you will need to modify the code in only one location. The code will be more reliable because you will have only one place in which to be sure that the code is correct.

Copy and paste is bad practice for developers but it is much worse for QA Automation Developers.

Imagine, I wrote 1000 tests, which have the same operation/check , for example:

@Test
public void test1() {
… some code …

window.button(“startButtonName”).click();
window.label(“thankYouLabelName”).requireText(“Thank you”);

… some code …
}

 

And in other 999 tests I have to click the same startButton according to the life cycle of virtual user. If one day the developer decides to change the name of the button or returning string, I will have to change the code in 1000 places. I gave an example of the simplest effects of copy-pasting in QA Automation Test Development. And professional in test automation organizes everything in the way, that the code is changed in only one place.

One of the most efficient way of such organization are design patterns. We are confident that the expert in test automation should not only know design patterns shown below, but also actively use them in the tests’ development and testing frameworks.

Design Patterns: Factory , Singleton , Builder , Prototype , Adapter , Composite , Bridge , Filter , Facade, Proxy, Observer, MVC, Data Access Object, Template, Null Object, Strategy etc..

Test code, based on patterns, is the most stable to code changes in the developers’ code, it gives much more opportunities for qa automation developer to add new tests. Even if you start from the simple automated tests sooner or later you will come to idea, that you need not only a number of automated tests, but the framework, which will give you all the opportunities to make you application reliable.

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>