NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a way to Parse TestStand Sequence to find Errors before running?

I'm doing a lot of writing of TestStand (3.0) sequences where I can't run them right away. Is there a way to parse the sequences to find any errors, such as Invalid SubSequence Parameter values?

The only way that I'm aware of to find the problems (other than re-opening EACH step) is to run the sequence. Problem there is that it then ONLY points out the errors as they are encountered, not others that may exist AFTER that. For this case, the user needs to find and fix the error, then restart and find the next, stop to fix, restart, etc...

Mike
0 Kudos
Message 1 of 10
(5,352 Views)
Mike,

There isn't really a way to "compile" a TestStand program to find errors ahead of time. However, there are a couple development/debugging techniques that you might find useful.

TestStand allows you to highlight 1 or more steps and just run those selected steps by right-clicking on the steps and choosing "Run Selected Steps". You can even choose whether or not to use a process model. That will allow you to run just the steps that are in question, such as a Sequence Call step or a group of related steps.

Also, you can set the Run Mode of a step to "Skip" to avoid having this step execute. That might save some time in debugging.

Another method that a lot of customers find useful is to do some prototyping with the "None" adapter. The None adapter
doesn't require that you call any code module. Therefore, it is quick to develop a sequence which uses the None adapter and has the same configuration settings that a step that calls a code module has. For example, you can still set the Loop Options or Pre-Expressions and post-conditions. Then you can verify your sequence flow is correct and the correct data elements are being passed to subsequences. After that, you can replace those steps with the step that calls the actual code module. Since you have Teststand 3.0, you can right-click on the None adapter and choose Properties. Then on the General tab, use the Adapter ring-control to change which adapter you are using. This will keep all of the properties for that step and just change the adapter.

I hope those ideas help you!
Regards,
Shannon R
Applications Engineer
National Instruments
0 Kudos
Message 2 of 10
(5,352 Views)
Shannon,

Unfortunately, neither of these workarounds are helpful.

I make extensive use of Custom steps to make calls to a "Library" subsequence. There is little chance that I can execute selected steps because many of the subsequent steps rely on the prior steps execution.

And because I use custom steps, it is the parameter variables in the custom steps that I am concerned about not being correct, so the "None" adapter is of little help as well.

I have architected TestStand (Model and Custom steps) to allow for quick and easy coding for the functions that we require. Some of the features of TestStand make this easy, other features hinder this effort.

I'd like to suggest that this be entered as an "Enhancement Request" for a future release of Te
stStand? That is, some function that parses through all the steps searching for syntax errors, prior to running? I'm sure that I'm not the only one that would find this a time saving feature.

Mike
0 Kudos
Message 3 of 10
(5,352 Views)
Mike -
This is something that we have heard and thought about a little. There are aspect of the idea that need to be ironed out, for example,
1) What context do you evaluate an expression against because the edit-time context is typically not as complete as the real run-time context.
2) How do you handle arrays that are empty as edit time but populated at run-time.
There are many more.

Thanks for voicing your need for such a feature.

Sincerely,
Scott Richardson (NI)
Scott Richardson
https://testeract.com
0 Kudos
Message 4 of 10
(5,353 Views)

Hi

 

I am finding that I am in the same position.  I need to be able to do a syntax check of a sequence before I run it.  I would like to be able to make sure that I have not entered any variable names incorrectly.  Also if I change a variable name or remove a variable I need to verify that the seqeunce will not break at runtime.

 

I have a large number of sequences that are called from each other and parameters are passed between them, and it appears difficult to be able to run them individually (maybe I am not desinging things correctly).

 

Thanks

 

Dave

0 Kudos
Message 5 of 10
(5,000 Views)

Yes - I agree. It would be easy for TestStand to identify basic things like unknown variables - since

it immediately highlights those in red anyway, if you happen to be on the step that uses it.

This would be a small but very useful syntax check. So at least for those names (including sequence

calls etc.) that are not constructed at run time, a basic sanity check could be done where possible.

 

As for changing the name of variables: When you change the name of a variable in VS2008 the option

is immediately available to update all the references of that variable with the new name if you want.

The same is true of function calls as well. The whole project is updated. Very useful & timesaving.

TestStand semi-allows this with the Search and Replace function - but it's not as helpful.

 

Perhaps a basic syntax checker could be written by a user ;-(

If the sequence files were saved as text they'd be easily parsed...

 

Ronnie

TestStand 4.2.1, LabVIEW 2009, LabWindows/CVI 2009
0 Kudos
Message 6 of 10
(4,994 Views)

Hi,

 

you can save the sequence file as text (ini style format) via the Sequence File Properties dialog.

 

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 7 of 10
(4,975 Views)

Yes - I knew that - but it was a suggestion for anyone outside of NI that wishes to parse through a sequence file.

But thanks for making it clear for those that didn't know that option was available.

TestStand 4.2.1, LabVIEW 2009, LabWindows/CVI 2009
0 Kudos
Message 8 of 10
(4,972 Views)

Hi,

 

is there still a website from NI where we can leave comments about future feature we would like for a product ?

 

I would also like to have a window where we can find all the "errors" before running the sequence. It will be way more secure to correct those before running the sequence, so it doesn't break on a step where it should not...

 

Thanks

0 Kudos
Message 9 of 10
(4,860 Views)

Consider upgrading to TestStand 2010 which comes with a Sequence Analyzer that helps you find problems, such as parameter incompatibilities, in sequences before you execute them.

0 Kudos
Message 10 of 10
(4,363 Views)