Ask a Question

[Distributed Testing] Some files get corrupted during transfer to slave

completeintern
Occasional Contributor

[Distributed Testing] Some files get corrupted during transfer to slave

Hi,

 

We're trying to implement distributed testing on 4 VMs (win 7x32, win8.1x64, win10x86, win10x64) and it's working fine for the most part, although we're running into a serious issue: some files seem to get corrupted while being transfered to slave machines.

 

It seems that if the path becomes long (around 200 characters, but never more than 260) files are turned into folders.

So for instance C:\folder1\...\folder9\file.xml on master will become C:\folder1\...\folder9\file.xml\ on slave. Needless to say, the resulting folder is empty.

 

It may also happen that TestComplete throws this kind of error:

Cannot create file C:\path\somefile.xml
Perhaps the project files are being used by some application (for instance, by TestComplete). Close this application and try again.

This seems to only happen on the Windows 8.1 x64 machine. While checking the host after this error message, the .xml was in fact a folder. That same file was also corrupted on the other hosts, but TC didn't throw that error and tests were able to start normally.

 

Our test process is as follows:

-Look for an available host

-Restore a clean snapshot (so there is not TC/TE instance running, no project files, only the required softwares are installed)

-Transfer the project files

-Run the tests

 

If we try to click on "Copy Project to Slave" from the hosts manager, we get only one folder on the slave host, named 'Ɇ' (which is empty)

 

Version of TC (master): 10.40.2015.7

Version of TE (master/slaves): 10.40.2018.11

 

 

Any help would be greatly appreciated

Thanks

 

5 REPLIES 5
mtsmith
Contributor

Re: [Distributed Testing] Some files get corrupted during transfer to slave

completeintern
Occasional Contributor

Re: [Distributed Testing] Some files get corrupted during transfer to slave

Hi mtsmith,

 

Thank you but I have already tried to apply the hotfix, but in vain.

 

I managed to get TestComplete to work by mapping the project source path on Master to a virtual drive so the path beame a lot shorter. (net use M: \\%COMPUTERNAME%\C$\pathtoproject /persistent:yes, I could've used subst but making it permanent is a bit tricky)

So both manual and automatic project transfer work fine on TC.

 

However TestExecute is still showing the same issue, the project does not get copied correctly onto slave machines.

 

Why would TestComplete and TestExecute behave differently?

mtsmith
Contributor

Re: [Distributed Testing] Some files get corrupted during transfer to slave

Are TestExecute and TestComplete both using the same login ID?

completeintern
Occasional Contributor

Re: [Distributed Testing] Some files get corrupted during transfer to slave

Yes they are.

completeintern
Occasional Contributor

Re: [Distributed Testing] Some files get corrupted during transfer to slave

Alright I have figured a few things out.

 

On my last problem (TC is able to transfer project from mapped drive fine while TE isn't):

The issue was that while I was opening the project from that mapped drive M: on TC, I launched TE via script from C:.

So then the project tried to copy files from M: but it couldn't find any.

 

Opening the project on TE from M: solved the issue. Another thing to keep in mind, is that if the mapped drive is created without elevated privileges, then running the project from task scheduler while having 'Run with highest privileges' checked will not work as the mapped drive can not be seen (see this thread (SuperUser) for more info)

 

So basically I did all of that to try and have the shortest path possible. Should I add some more files to these long paths and exceed 260 chars, I may run into the same problem again. Now in Windows it is possible under certain circumstances to bypass the 260 characters limit (see here (MSDN))

However I tried playing around with those prefixes ( \\?\C:\longpath & \\?\UNC\host\C$\longpath) but that did not work in TC.

 

Would there be any way to transfer a project from a long path to a long path? I could use an external script but I would rather have it done through TC.

 

 

cancel
Showing results for 
Search instead for 
Did you mean: