| || |
Limitations of RunTestEx()
Unfortunately I don't have a copy of the 'QuickTest Professional Advanced Features User's Guide', as I am currently using the evaluation of QTP9.1 w/ .NET addin.
As I mentioned in an earlier post, I am currently evaluating QTP9.1 against my companies software suite (only 11 days left of useage before I give my boss the final verdict!) The application consists of several modules launched through a Windows XP Toolbar. The mix is roughly 80%:20% Delphi:C#, however at one point was entirely Delphi hence our Automation consists of a huge, unmaintained mess of TSL, that I had the pleasure of 'receiving' upon starting with the company.
I have decided to create an example framework where the general purpose scripts are replicated in QTP, and the parts that are Delphi specific are implemented using stripped down versions of the original TSL.
Over the coming months, years(?) we plan to move entirely to .NET, however it is essential that we are able to fully automate the hybrid beast that will exist between now and then.
I'm having a little trouble with the integration (as predicted by Mr Howarth in reply to my last thread). I feel that creating this new post is justified depsite having posted a more general one earlier today, as this is zooming down on one particular aspect of my plight. Also, I did hint at the same question in my last post however it was beginning to become off topic.
I am interested specifically in the RunTestEx() function. the CHM included with QTP assures that it can be used to run scripts written in WR with ver > 7.09.
My experience is, that the script is being opened in WR, however not run.
To simplify things I've created a 'hello world' style TSL script using the pause() command. (Code Snippet would be o/t so not posting in a QTP forum - it is also entirely trivial!).
I'm using RunTestEx() with run minimised / close after finish set to false and no additional parameters, however the rsult is the same.
I investigated wrapping the code in a function and trying RunFuncEx() and found that it is limited to Compiled functions, which in turn limits the possible functionality of what the called TSL can actually do!
Would it be possible for someone to enlighten me (again, I don't have the Advanced Features Manual) as to what TSL functionality can be achievd when calling the scripts from QTP?
The sort of thing I'd like would to do are some recorded button clicks on the app, generation of user input menus and other feaures of TSL or even using a Pause() as per my 'Hello World' example!
If these tasks are available in WR via QTP, why are my TSL scripts not runnning at all. (again they are going opened by the app, just not run.
Many thatnks in advance for any takers. I am enjoying my experience with QTP so far - I'm pretty handy when it comes to WR, however Just new to Quicktest so apologies for all of the questions.
Re: Limitations of RunTestEx()
This is exactly the type of information you should post.
I do not have your environment, so can't provide any suggestions, but you did get a related post to your first thread:
The one other thing you might do is post the line of code where you are making the call to RunTestEx(). Hopefully someone who is calling WR scripts from QTP using this method will spot some shortcoming in the syntax.
Wish I could be more helpful, as this type of "should work, but doesn't" problem is so frustrating.
Re: Limitations of RunTestEx()
My QTP test has been stripped down to a single line:
TSLTest.RunTestEx "q:\inprogress\modules\selector", False, False, ""
My fourth parameter of [""] there was put in as the Step Generator claims that it's a mandatory arguement (curiously the CHM states the converse!). I have tried runs with it present and with it removed manually from Expert View and there are no syntax complaints either way.
The WR script in the location was originally the entry point to out main automation framework and set up some enviroment variables, loaded in some DLLs then presents the user with a WR selection menu. (a handy function I've yet to find in QTP - only seems to be text entry forms - not exhausted my search on this yet so this is just an aside...).
To remove any doubt, I've replaced the 'selector' WR script with a single line:
Which works fine in WR.
I've has a look at the related post there - will certainly keep it for future reference as I will eventually be needing to send parameters to WR scripts and will undoubtably have the same problem!
However for now my aim is to get a trivial QTP test to call a trivial WR script to 'make something happen', as I feel that this would be ample justification for the company to invest in the product. (which incidentally costs more than it does to pay me for a year!)
Thanks for the further assistance Terry. It is definitely one of those frustrating ones - especially as the QA team is so small here, the manager being away, and our support desk having issues with client rollouts that need investigation! (our QA team wear several hats here)