NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

UniqueStepId - How unique is it?

Morning all.
 
The step property "UniqueStepID", accessed from the TestStand API, returns a long string.  We're planning to store these with our results so that we can use them as keys to retrieve results.
 
My question is - how unique are these strings?  Are they unique only within the current sequence, or are they globally unique?  Taking this to its ultimate conclusion, is there any theoretical chance that two developers on different PCs could produce two steps that have the same "unique" ID?
 
I'm guessing that they're similar to a GUID, but there's no info in either the documentation or the NI website.
 
Also, is there any published info on what characters this string may contain?  I've seen some '/' characters, so they're obviously not just alphanumeric characters.  I was hoping to delimit them within a bigger string, e.g. XML format.  This would be risky if the UniqueStepID strings could theoretically contain '<' or '>' characters for example.
 
Many thanks
-Sean.
0 Kudos
Message 1 of 7
(4,364 Views)
Hi,
 
My experience is that the uniqueStepID isn't unique at all.
Example: Create a step in a seq file, e.g. a numeric limit test, and then save the seq file. If you now copy the seq file in windows, rename it, and open it in TS seq editor - the step will have the same uniqueStepID. Then you can change the step name and, step type, LabVIEW (adapter) code and so on, but the uniqueStepID is the same. Conclusion; Two steps in two different seq files with different functions can have the same uniqueStepID .
 
We use a database solution that log all seq files data in the same database. The solution uses several parameters/properties for a step to make sure that you select the actual unique step.
Regards
Tom Andres Lomsdalen, CTD
Message 2 of 7
(4,355 Views)

Hi,

I think it only has to be unique within the sequence but probably is unique within the sequencefile.

Regards

Ray Farmer

Regards
Ray Farmer
Message 3 of 7
(4,353 Views)
The UniqueStepID is a GUID that TestStand represents as a string. The strings are always the same length (26 characters), begin with "ID#:", and contain only alphanumeric characters and the special characters: '#', ':', '+' and '/'.
 
TestStand tries to guarantee that step IDs are globally unique, but as Tom points out, it is not hard to create two steps with the same unique ID by making copies of the sequence file. You can generate new unique IDs for a sequence by calling the CreateNewUniqueStepIds method using the API.
 
 
Message 4 of 7
(4,338 Views)

Many thanks for the brilliant replies.

I hadn't thought of the possibility of someone renaming a sequence file - that is something that will definitely happen here, e.g. when a new variant of an existing product is made.

I'll work on the basis that it's only unique within the sequence, to be safe.

I'm now going to lash together some code to generate a few zillion steps and monitor what distribution of characters I get from all the step IDs.  My PC will be pretty busy while I'm asleep tonight.  I'll post my findings in case anyone needs this info in future.  Meanwhile, if anyone has an official definition of the character range then that would be hugely appreciated!

Thanks again - Sean.

0 Kudos
Message 5 of 7
(4,328 Views)
... I wrote my last response before Erik saved the day.  Thank you very much.
0 Kudos
Message 6 of 7
(4,325 Views)

...and now I'm educated too, after reading wikipedia's entries on "GUID" and "base64" (linked from the GUID entry).

Thanks again all.

0 Kudos
Message 7 of 7
(4,316 Views)