Showing posts with label automated testing. Show all posts
Showing posts with label automated testing. Show all posts

July 1, 2008

TestNet Voorjaars Event

Yesterday was the day of the TestNet Voorjaars Event. TestNet is the national Dutch organization for testers. There were some great presentations and off course the warm bath experience of seeing lots of old collegues. That is one advantage of being Dutch: The test community is not very large in numbers. TestNet has around 1200 members, while the test community is as large of 6000 professional testers.

The theme was TestTooling, so I fitted well. Actually, I was invited to do a presentation, which I did with Marc Koper, a collegue of mine.

If you are interested in the presentations (some real good ones included), you can find them at the TestNet Library Page. However, most of them are in Dutch.
If you are especially interested in our presentation, it is called "A tool with a fool is only a tool". It is an introduction in how you can set op test automation (Performance and Test execution) in a test organisation with lots of tips and tricks. Well, for the best tips and tricks, you should have been there, but later this month, I will put some of them on my blog.

Update: The abstract of our presentation

June 6, 2008

QTP and the curse of the interview questions

Quick Test Professional is getting popular. It wins easily from good-old-and-soon-to-be-disposed WinRunner. Because QTP is relatively new, all over the internet the knowledge bases are still building up. That is good thing. Not a good thing in my opinion is the way people are trying to get a job. Just do a search on “QTP interview question” or better “QTP interview answers” and see for yourself; there seems to be a large market for publishing answers on interview questions. And this is something that scares me.

When a project wants to start automating their tests, it is automatically a shift in the test process. Testers have to be stricter in defining and formatting their data, business analysts do have to make clear requirements and the development team has to cope with standards. None of them is a bad thing, unless you don’t want to improve your test and development process of course.

Most of the time there is no automated test available yet and the project is searching for a specialist who can design and implement the automated test. When the decision for test automation is made, the business puts lots of assets on the automated tests that have to be developed. Besides the significant costs, the assets also include the change and implementation of the architecture, test framework, risk model, the fitting on the manual tests and the test process.

And then, the interviews. The interviews with potential test automation specialists are most of the time performed by test managers, project leads and colleague testers, none of them very experienced in test automation. The most technical guy of them probably had played with the test automation software a bit, and he is the likely one to ask some technical questions.

But how can you make a difference between candidate A and candidate B if the answers to those questions can be learned by head? Or even worse, what if you only have candidates that have their knowledge from the internet? You pick the best one and you are satisfied with that, but it is like choosing between a blind carpenter and one without hands.

Right now, there are more people who like to work with WinRunner than to actually learn it. Soon enough, QTP will end up with the same statistics. That is not a good sign for the automated test business in general. Inexperienced people on projects claiming the contrary might result in failures. Project managers don’t like failures and when test automation gets associated with failure, you'll get a hard time convincing them of the opposite.

Certification is a hot topic right now. I am not a big proponent of pointlessly requiring a certificate for every tool you want to use. On the other site, it sifts the wheat from the chaff at forehand and it gives an instrument to projects, inexperienced with test automation, letting them easily select the experts from an applicant pool.

June 5, 2008

Real Regular Expressions in WinRunner


Automated testing without regular expressions is almost unthinkable nowadays. But there was a time, almost nobody knew what regex's were. Only a handful of developers and they were all working on Unix.

WinRunner started with support of regex's years ago, because it seemed to be handy for testers. Unfortunately they did it only with their own set of limited meta characters. You can use the . for any character, the * for zero to unlimited of the previous character, the square brackets [ ] for ranges or included characters and that was it.
Probably they thought that the full set of regular expression characters was overkill for non technical users like testers, and they could not know that regular expressions would become so regular.

I presume that for compatibility purposes Mercury never upgraded their set of regular expressions, but it is a real handicap when you are deep into the test automation.

After a bit of searching, I found this site on the internet: Misha's regex. Misha did a great job, porting C++ regular expressions to a dynamic library that can be loaded into WinRunner. Also, he provides some WinRunner functions to give you a kick start when you want to work with it.

As far as I know, this is the only ready to use solution for WinRunner to implement full regular expressions. And even better, you can now use "label_like" and "id_like" as attributes in object recognition.

The only thing I did was writing to simple functions to do a simple match:

public function re_match_simple(in orig_str, in pattern) {

    auto outPos, outLen, outDetail;


    return re_match(orig_str, pattern, outPos, outLen, outDetail);
}

public function re_search_simple(in orig_str, in pattern) {

    auto outPos, outLen, outDetail;

    if (re_search(orig_str, pattern, outPos, outLen, outDetail))
        return outPos+1;    # +1, otherwise 0 (=FALSE) will be returned if found on first position

    return FALSE;
}

This allows me to do quick checks like

if (!re_match_simple(outDate, "^\d{1,2}-[JFMASOND][aepuco][nbrylgptvc]-(19|20)\d\d$")
    myReport("Date format for '"outDate"' is not according standard: dd-Mmm-yyyy", eCHECK);

or

customerId = substr(fullText, re_search_simple(fullText, "\d{8}"), 8);

Even the test analists are working with regular expressions. (on that particular project we worked with separated roles: testautomation and testanalysis). The only thing they had to do was flag a string with an exclamation mark (!) in front and it was checked as an regular expression. The exlamation mark for obvious reasons.

June 3, 2008

My Top 5 Ultimate Utilities for Testing


This is my list of top 5 utilities I use for (automated) testing. I use them as helper programs in the (automated) test process, so this is not a list stating automated test tools, bug loggers etc. Every header is a link to the location where you can find the application.



5. API Viewer
View all useable functions and constants from all common Window API's and auto generate C/VB code for it.

4. Pycron

Your own cron tab under Windows, with GUI for editing events. You can run this as command line or as service. Stable, small and can run stand alone.

3. Notepad++ Portable
A notepad with many options. Simular to text editors as ultraedit except this one is free and can run stand alone (if you choose the portable version).

2. Synergy
Very useful when having multiple PCs with multiple monitors, but when you only want to use 1 keyboard/mouse combination. Mouse movement works just as you would expect from a dual/triple monitor setup, only you cannot drag your windows to the other screen (because it is a physical other machine). However the application manages to get copy pasting of text working most of the time.

1. Gadwin Printscreen
A customizable screen dump tool with one major advantage above lots of others: It can be called by the Command line. This gives it a great usage during automated testing.
Contains all features you'll expect in an ultimate tool: jpg, png, bmp and gif formats, custom filename, incremential filename, silence mode etc.
This application works stand alone (once unpacked, there is no installation needed on specific workstations, just run the executable).