Forum Discussion

florin's avatar
florin
New Contributor
7 years ago

native java methods in name mapping template identification properties

I am trying to evaluate if we can use testcomplete to help us do some UI regression testing for a very large Java (desktop) application using SWT as a UI framework.
Apparently the testing scripts do have access to the objects' native methods, but from reading the documentation it seems to me that name mapping templates cannot use in their identification properties native methods, only at most some of the native fields in addition to some Windows properties.
For us this would be a showstopper, since the application is huge, so templates are a must, and the default mapping is simply insufficient - it failed to correctly identify some controls for a very simple/short run.
Has anybody encountered this problem and was able to overcome it?

Thank you,

Florin

2 Replies

  • cunderw's avatar
    cunderw
    Community Hero

    You are correct that you can't use java methods for identification, nor should you anyway. 

    And you said it yourself, the default mapping is insufficient, it always will be. You will need to go in manually adjust properties for identification to something unique and static for your objects. 

     

    That being said, it absolutely can be done. My team has over 2000 tests automated for a Java point of sale. 

     

    I recommend reading everything here: http://support.smartbear.com/testcomplete/docs/testing-with/object-identification/index.html

    • florin's avatar
      florin
      New Contributor

      I should have been more clear about our use case: we don't want to write tests, we were hoping we could capture real user sessions from a production environment and replay them in a cloned environment.

      While we were expecting that it would not fully work out of the box, we were willing to spend some effort to make it work, but for this use case what matters is flexible mappings, not flexible scripts