Ask a Question

Problem running scripts on another computer

SOLVED
nedbacan
Contributor

Problem running scripts on another computer

Hello.  I am trying to figure out the best practice to manage and run other co-workers' test scripts (Keywords) on my test environment.

 

I added someone else's project into my TestComplete environment, and when I run it, I get an error "...object does not exist".

Both test environments are identical,  the web software under test is the same in both places, the same windows version, and so on.

 

I noticed my peer's object mapping appears different from when I create the same steps in my environment, 

 

Can someone explain the correct approach to run scripts on another computer? 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Marsha_R
Community Hero

Re: Problem running scripts on another computer

There are a couple of things that could cause the Object does not exist error in this case. 

 

One is that two machines will run your application under test at different speeds so TestComplete may have moved ahead in the test before the object has actually loaded.  You can try using a Delay right before the line of the test that has the error and see if that helps it.  If it does, then it's actually a better practice to use Wait instead of Delay and you can switch to that.  Delay is just a quicker way to check.

https://support.smartbear.com/testcomplete/docs/keyword-testing/reference/misc/delay.html

https://support.smartbear.com/testcomplete/docs/app-objects/common-tasks/waiting-process-or-window-a...

 

 

If the difference is really coming from your Name Mapping, then you'll want to merge your various Name Mapping files occasionally.  ALWAYS ALWAYS ALWAYS do a backup of each individual Name Mapping file before you attempt this.  What we did when I worked in a group that needed this was to create an empty project and merge the files in there, then have everyone take a copy and try it with their tests to make sure the merged one worked all around.  Work out a schedule amongst your group for doing this and share it so nobody gets stuck with it all the time.

https://support.smartbear.com/testcomplete/docs/testing-with/object-identification/name-mapping/how-...

 

 

View solution in original post

hannecroonen
Occasional Contributor

Re: Problem running scripts on another computer

It is probably an issue regarding the NameMapping file.

It is very hard to merge different NameMapping files, being that all new mappings are saved under a key and that key is probably linked to a different mapping for you and for your colleagues projects.

Meaning you should very carefully try to merge both NameMapping files and really see every mapping is using a different key.

This is a hassle and we haven't found a solution either so if you find one let me know 🙂 

View solution in original post

2 REPLIES 2
Marsha_R
Community Hero

Re: Problem running scripts on another computer

There are a couple of things that could cause the Object does not exist error in this case. 

 

One is that two machines will run your application under test at different speeds so TestComplete may have moved ahead in the test before the object has actually loaded.  You can try using a Delay right before the line of the test that has the error and see if that helps it.  If it does, then it's actually a better practice to use Wait instead of Delay and you can switch to that.  Delay is just a quicker way to check.

https://support.smartbear.com/testcomplete/docs/keyword-testing/reference/misc/delay.html

https://support.smartbear.com/testcomplete/docs/app-objects/common-tasks/waiting-process-or-window-a...

 

 

If the difference is really coming from your Name Mapping, then you'll want to merge your various Name Mapping files occasionally.  ALWAYS ALWAYS ALWAYS do a backup of each individual Name Mapping file before you attempt this.  What we did when I worked in a group that needed this was to create an empty project and merge the files in there, then have everyone take a copy and try it with their tests to make sure the merged one worked all around.  Work out a schedule amongst your group for doing this and share it so nobody gets stuck with it all the time.

https://support.smartbear.com/testcomplete/docs/testing-with/object-identification/name-mapping/how-...

 

 

View solution in original post

hannecroonen
Occasional Contributor

Re: Problem running scripts on another computer

It is probably an issue regarding the NameMapping file.

It is very hard to merge different NameMapping files, being that all new mappings are saved under a key and that key is probably linked to a different mapping for you and for your colleagues projects.

Meaning you should very carefully try to merge both NameMapping files and really see every mapping is using a different key.

This is a hassle and we haven't found a solution either so if you find one let me know 🙂 

View solution in original post

cancel
Showing results for 
Search instead for 
Did you mean: