NI TestStand Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
_carl

API that doesn't rely on ActiveX UI Components

Status: New

The TestStand API doesn't provide a simple, robust mechanism allowing developers to programatically run sequences outside of the ActiveX UIs.

 

On many an occasion I've wanted to wrap the following basic functionality:

  • Run a specific sequence file (with or without a [typically custom] process model)
  • Wait for it to complete.
  • Retrieve the result.

It's something I've needed to do in all of the following situations:

  • Integrating into a customer's existing framework
  • Integrating into my own automated test framework
  • Providing a simple API to a customer
  • Creating customized UIs that rely on UI messages and events rather than the ActiveX Controls

The solution I've ended up defaulting to in the past has been some variation on:

  • Start with the full-featured C# UI.
  • Scrape out all visible ActiveX Controls, and hide the window so that it's running in the background.
  • Integrate a TCP/IP (or equivalent) client into the application that has the ability to listen for requests and then implement them through the AxApplicationMgr.
  • Build a TCP/IP server assembly that launches the client application and exposes the necessary API for simple interactions.

The approach above is time-consuming, error-prone, and feels like a hack -- but given that TestStand does not expose any easy mechanism for simply running a sequence, this is what I've ended up having to resort to.

1 Comment
angus2022
Member

Haha, I think I have implemented your idea. I use the C # console (which can be called through the command line) based on pure TestStand 2017 Engine calls, either with a process model or without it. and no need creating a GUI interface, it can complete the seq test and send the UI message through a TCP socket. (If you have a TCP socket server, this will receive these test messages and results in real time.)