cancel
Showing results for 
Search instead for 
Did you mean: 

Get Exe version number from Host

SOLVED
New Contributor

Get Exe version number from Host

Hi All,

 

Currently working on a distributed setup where I have a server that runs test execute at a scheduled time to execute the project suite. The project suite includes a list of jobs that are run accross a couple of Hosts. 

 

At the end of the test run, I am saving the results file to a location & renaming it with the version\build of the exe run on the host(s). I have tried using the Sys.Process.FileVersionInfo (see code below) but this wont work because  the exe  (MyExe.exe) is not present on the Server where the test run is kicked off. Therefore I get errors that the process was not found.  I have also investigated using various variables (Project, ProjectSuite & NetworkSuite) but these dont seem to work for me either.

 

Sub LogFinalResultsAndEmail
'This Routine will Export the Results Log to the Folder below & will also Rename the log to the build version.
'It will then email these Results to the specified email addresses.
sFolder = "\\Server1\TestComplete\Project1\Results\"
aqFileSystem.CreateFolder(sFolder)
FileName = sFolder & "\Build_" &Sys.Process("MyExe").FileVersionInfo & "\MyExe_Build_"& Sys.Process("MyExe").FileVersionInfo & "_" & Sys.HostName & ".mht"

Log.SaveResultsAs FileName, 2
Call SendEmail ("relay@email.com", "myemail@email.com","Test Results: MyExe Build Version "& Sys.Process("MyExe").FileVersionInfo,"Full Test Results for MyExe Build Version "& Sys.Process("MyExe").FileVersionInfo& " are available by clicking the following link. The results file (.mht) opens in Internet Explorer. " & "<a href="&FileName&"> Test Results</a> "&". Please do not reply to this message. This email is an automated notification, which is unable to receive replies.")
End Sub

 

So my question is how can I get access to the exe version details from the remote host in order to name the results file accordingly. Any help greatly appreciated.

 

Thanks,

Jimmy

2 ACCEPTED SOLUTIONS

Accepted Solutions
Community Hero

Re: Get Exe version number from Host

Rather than logging the exe version in the project that launches the distributed test, you should include in that remote project the code to find the exe version and store it into the log on that distributed machine.  As I recall, that distributed log is then brought over to the master machine for final logging and reporting so that it will be embedded in that log.  

If you want the exported files to be versioned with the exe version, then you should do the export on the slave projects rather than on the master so that you have individual log files for each exe.


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Extensions available
Community Hero

Re: Get Exe version number from Host

Hi Jimmy,

 

Generally, I am with Robert.

But you may consider WMI to connect to the remote host and trigger some code on it which will get and return the info about .exe.

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members 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. Postings made by [Community Expert Group] members
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.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================
4 REPLIES 4
Community Hero

Re: Get Exe version number from Host

Rather than logging the exe version in the project that launches the distributed test, you should include in that remote project the code to find the exe version and store it into the log on that distributed machine.  As I recall, that distributed log is then brought over to the master machine for final logging and reporting so that it will be embedded in that log.  

If you want the exported files to be versioned with the exe version, then you should do the export on the slave projects rather than on the master so that you have individual log files for each exe.


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Extensions available
Community Hero

Re: Get Exe version number from Host

Hi Jimmy,

 

Generally, I am with Robert.

But you may consider WMI to connect to the remote host and trigger some code on it which will get and return the info about .exe.

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members 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. Postings made by [Community Expert Group] members
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.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================
Community Manager

Re: Get Exe version number from Host

Hi @jimmykilleen,

Did any of the given suggestions help you?

---------
Tanya Gorbunova
SmartBear Community Manager

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others.↓↓↓↓↓
New Contributor

Re: Get Exe version number from Host

Yes both options are possibilities for me Thanks

New Here?
Join us and watch the welcome video:
API Testing Mistake #2
APITestingMistake#2