From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

automating sequence analyzer

TestStand Sequence Analyzer (running TS 2012 if that makes a difference):

 

I'm using TestStand Sequence Analyzer to check for problems in my sequences (built-in rules, and a bunch of custom rules).  It works fine for working in sequence editor and running the analysis.  However, I want to be able to automate the analysis (think every evening I want to run the analysis and send developers an email with all the "mistakes" they created that day)

 

So far, I can't find anything to allow me to do a headless analysis and get results out (either as a data structure or a report on disk).

The TS Engine / applicationMgr does not seem to have a "start new analysis task"

The command line analyzer seems to dead end at "start me with a project" and not include any ability to automatically run the project and/or export results.

Creating a new ActiveX Automation against "NI TestStand .... Sequence Analyzer API..." does not seem to allow me to do anything.

 

Is this possible?

What am I missing here / where did I go wrong?

 

Thanks!

0 Kudos
Message 1 of 17
(6,179 Views)

It looks like there is an API for the Analyzer in the TSAnalyzer.Interop.dll in the bin folder.  Will this not work for you?  It isn't documented but you might be able to find your way around it.

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 2 of 17
(6,169 Views)

What version of TS are you using?  I'm not seeing that one in TS2012 (I've got TSAnalyzer.dll, but that one seems to work fine for once I have an existing analysis context "executing", but can't find anything in it to allow me to configure or start a new analysis).

 

 

 

0 Kudos
Message 3 of 17
(6,164 Views)

I have 2010 on this machine.  It looks like that assembly allows me to initialize and everything (just looking at the functions.  haven't tested anything).  Maybe they took that out?  Or maybe it is hidden?

 

Regards,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 4 of 17
(6,152 Views)

Hi Warren,

 

Check out this simple three step example.

It opens the analyser class and makes a new project.

Analysis one file (in the Example only one variable is used--> analyser should tell you unused! )

Create report to a stringvariable.

 

Tested it against the manual Report with TS-Editor--> same Result !

 

Developed with TS14.
If using TS5.0(2012) you have to match the right GAC analyser reference for your maschine in the three .net steps.

 

Regards

 

Juergen  

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
Message 5 of 17
(6,120 Views)

jigg -- I finally found that interop dll -- in the API\DotNET\Assemblies folder.

I think that with the 3 line example from Juergen I can piece together something that will work.

Thanks!

0 Kudos
Message 6 of 17
(6,108 Views)

That's good news.  I hope it works out for you.  I don't have the time right now or I'd throw something together.

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 7 of 17
(6,096 Views)

Hi Juergen,

 

The sequence that you have given works for the "file to analyze.seq". How can I modify the sequence to analyze some other sequence?

0 Kudos
Message 8 of 17
(3,505 Views)

Hi j_dodek

 

Thanks for your example. I've need to run the sequence analyzer on sequence files in a specific catalog why I changed your example to use a sequence analyzer project.

Got a couple of issues doing this but first my procedure for analyzing:

1. Copy files for a testsequence/release to a specific catalog

2. Analyze the files

3. Unload the files in TestStand and delete the files

4. Go to 1 using a new testsequence/release

The steps in the test sequence are made in C# (DLL's) and the DLL have the same name in all testsequences but the DLL's are different why they must be unloaded before deletion.

Issues:

1. When do I know the analyzer is done? ("AnalyzerStopped" method allways return FALSE)

2. The "UnloadAllModules" i the "AnalyzerClass" seems not to work. Any idea?

3. The "StartAnalysis" method has an Option input parameter. What are the options?

Have you any answers to the questions and/or do you know where to find documentation regarding the functions in the "NationalInstruments.TestStand.Interop.SequenceAnalyzer" assembly?

 

Regards

Vagn

0 Kudos
Message 9 of 17
(2,950 Views)

Hi Vagn,

 

Any luck on getting your questions answered?  I've recently been studying what is available in this API and have similar questions.  Any thoughts or note you may have created would be helpful.  Thanks

0 Kudos
Message 10 of 17
(2,214 Views)