Forum Discussion

jeff_meakins's avatar
jeff_meakins
Occasional Contributor
11 years ago

Sporadic problems with .NET WinForms object recognition in TC10.30

Hello,

We are experiencing a sporadic problem with .NET object recognition with a WinForms object.  Most of the time, our .NET applications and child objects are being recognized correctly.  But occasionally we get an unrecognized main form, which causes sets of tests to fail, and the errors flag our pipeline builds as bad.  We’d like to eliminate the errors.

The form that is not being recognized successfully is a WindowsForms10 object (WinFormsObject when properly recognized).  I have attached a screenshot showing the names of the first two levels of child objects of the Sys.Process(“<OurAppName>”) object when the form is not recognized.

Searching the forums, I’ve seen some older posts that seem to be related to this topic, and so I’ve collected the following information to help with figuring out what might be our problem.



  1. .NET Open Application Support Plug-in – This plug-in is installed and enabled.


  2. Method Invoke Timeout - From previous posts, we’ve seen that increasing the Method Invoke Timeout can help.  We have increased this property to 30000 milliseconds.  We have still experienced the recognition problem since making this change.  (This change was made in the properties for the specific TestComplete project we are running, not in the Default project properties.)


  3. Version - We are using TestExecute/TestComplete v10.30.1145.7


  4. x86 vs. x64 - Our application is compiled as an x86 application.


  5. Launch – The application is being launched via the TestApps collection.  It is being launched in Simple Run Mode, and the application is being started after TestComplete/TestExecute has started processing the test.  The application itself is started from a folder located off the Program Files (x86) folder.  No specific custom Runtime Security policy settings are applied to where it is being run from.


  6. Open Application Status – Most of the time, the application is detected as an open application and our tests run correctly.  So the application is being treated as Open most of the time.


  7. .NET versions – our application is targeting .NET v4.0.  We’ve seen the issue on a couple of VM’s with different operating systems and installed .NET versions.  One was a Windows 2008R2 system with .NET 4.5.1 installed, and another was Windows 2012R2 with .NET 4.5.2 installed.  It should be noted that other runs on these same configurations worked fine, and this is a sporadic issue.


  8. No Prior TC/TE Abnormal Terminations – as far as we can tell, TestExecute is starting and stopping normally during these automation runs.


  9. Non-standard controls – The application is usually recognized as a WinForms application, and we are using DevExpress controls (XtraGrid, XtraVerticalGrid) in the application.


  10. AppDomain objects in process – When the application form is not recognized as a WinFormsObject, there is an Sys.Process(“<process name>”).AppDomain(“<app name.exe>”) object present in the object tree.  See attached screenshot for how it looks when we log it to the TestLog.




Any assistance would be appreciated.  Thanks.

3 Replies

  • jeff_meakins's avatar
    jeff_meakins
    Occasional Contributor
    Thanks for responding, Tanya.  And we knew we would be asked this.



    We have a 10.40 upgrade planned for later this year.  We would only be moving this up if 10.40 has a specific fix for the issue in question.



    So my counter question would be:  were there any changes in 10.40 that specifically improve object detection for our issue above?



    We saw an item in the release notes regarding general bug fixes, but nothing specifically addressed our issue.





    Jeff
  • Hi Jeff,

     


    We always improve TestComplete's functionality. However, I cannot tell you for sure whether object recognition of .NET applications was dramatically updated in the latest release. In your situation, the issue may be specific to your app. So, the best option is to update to TestComplete 10.40 and to see how it goes.


     


    If this isn't an option for you, I suggest that you continue increasing the Method Invoke Timeout and Auto-Wait Timeout options in your project.