cancel
Showing results for 
Search instead for 
Did you mean: 

TestComplete tests broken when run on different PC

SOLVED
Highlighted
Contributor

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?

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Hero

Re: TestComplete tests broken when run on different PC

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.

 

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================

View solution in original post

7 REPLIES 7
Highlighted
Community Hero

Re: TestComplete tests broken when run on different PC

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?

 

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
Highlighted
Contributor

Re: TestComplete tests broken when run on different PC

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

 

Highlighted
Contributor

Re: TestComplete tests broken when run on different PC

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.

Highlighted
Community Hero

Re: TestComplete tests broken when run on different PC

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.

 

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================

View solution in original post

Highlighted
Contributor

Re: TestComplete tests broken when run on different PC

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?

Highlighted
Community Hero

Re: TestComplete tests broken when run on different PC

Hi,

 

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?

This is what I am not sure at and that is why I suggested to create a Support case.

I will appreciate it if you update this thread with the reply from Support.

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
Highlighted
Contributor

Re: TestComplete tests broken when run on different PC

Just as an update on the issue.

The issue looks to be a one off issue.

Upon recording the test again on PC 1, the object names now matches those on PC2.

I still dont understand how the other record test used Window("WindowsForms10.Window.8.app.0.21...").

 

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

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

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors