| || |
Recording vs writing script directly
I thought the recent "DP vs OR" thread was interesting so I'd be interested in people's opinions on a similar question.
When you are creating a new test in QTP (any version), do you use the recording function, or do you just write the script directly without recording, or a mix?
For the purpose of the discussion, I'll ignore any object recognition / storage hangups.
Personally, I use a mix- as we know, there aren't many absolute rules in QTP so I adjust my approach depending on the situation (actually, I'm kind of presuming that's what everyone does).
I think generally, it's more likely that I'd use the recording function the more complex the test is- which sounds counter-intuitive, but that enables me to see the overall flow of a process before I start chopping-and-changing the test around. If it's a simple test, say just using a single screen of an app or a few fields or whatever, I find it quicker to write the few lines of code that are required (again that assumes that I already know about the objects on the screen etc). Also, if there is a specific set of design guidelines or framework in use, that affects the choice too.
Be interested to hear other people's thoughts. [img]/images/graemlins/smile.gif[/img]
Re: Recording vs writing script directly
Those are not the only choices.
How about a true script-less process. A well made framework can remove the need to produce old school coded scripts either recorded or developed.
I know there are a few players out there going down this path. Coding or recording scripts will be history in the future. AXE from Odin is a commercial example of a framework that can generate a script but even this approach of creating a script asset isn't required. A few frameworks I have seen are interpretive. They take the inputs and generate and run code in memory. This is the future.