Forum Discussion

Sergey_Kashin's avatar
Sergey_Kashin
New Contributor
10 years ago

TestComplete doesn't see some properties of an object in special cases (delphi application)

Hello!

I have several cases when TestComplete Debug Info agent returns results that looks inconsistent.


Case Description:
1. TestComplete cannot get property defined by index and Get... method:
property prop1: integer index 1 read GetProp1;
- reproduced with both 32bit and 64bit application

2a. We found several cases when TestComplete cannot get some properties of inherited class in 64bit application, not sure if we found necessary and sufficient conditions but it is simple and reproducible; there are steps:
a. property should be defined by Get... method ("property prop1: integer read GetProp1;");
b. the class has a class constructor;
c. heir of the class has any public method or protected virtual method.

2b. In 32bit application properties are visible but their values are inaccessible ("Error: Unspecified error" is shown) in case:
a. property's class has a class constructor;
b. heir of the class has any public or protected method.

In attached file you can find a sample project that can be used to reproduce the issue.
TClassA has a class constructor and 3 properties (defined by field, Get... and Get...+index);
TClassA1, TClassA2, TClassA3 - 3 heirs of TClassA that have public, protected and protected+virtual methods;
3 properties (of TClassA1, TClassA2 and TClassA3) are created on FormCreate event.
If you check theese properties using TestComplete's Spy tool you'll find that inherited properties are not visible as described above.
TestComplete version 10.0.531.7 and
Embarcadero RAD Studio XE3 Version 17.0.4723.55752 are used.

I've raised the issue to SmartBear support (Case #00043957) and it was closed with advice to check limitations of Debug Info agent here: http://support.smartbear.com/viewarticle/56863/#Delphi


I've checked it:
1) We don't use default properties;
2) We use Embarcadero Delphi XE3; and the issue was found with object that has more than one method;
3) We don't use EurekaLog.

So, at the moment I have no answer what functionality is unsupported and not sure that there are no bugs here.

Best Regards
Sergei

6 Replies

  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)
    Hi Sergei,

     


    I would suggest that you reopen the Support ticket as some investigation is required here. 


     


    So far, please make sure that TestComplete's Object Browser is set up properly and you can see all available properties - you should use the Advanced View mode, and showing hidden properties is allowed in TestComplete. Please refer to the "Basic and Advanced View Modes" article for details.

  • Hi Tanya



    Thank you for your reply.

    I always use Advanced View mode.

    Also, delphi project is configured according to the article http://support.smartbear.com/viewarticle/62648/ - debug information is visible.

    I was playing a lot with my test application and with sample project that is attached to the issue - properties are not always invisible, sometimes it is shown correctly (depends on class's methods - as described), that's why I think that is not a problem of configuring of (TestComplete)project / Object browser etc.
  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)
    Hi Sergei,

     


    I do not have Delphi installed on my computer. Could you please compile the sample application and post the executable file here (in the archive)?


     

  • petya's avatar
    petya
    New Contributor
    Hi!



    I think I have encounter a similar problem with TC.

    In my case the TC can't identify the object by the name mapping because the properties are unaccessable ('Error: Unspecified error'). Therefore my tests fails even the object exsists and the program is functional.

    It happens randomly and mainly with RTTI properties and with NativeDelphiObject properties, but rarely the WndCaption and some other is on error.



    After I restart the program or TC the properties are available as normal.



    As it occures mostly on the parent of the objects I use, my workaround is to modify name mapping to identify by more stable properties like Name and WndCaption.



    I use TC 10.10.752.7 and a Delphi program with no debug information. (I'm not allowed to compile with debug)



    Regards,

    Peter