NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing Build Version through API

I'm trying to find a way access the build version of my deployment through the API.  Currently I'm using TS 2011 but I plan to migrate to TS 2013 so I can wait until this migration if it is easier to achieve in 2013.  Has anybody done anything like this in TS?

0 Kudos
Message 1 of 8
(4,357 Views)

chilidog,

 

When you say build version, do you mean something specific to your deployment (such as "This is version 1.1 of my deployment") or the TestStand build version? You can access the TestStand build version with Engine.VersionString. This would give you something along the lines of: 2013 (5.1.0.226).

0 Kudos
Message 2 of 8
(4,345 Views)

The deployments themselves did not have a version in TS 2011, that was only added in 2013. I am guessing that you mean the installer version? To do that you have to use the GetFileVersionInfo API on the generated installer. I have not tested this class, but .NET has a helper class to do that (which you can use from the sequence editor, for example): FileVersionInfo.

 

The deployment version itself is only available in 2013 or later and unfortunately there is no easy way to access it without reading the TSD file. I will create a ticket to make the deployment version available in future versions of TestStand. 

 

I hope this helps,

Francisco

0 Kudos
Message 3 of 8
(4,337 Views)

Hi,

 

You can be sure that this is working in TS2013, I am already using this API function.

And felt into the gap when saving backwards to TS 2012. As the the blue-ones this only supported since TS2013.

 

Regards

Juergen

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 4 of 8
(4,333 Views)

Hi,

 

please forget my upper answer!!

Your asking for deployment built version.

 

I have answered for TestStand built version!!!

 

Sorry

 

Juergen

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 5 of 8
(4,331 Views)

Hi Francisco,

 

Thanks for the reply. I'd like to add a little more to this.  I'm using Perforce and I'd like to use the minor change increment to match the changelist number in perforce.  If I can access this through the API then I can attache a TS deployment build to the Job data in my database.  This gives me a way to link the build version, source version to the job I'm running.

 

When you say you will create a ticket to make this available in future versions of TS I hope you mean it could be available in TS 2013 SP1.  In anycase thank you for your response.

 

Chilidog

0 Kudos
Message 6 of 8
(4,323 Views)

I need to add I'm not using TS2011, I'm currently using TS2010 SP1.  There actually isn't a TS 2011 right?  In anycase I don't need to set this up in 2010 as I'm not locked into this version

0 Kudos
Message 7 of 8
(4,319 Views)

We don't have a deployment version in TSDU in 2010 SP1, we only added that in 2013 (in order to simplify the creation of patches, so that you could always tell that patch 1.0.4 would upgrade full distribution 1.0.3 and not the other way around). However, we do have an installer version, if that is the version you want you can get it from setup.ini located next to the generated installer (located in %userprofile%\Documents\TestStand Deployment\Installer by default) . This is just a text file which stores information for the EXE. The version will be located under the Distribution tag and the field is called Version:

 

[Distribution]
Version=1.0.125

 

Hope this helps,

Francisco

0 Kudos
Message 8 of 8
(4,302 Views)