The blog detailed a problem that Iain had witnessed between two of the teams that he was working with regarding automated testing – There was a lack of communication between the two teams and this was down to the different models the teams were using to write their automation scripts…
The framework team’s automated scripts were aimed at automating “whole tests”, whereas the test team’s automation was aimed at “tasks”.
I can relate to both models that the teams were using as when I first started learning and attempting to build automated scripts, I had the mentality of the test team in Iain’s examples, while I was learning from people who were coming from the other angle…
I managed to have many conversations and positive debates around the purpose of the scripts too, which lead me down the path of investigating the benefits of “throwaway” automation scripts!
I must admit, I am a bit of an advocate for having throwaway scripts, as I see them as a very useful tool in a manual tester’s arsenal.
Basically, throwaway automation scripts are automation scripts that don’t primarily focus on finding bugs… They might not contain any assertions at all. Or they might, but the point is that assertions wont be the main purpose of the script.
The main purpose of a throwaway automation script is actually for “test set-up”, where they allow you to get to a point where you are ready to test a lot quicker – be it to quickly inject some test data on a system for you to be ready to start testing, or just to perform a set of prerequisite actions that need to be performed to get you to the point that you are ready to test.
I also think that this is where the usefulness of various “record and playback” tools might come in… As we all know, record and playback tools are hopeless for building an automated framework, where tests(/checks) are the main purpose of the scripts. But “record and playback” scripts are perfectly adequate for throwaway script scenarios, where you want to create a script quickly for a purpose of simply mimicking performing the actions.
What do you think? What perspective do you have when writing automated scripts?
And have you ever used throwaway automated scripts?