Contributions
Re: TestComplete 14 name mapping missing after conversion
brohrbacherwrote: Has there been a resolution to this issue? I am also having the same problem. Still trying to get to the bottom of this with support. I created a brand new project, but it's still having issues with mapping objects. The app i'm testing is VB6 (yes I know it's old a rewrite is coming eventually) brohrbacherwhat framework is the app you're testing based on?3.6KViews0likes3CommentsRe: TestComplete 14 name mapping missing after conversion
Having a back and forth with Support, they want my entire project sent over which is just not feesible (code and DB connections for financial systems) I've restored from source control numerous times and still have the same issue. Next attempt will be to create a new project and see if I can map the same object. However if as suggested the mapping file is corrupted on update then that counts out using TC14 untill they fix the problem.3.6KViews1like1CommentTestComplete 14 name mapping missing after conversion
I have just installed TC14 and converted a (backup) project, however the name mapping is missing. Objects that were previously mapped are now blank. This is a huge setback if I have to remap hundreds if not thousands of objects again, especially as these are specifically referenced in my scripts. Has any one else encountered this problem?3.9KViews0likes10CommentsRe: Execute test in random order
As has been mentioned it's not good practice to randomise the running order of a suite of tests but It's possible if you don't mind getting dirty with some scripting. Create a script that that adds each test to an array along with a number. You can then pick a random number reads the test from that array and executes that test. If you only want to call a test once make sure to add a flag column to the array to show that it has been run, and ignore those rows, you could delete the row in the array if it's strait forward in your scripting language of choice which in my case (vbscript) it's not. You'll need to know how to call scripts from another script. The drawback to this arraymethod though, is that you will not have each case displayed individually in the log tree, but you can get around this by writing the script calls to the log with Log.Message. Hope this points you in the right direction.1.4KViews0likes0CommentsRe: Test Complete Object Mapping different with different executions
You'll need to use an If Not for the first statement i.e. If Not Sys.Process("msiexec", 2).Form("product*").Exists Then Set qvProcess = Sys.Process("msiexec").Form("product*") ElseIf Sys.Process("msiexec", 2).Form("product*").Exists Then Set qvProcess = Sys.Process("msiexec", 2).Form("product*") End If Might have to tweak it a little but the If Not is important so it doesn't get caught in the error.1.8KViews0likes0CommentsRe: FindChild taking a long time TC12
tristaanogrewrote: I would not use the "Name" property of an object to find the object. Basically, if you're looking for something via the Name, TestComplete just goes ahead and bypasses all find functionality and attempts to search using the Name as per the Object Browser. I'd recommend enhancing your function to actually take in the arrays of properties and values instead of just "name" to get more specific and targeted searches. PropNames = Array("Name", "Index", "Visible") 'All values present PropValues = Array(VBobj, Idx, True) Set P = (Parent) I almost always use Name (Partial of the vbobject name), Parent and Index. The VBObject name of the child has to be partial as at compile the object name is often suffixed with a number, for example the Object is called CtlBox becomes CtlBox_12 but the index stays the same.... that is unless a dev ads a new control further up in the pecking order and the controls are re-indexed but that's a very quick change in my script code to fix it. I can't use WndCaptionin a lot of situations as most have been written as custom controls in containers due to exceeding the control limit of VB6 and don't have a WndCaption. WndClass is shared by lots of objects and some may have the same index across the whole screen but unique within their own containers. I'm starting to think thatI should resign myself tothe long object searches. Although to toot my own horn, I do manage to run around 160Units covering 21 tests inroughly 40 minutes compared tomy predecessor whom manged 5 scripts covering 1 test in over an hour.1KViews0likes1CommentFindChild taking a long time TC12
The software I am testing is written in VB6 and has the issue whereby the object names can change every time it is compiled making mapping impossible. To get around this I use the the FindChild method to find the objects every timeI need to call them (yes it's tedious) I came up with the following function (VBScript), I also included a timer for debugging which I comment out when not developing. Function Find_ChildObj(VBobj, Idx, Parent, DepthVal) Dim StartTime, EndTime, Elapsed If DepthVal >= 0 then Depth = DepthVal Elseif isNull (DepthVal) Then Depth = 4 End If StartTime = aqDateTime.Time If isNull (Idx) and isNull (Parent) Then 'When Index and Parent are Null PropNames = Array("Name", "Visible") PropValues = Array(VBobj,True) Set P = Sys.WaitProcess("Base App Name") Set child = p.FindChild(PropNames, PropValues, Depth, True) 'Log.Message("Idx and Parent parameters Null") ElseIf isNull (Idx) Then 'When Index is Null PropNames = Array("Name", "Visible") PropValues = Array(VBobj, True) Set P = (Parent) Set child = p.FindChild(PropNames, PropValues, Depth, True) 'Log.Message("Idx Parameter Null") ElseIf isNull (Parent) Then 'When Caption is Null PropNames = Array("Name", "Index", "Visible") PropValues = Array(VBobj, Idx, True) Set P = Sys.WaitProcess("Base App Name") Set child = p.FindChild(PropNames, PropValues, Depth, True) 'Log.Message("Parent Parameter Null") Else PropNames = Array("Name", "Index", "Visible") 'All values present PropValues = Array(VBobj, Idx, True) Set P = (Parent) Set child = p.FindChild(PropNames, PropValues, Depth, True) 'Log.Message("No Null parameters") End IF EndTime = aqDateTime.Time Elapsed = aqDateTime.TimeInterval(StartTime, EndTime) Parent = CStr(P.FullName) If Not child.Exists then log.Error "Unable to locate child obj of " & Parent, "", pmNormal, LogStyle ("TestFail") GeneralEvents_OnLogError Else Set Find_ChildObj = eval(child.FullName) CName = child.FullName log.message(Elapsed &" to find " &CName) End If End Function This is called in each script with the following Set ChildObj = Find_ChildObj ("*Partial of Child Name*", ChildIndexNumber, ParentObjectName, Depth) I can cascade this, so I can find the Parent and then the child so the ChildObj becomes the ParentObjectName in the next call, which makes finding some objects a lot quicker. What I am finding is that in one case an object can be found quickly but in the very next test, called in exactly the same way from on the same screen of the app in test, It can take a very long time to find the object sometimes sometimes a minute or minute and a half. If I take the Depth down to 1 making sure the parent object is included in the call, it can help but then this can throw up another bizarre situation where even though the child is with in depth 1 the child object cannot be found at all and if I increase the depth to 2 it is found but takes a long time again.If I try to store the object then I sometimes have the error that the object does not exist. Generally the function and call works fine and objects are found within a couple of seconds if not milliseconds. Can any one shed some light as to why I am seeing inconsistent performance and success in the call. Btw feel free to use the function if it's of any help. Many thanks1KViews0likes3CommentsRe: Unable to remove a column from a Table variable
Marsha_Rwrote: Is CC actually = 6 after you set it to column count? Just curious, why bother to clear the table and recreate? Tables are free, just create a new one for each test. 6 is the column count the max column index would be 5. I need to use the table over a couple of different scripts. Creating it in the script i'd lose the values when the script ends. tristaanogrewrote: When you remove a column, the column count reduces.... so, when you remove column index 0, now the max number of columns is down to 5.... when you remove 1, it's now 4, when you remove column 2, it's now 3... so, when you remove column 3... well, there are only columns 0, 1, and 2 any more... so column 3 is out of bounds. What I would do, actually, is completely remove the variable and recreate it rather than add/remove columns. There is a ProjectSuite.Variables.RemoveVariable method that will remove the variable... wrap it in logic to check "If variable exists, remove it" and then ProjectSuite.Variables.AddVariable to add it back in. The alternative option is to run your for loop as a "down to"... stepping down from max to 0. Thanks, this gave me a nudge in the right direction, this works For Col = CC-1 to 0 step -1 It's weird though that the standard "For x = 0 to n" works fine elsewhere though.1.8KViews0likes1Comment