NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

.seq file generation from an external program

HI Pacsoft I tryed to compile the C# file you posted but It asked me for TestStand.Interop.AdapterAPI and TestStand.Interop.API that i dont have. Do you know where i can find them?

 

thank you

 

Luca

0 Kudos
Message 11 of 31
(2,362 Views)

Hello Luca,

 

You can find the assemblies at:

 

<TestStand>\API\DotNet\Assemblies

 

Where <TestStand> is your TestStand root directory (typically "C:\Program Files\National Instruments\TestStand x.x" with x.x being your version of TestStand).

 

When you install TestStand these should also install to <local disk>\WINDOWS\assembly.

With warm regards,

David D.
0 Kudos
Message 12 of 31
(2,359 Views)

If you are going to go with directly generating a text-based format, I just want to give you some advice that might be helpful.

 

1) I highly recommend XML rather than INI. The Xml format is much more human readable and directly represents the tree-like data structure of a sequence file.

2) I recommend saving simple files, close to what you are trying to generate, as XML in TestStand and looking at the XML in an external editor to see an example of what you will need to produce. You should try to look at it in an XML editor (not just a text editor) such as visual studio or xmlspy for syntax coloring and other features that will make it easier to see and navigate.

3) You do NOT need to include the typelist that TestStand always includes in its XML files as long as you are only using step types and custom data types that are already defined in one of TestStand's type palette files. However, if you do not include the types, it's possible that your sequence might not upgrade correctly when opened in newer versions of TestStand than the one you are originally targetting. You might have to check for step type changes in newer versions of teststand manually and update your sequence file generation accordingly if needed.

 

That said, I too would recommend using the API instead, if at all possible, as that will make your sequence file generation more future proof and more straightforward. Either way, let us know if you have any additional questions.

 

-Doug

Message 13 of 31
(2,340 Views)

If we're going to use the API, we might as well generate .seq files as XML, since that's what we will need anyway. But since we have to use Java, we would need some intermediate representation (or use some sort of Java-ActiveX bridge. 😕 )

 

- Steve.

0 Kudos
Message 14 of 31
(2,333 Views)

Hello Steve,

 

Could you let me know what your application is going to be doing overall (high-level overview)? This would be helpful to let all of us advise you with all of the information available.

With warm regards,

David D.
0 Kudos
Message 15 of 31
(2,327 Views)

Hi, David,

 

We are developing an advanced test generation tool called TDE/UML. It lets test developers design tests based on UML diagrams of testing activity. We have used it throughout our company and found that it gives great gains in productivity in the hands of people who are experienced with its use.

 

 TDE/UML is based on Eclipse and accepts plugins as code emitters. We need to develop a code emitter that will emit TestStand sequence files.

 

Here is a (rather old) reference to TDE/UML if you're curious.

 

Hope this helps,

- Steve.

 

 

0 Kudos
Message 16 of 31
(2,322 Views)

Hello Steve,

 

That's a pretty interesting application!

 

Good luck in your development and definitely feel free to post here if you have any more questions!

With warm regards,

David D.
0 Kudos
Message 17 of 31
(2,288 Views)

Steve,

 

A couple of more ideas for you to consider:

 

1) You could come up with an intermediate representation (as you mentioned in your recent post) that your Java code generates (probably a much simpler format than TestStand sequence files) and create a sequence file translator in teststand that converts that intermediate format into a TestStand sequence file using the TestStand API (this translator would be written in something other than Java that supports ActiveX). There are some downsides to this, such as if your users modify the files that you generate, then you will need to save them as actual TestStand sequence files after they are modified. NOTE: Sequence file translators are a feature added in TestStand 4.0 to allow for a more seemless integration of files that can be translated into sequence files with the teststand engine. Basically TestStand calls into a plugin that you write whenever it encounters a file of an unknown format being loaded as a sequence file. If your translator recognizes the file it converts it to a sequence file in memory for the teststand engine to then use.There are examples and documentation installed with TestStand.

 

2) Does the Java language you are using allow calls into external DLLs? If so you could mix some C/C++ code in with the Java to make the actual COM calls. You'd probably want to do as much as possible per dll call to avoid having too many cross-language calls in order to reduce complexity and for best performance.

 

Still, if you want to go the route of directly generating xml sequence files, it is doable, the format is just likely more complicated than you are expecting.

 

Hope this helps,

-Doug

0 Kudos
Message 18 of 31
(2,280 Views)

Hi Steve,

 

I did an automatical SequenceFile generator. I am able to convert an Excel-sheet to SequnceFile.

I had split it into two parts. 1 Make a from Excel.sheet a "suitable" xml - File.  2. Create from this xml

which looks like a simple tree a teststand sequnce file via TS-api calls.

 

I did it with C#

 

greetings

 

Juergen

 

 

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 19 of 31
(2,257 Views)

Hi, I was trying to generate .seq files from XML using the example files, they only have MessagePopup and DisplayGraph inplemented so i assume i need to modify the C++ code to make it work with other kind of steps (like Statement or Sequence Call). I tryed to do it and built the project, it generates a dll called VCXMLTranslator.dll that i replaced in the *\TestStand 4.1\Components\Translators folder, but when i try to open the XML file it gives me an erron on another dll called LabVIEWXMLTranslator.dll. Does anybody knows how to modify that one or, if it already works that way, does anybody know which is the related XML syntax for creation of Statement or Sequence Call steps?

thank you

 

Luca
0 Kudos
Message 20 of 31
(2,232 Views)