Forum Discussion

hiepwork08's avatar
hiepwork08
Contributor
4 years ago
Solved

TestComplete tests broken when run on different PC

I have an issue where, the testComplete test runs fine in the PC to which the tests were recorded. However, when I run those tests in a different PC (Same version of the application under test, same OS, Windows 7) the tests fail because they cannot find the window objects.

 

I have read up on Name Mappings but still unsure of a solution.

Under the How name mapping works:

When running tests, TestComplete uses the Name Mapping repository to find objects in your tested application. If TestComplete cannot find an object (for example, if the object properties have changed, or there are several objects with these property values), the test fails. In this case, you need to update the mapping criteria to use unique, unchangeable properties for object identification.

 

If I am running the same version of the application under test, would one expect the object properties to have changed?

 

 

 

  • AlexKaras's avatar
    AlexKaras
    4 years ago

    Hi,

     

    > PC1: Window("WindowsForms10.Window.8.app.0.21...")

    > PC2: WinFormsObject("...BrowserForm")

    This means that your tested application was identified as WinForms one on PC2 and as a regular Windows application on PC1.

    I would recommend to compare the set of extensions enabled in TC on PC1 and PC2 (File|Install Extension).

    If the set is the same then you may ask Support via the https://support.smartbear.com/message/?prod=TestComplete form what might be causing the problem you are observing.

     

     

7 Replies

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    Hi,

     

    If I am running the same version of the application under test, would one expect the object properties to have changed?

    This depends on the tested application.

    Can you provide us with the text of the error from the test log, with the content of the relevant Details pane of test log and screenshot of how problematic tested object is mapped?

     

     

  • I cannot provide any screenshot.

    However, further investigation has revealed the following.

     

    When the keyword test was recorded on PC1:

    The mapped name is saved as "wndWindowsForms10Windows2080app021....", this is the WndClass name of the application under test. Re-running the recorded test on PC1, testcomplete can find that window without problems.

     

    However, when I run the same recorded test on PC2, testcomplete complains that "wndWindowsForms10Windows2080app021...." object is unable to be located.

     

    Upon inspection of the Object Browser, the same objects have different labels for PC1 and PC2:

    PC1: Window("WindowsForms10.Window.8.app.0.21...")

    PC2: WinFormsObject("...BrowserForm")

     

    What I am speculating is the wndClass name to which testcomplete identifies the object name for the application under test is different between PC1 and PC2. PC1 and PC2 have different setup.

     

    Can the testcomplete test be customised as such it can handle the variability of the object names between PC1 and PC2? Is this done under the namemapping feature?

     

    Cheers

     

    • AlexKaras's avatar
      AlexKaras
      Champion Level 3

      Hi,

       

      > PC1: Window("WindowsForms10.Window.8.app.0.21...")

      > PC2: WinFormsObject("...BrowserForm")

      This means that your tested application was identified as WinForms one on PC2 and as a regular Windows application on PC1.

      I would recommend to compare the set of extensions enabled in TC on PC1 and PC2 (File|Install Extension).

      If the set is the same then you may ask Support via the https://support.smartbear.com/message/?prod=TestComplete form what might be causing the problem you are observing.

       

       

      • hiepwork08's avatar
        hiepwork08
        Contributor

        I did a check on the extentions and its the same on both PC1 and PC2.

        Which I find strange. PC1 and PC2 are built differently in terms of what is installed on it.

        Would their be additional extentions, SDK, or libraries which are installed on one PC but not the other which is affecting how TestComplete identifies the windows?

    • hiepwork08's avatar
      hiepwork08
      Contributor

      To add further, for the software under test, when tests are recorded, testcomplete saves the 'WndClass' property of the window in the Name mapping.

      Why does testcomplete only save the WndClass property by default and not other property of the window under test?

       

      This particular application under test, the WndClass value differs from PC1 and PC2, hence Testcomplete has trouble locating the window object.