Originally posted by hkonakanchi on December 16, 2024
I had two projects in my project suite where one project is created as a base where all my desktop objects and the corresponding action for each and every control is written
Controls are mapped in name mapping
Scripts are written with Aliases being used
I had created the second project where the scripts and name mapping from the first are used as it is and it includes some tests as well
It is some kind of framework setup where the first project as a base project ( a kind of page object pattern ) and the second one re-uses the script and name mapping as linked items from the first
If I am trying to run tests, each and every test tries to identify the objects that are declared as aliases in each script
For example if I have something like var notepadwnd = Aliases[“notepad”], the system is trying to find notepad for the default amount of time for each test.
My tests are getting timeout as I have atleast 20 application which are like this and TestComplete is trying to find them increasing the test duration and thus failing the test due to timeout
Originally posted by Hassan_Ballan on December 16, 2024
When it fails, what is the error in the log?
Do I understand your description correctly?
-Project A has NameMapping and Script using aliases to that NameMapping. In Project A, from the script you can perform item highlight and it works.
-In Project B, you add existing item of NameMapping and Script from Projact A, and from Project B script when you perform item highlight it fails.
Originally posted by hkonakanchi on December 26, 2024
Name mapping is done and it is fine. The only thing is tests are fine earlier as well. But after a latest update to Windows 11 24h2, each and every test is looking or searching for all the name mappings that are available
Originally posted by hkonakanchi on December 26, 2024
Name mapping is done and it is fine. The only thing is tests are fine earlier as well. But after a latest update to Windows 11 24h2, each and every test is looking or searching for all the name mappings that are available
Originally posted by hkonakanchi on December 26, 2024
Name mapping is done and it is fine. The only thing is tests are fine earlier as well. But after a latest update to Windows 11 24h2, each and every test is looking or searching for all the name mappings that are available
Originally posted by scot1967 on December 27, 2024
It would help to start with a few more details about the problem.
“What is the exact error message you are receiving?”
When it fails, what is the error in the log?
In Tools\Current settings, there is an object search strategy.
In Options\Engines there are name mapping settings.
Have you checked for issues with your NameMap? I have seen issues like this. In one case the path set to the NameMap in the project ‘.mds’ was the problem. The ‘.mds’ file should not be manually modified but can be opened and examined as XML.
In another case the NameMap was corrupt but I was able to recover by restoring an older NameMap from source control.
The NameMap itself is stored in a NameMapping.tcNM file. This is also an XML file that can be examined but I would not recommend modifying the content.
In both cases this occurred in a situation similar to yours where two different projects were modifying the same NameMap.
If you are still stuck you may want to open an issue with the support team.
Originally posted by scot1967 on December 27, 2024
Just to rule out the simplest question… “If I am trying to run tests, each and every test tries to identify the objects that are declared as aliases in each script” This is normal behavior. If an object is found in one test is it not stored for use in other tests or if it doesn’t have scope in the code block you are in.
Originally posted by scot1967 on December 27, 2024
Which version of TestComplete are you using and have you tried running a repair or removing and reinstalling TC? If you feel the update has caused this problem opening an issue with support would be best.
Extended Find searches down the entire object hierarchy. The search is not depth-limited.
Extended Find uses breadth-first search, regardless of the value specified in the Object search strategy project property (it affects the Find methods only).
Searching for objects in large applications may take a long time. If you get warnings in the test log that a search takes too much time, try doing the following:
Set the NameMapping.TimeOutWarning property to false. This will stop TestComplete from posting warning messages to the log if the search takes too long.
Originally posted by hkonakanchi on February 04, 2025
scot1967 To highlight my point same tests or project or project suite is running fine on Windows 10 , Windows Server 2022 , Windows Server 2019 but not on Windows 11 and Windows Server 2025
Originally posted by rraghvani on February 05, 2025
Are you running TestComplete/TestExecute against Windows 11 or Windows Server 2025 on a physical machine? Does the user have appropriate permissions? Are you using the same user, when launching Notepad and TestComplete/TestExecute?
How are you launching Notepad? What is the name mapping for Notepad?
Originally posted by scot1967 on February 05, 2025
It would be helpful to see a code snip and an error screen shot. Is the issue limited to finding and starting an instance of the tested application? I have resolved issues like this where the app installer behaves differently for newer operating systems. In such cases I had to check for the OS type and handle the tested app accordingly. For example some apps will install in Program Files in one OS and Program Files (x86) in another.
Another option is to write code to search the file system or registry and alter the tested app path accordingly. I also have code for this.
This is how you would access OS version information. This could be used to change the behavior of you TestedApp search.
var osName = Sys.OSInfo.Name;
var osVersion = Sys.OSInfo.Version;
var osBitness = Sys.OSInfo.FullName;
OS Name: Win11 0.00 8:13:02:678 Message
OS Version: 10.0 Build 22631 0.00 8:13:02:678 Message
OS Full Name: Microsoft Windows 11 Enterprise, 64-bit 0.00 8:13:02:678 Message
Sorry I keep editing this…
I run code in the On Start Test Event to verify, log things and conditionally perform actions as needed.
Originally posted by hkonakanchi on February 06, 2025
All my test applications are invoked through UI action where they are launched by clicking on a launcher application which itself is invoked by TestedApp[“launcher”]run() . They do not change thrie path, but believe something is causing this behaviour where it runs successfully on prior versions
Originally posted by scot1967 on February 06, 2025
So all of the applications run through this launcher app fail to be found by TestComplete on Win 11 and Server 2025.
My tests are getting timeout as I have at least 20 application which are like this and TestComplete is trying to find them increasing the test duration and thus failing the test due to timeout.
Could you explain this launcher a bit more? The launcher app works fine manually so obviously so, TestComplete is having trouble locating the app in the process tree once lunched. What is the code used to locate the app process in the tree?