Thursday, June 8, 2017

But is it Automation?


Recently, I needed to quickly explore an aspect of the behaviour of an application that takes a couple of text file inputs and produces standard output.

To get a feel for the task I set up one console with an editor open on two files (1.txt and 2.txt) and another console in which I ran the application this way:
$ more 1.txt; more 2.txt; diff -b 1.txt 2.txt
a b c d e f
a b c
d e f
1c1,2
< a b c d e f
---
> a b c
> d e f

$ more 1.txt; more 2.txt; diff -b 1.txt 2.txt
a b c d e f
a b c  d e f

$ more 1.txt; more 2.txt; diff -b 1.txt 2.txt
a b c d e f
a b cd e f
1c1
< a b c d e f
---
> a b cd e f
As you can see I have a single command line that dumps both the inputs and the outputs. (And diff was not the actual application I was testing!)

After each run I changed some aspect of the inputs in the first console, pressed up and enter in the second console.

What am I achieving here? I have a simple runner and record of my experiments and an easy visual comparison across the whole set. It's quick to set up and in each iteration I'm in the experiment rather than the infrastructure of the experiment.

I could have, for example, created a ton of files and run them in some kind of scripted harness or laboriously by hand. But I was short of time and I wanted to spend the time I had on exploring - on responding to what I'd observed - and not on managing data or investing in stuff I wasn't sure would be valuable yet.

I still hear and see too much about manual and automated testing for my comfort. Is what I did here manual testing? Is it automation? Could a "manual tester" really not get their head around something like this? Could an "automation tester" really not stoop so low as to use something this unsophisticated?

Bottom line for me: there's a tool that is at my disposal to serve my needs at appropriate cost, with appropriate trade-offs, and in appropriate situations. Why wouldn't I use it?
Image: https://flic.kr/p/7VhPft
Syntax highlighting: http://markup.su/highlighter

2 comments:

  1. Nope, you did the appropriate thing for your situation and needs. You used a tool to aid you in your work. Which is what "automation" is supposed to, help YOU do your work. I agree with you on your points, and I'm an "Automation Guy". I too have seen too much emphasis upon "automation" and not on proper tool usage. There are times when it just doesn't make sense (time and money) to go the whole nine yards with automation. People tend to over emphasize and engineer the solution when all they had to do was use the KISS principle.

    Regards,

    Jim Hazen

    ReplyDelete
  2. Of -course- this is automation. But it points to a false assumption that automation has to be big, complex, test-related, programmer-centric. Not true.

    I've heard of the type you're writing about, called "microautomation". Very helpful for testers. Gave a presentation on it at my client here, and also wrote a blog post about it too: https://testzius.wordpress.com/2016/12/28/microautomation-with-autohotkey/

    ReplyDelete