Blog

UI Testing Excellence (Hiccupps)

On June 12, 2015, in Syndicated, by Association for Software Testing
0

So I had a character picker to test across three releases, call them A, B and C.

Between A and B new characters had been added and there was a requirement that a certain range of the Latin-1 character set must be fully-populated by these additions. Between B and C there should be no differences.

Putting functional testing of the component aside, I wondered how I could efficiently compare two versions of a graphical interface component (a) for the characters on their labels and (b) for the codes of the characters represented by them. And then do it again for another pair of versions.

On a hunch, I tried selecting all of the characters in the component from release A and copy-pasting them into Excel. A little inspection convinced me that the characters had been copied reliably. So I did the same for release B. And then I simply used Excel to compare cell values for corresponding cells for the two releases. Something as naive as this does the trick, showing y where they are the same and n where not:

=IF(K3=B3,”y”,”n”)

And then I wondered if I could extract the underlying character codes using the CODE function. For the characters I needed to care about in this work, I could do it trivially:

=CODE(B3)

Again, inspections convinced me that the codes were the ones I was expecting where I needed them and so I extracted the codes and diffed them with the same kind of comparison. The patterns of y and n was the same in both cases. (In fact, I used a little conditional formatting to make this very easy as you can see in the screenshot at the top which shows a simplified version of the work.)

Then, for each number in the required range, I used a conditional count like this to check that the value occurred only once in the set of codes:

=IF(COUNTIF($B$26:$I$46,B50)=1,”y”,”n”)

And then it was easy again to eyeball for the differences I wanted.  Better yet, to do the second comparison all I needed to do was copy paste C’s picker characters over the top of A’s and reinspect the differences.

We might regard this work as automation. Or not. For me, for practical purposes, it doesn’t matter so much: I tried a tool and on this occasion it gave me the value I wanted almost immediately. It’s not always like that. It also wasn’t the only tool I used in this work; for example, I inspected code changes and differences across the releases using Mercurial too. This helped confirm that my Excel approach to codes was a reasonable one.

 

Comments are closed.


Looking for something?

Use the form below to search the site:


Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!