Forum Discussion
Robert, thanks for your interest.
All 1000 of my tests were recorded from beginning to end with little or no editing after recording. NONE of my record-time extensions can be replaced by design-time actions.
11 of the 14 extensions are custom checkpoints which obviously have to be invoked at run time.
Some of these have to call "helper APIs" to access and control 3rd-party widgets not fully supported by TC, such as the Developer Express TreeList object. In fact, this work-around of creating a helper API was given to me by SmartBear support because they said providing complete support would have been too much work.
One of my extensions re-implements the TC record feature we lost (IIRC) with Windows 8.x where TC no longer replaces file selector navigation and clicking the "Open" button with a single call to "dlgOpenLogFile OpenFile". That was another feature the TC documentation was quite proud of.
Without record-time support we're going to have to stick with v12.20. Eventually, as you can imagine, the product will stop working properly with new versions of Windows and we will lose the large investment we've made going down this road with TestComplete.
Perhaps if you show us an example of your script extensions, we can find another solution for you.
- rickm8 years agoContributor
Marsha,
I don't think you'd be able to tell what I'm doing or especially why by looking at the code any better thant I can explain.
The extensions are mainly of two types:
1) convenience checkpoints
With 2 mouse clicks I create a custom checkpoint of all the widgets in a dialog. Edit widgets, radioButtons, checkBoxes, comboBoxes (both the selection and the entire list contents), tables, buttons. For all of these, sometimes I even capture the state (enabled/disabled) and the label caption if it's one that changes dynamically (EG a button might say "Create" or "Update" depending on the program state). Note that sometimes I call an API that gives the entire contents of a table, not just what is in the visible rows at the time.
2) unsupported widgets
Developer Express, compiled by C++Builder, is not fully supported and my request to enhance it was denied almost 6 years ago. We had to add an API to our program that I call from record-time extensions that set or ask for the state and contents of widgets that TC cannot see individually. The code added to the Keyword Test by the runtime extension calls the API and both sets values and gets values for these widgets to compare with what was previously recorded.
Both of the above must be done at record time to capture the state at the moment. Stopping the recording and calling extensions that generate code that is added to the Keyword Test might work, if it's even supported which I don't know, but I do know from experience that the disruption to one's train of thought of starting and stopping recording is unbearable during a complicated or long scenario.
Does this give you any ideas?
From September, 2011:
Hi Rick, We have investigated the problem and found that we cannot resolve it in a reasonable period of time as it requires too significant changes to the debug information reading functionality. The problem concerns only applications compiled with C++Builder. So, unfortunately, both the Expand action and the Table checkpoint will not work for this control in your case and you will have to work with the control without using this functionality. The most convenient solution I see at the moment is to ask the application developers to implement a helper class within the tested application that will perform needed actions with the tree list control. This class should have methods that will expand the specific needed node and get a value of the specified cell of the control. You can create an instance of this object and assign it to a public property of the application main form. Get the instance of the object from your TestComplete test using this property and call its methods passing a reference to the tree list controls and the needed parameters. Best regards, David
- Marsha_R8 years agoChampion Level 3
Hi rickm
Just an fyi, most of us here don't work for Smartbear and have all probably hit a wall with something that's been changed or taken away or not fixed like we'd like. We're happy to help if we can.
for this:
Both of the above must be done at record time to capture the state at the moment. Stopping the recording and calling extensions that generate code that is added to the Keyword Test might work, if it's even supported which I don't know, but I do know from experience that the disruption to one's train of thought of starting and stopping recording is unbearable during a complicated or long scenario.
I see a couple of choices here.
One is the one you said you don't want to do, which is starting and stopping a recording. If you did want to try it, you can stop where the checkpoint belongs, add it manually, then use Append to go on in your scenario.
A way without stopping would be to just click somewhere off to the side or do some other neutral action to make a place holder for your checkpoint, then continue with the rest of the test. When you've finished recording, then you can go back and swap the place holder for the checkpoint manually.
- rickm8 years agoContributor
Hi Marsha_R,
First, sincere apologies if my panic and annoyance crept into my posts and if it seemed directed towards you and the other volunteers. Not at all! I very much appreciate your (plural) time and effort here.
Going from 2 or 3 mouse clicks to the alternative options as I understand them will be unacceptable. I'm hoping they'll bring back record-time extensions like they did Manual Checkpoints a few years ago (or is that gone from 12.3 again?). I have countless tests with easily a dozen record-time script extension calls. Replacing a couple of mouse clicks with the alternative would easily more than double the effort to create a test. I'd have to mark all locations for later addition (see below), then set breakpoints in the test, start it running, and at each breakpoint I'd have to stop playback, do whatever is required as described below, and start playback again. I just can't imagine that. I'm sure we'd elect not to do it and stop using TC to create new tests.
Our original TC evaluation back in 2011 was extended a few times until we implemented a program helper API and proved that calling it from record-time script extensions gave a reasonable tool and process. Only then did we purchase TestComplete. It's a bit of a pain, but it's reasonable, and I've lived with it for over 5 years.
Your two choices "stop, insert, append" or "mark place, insert later" both rely on the same action of adding steps directly into the Keyword Test after or between recording segments. I should at least verify that the functionality required is actually there.
I've only used record-time extensions. To replace these with manual insertion after recording, I'd have to have:
An equivalent to Recorder.AddSyntaxToScript(syntax) which would insert a Keyword Test command (usually a script execution or object method call) from my script at the currently highlighted position in the test editor. I only see this method with the Recorder object.
Do this feature exist?
If there is no way to AddSyntaxToScript, then what? I'd have to write text to a file that I'd then open and copy/paste into the Keyword Test editor wizards as arguments to script and object calls?
My extensions are in functions called "RecordExecute()". My guess is I could call it by that name but how do you call it while staring at the Keyword Test editor? I did a test by running it unchanged from the TC Workspace script editor. It ran and showed my UserForm which worked but then of course failed at the point where I try to generate Syntax.
I may have described many of my tests as long and complicated, but it's more accurate to say that they can be long and tedious and sometimes repetitive with slight variations as the recording proceeds. It's easy to lose my place and screw up the test if I'm interrupted. The "stop, insert, append" idea would make this even harder. When done non-stop I'm usually successful but with interruptions I'd have to write out all the steps and tick them off as I go. You can see how the full procedure involved in replacing my 2 or 3 mouse clicks grows and grows.
BTW, a good way to mark a place without stopping a recording is the "Comment" button on the recording toolbar, assuming they haven't removed it from 12.3 too. It's handy to add an easy-to-find-later comment. For example, "Oops, did I forget to make a Region Checkpoint a few steps back?".
Related Content
Recent Discussions
- 7 hours agoSubhraDas
- 21 hours agoJacobjacob44