NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Avoid User Login Dialogue with TestStand Engine only

Solved!
Go to solution

Hi,

 

I'm having a hard time automating tests with TestStand 2019, maybe some of you are able to assist me.

 

I have a test computer that only has the TestStand Engine installed, no Sequence Editor etc. The License is properly set up.

For now I'm just trying to execute a self-test sequence using the Simple C# "TestExec" example that comes with TestStand[0]. I do so using a Jenkins job from the Shell (we have "Git for Windows" installed which comes with a properly set up Bash).

 

Right now the log output looks like this:

+ ./runner/TestExec.exe runEntryPoint 'Single Pass' self-test.seq -quit

Unhandled Exception: System.InvalidOperationException: Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.
   at System.Windows.Forms.MessageBox.ShowCore(IWin32Window owner, String text, String caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton, MessageBoxOptions options, Boolean showHelp)
   at TestExec.MainForm.DisplayError(String caption, String message)
   at NationalInstruments.TestStand.Utility.LaunchTestStandApplicationInNewDomain.HandleLaunchProtectedException(Exception e, String applicationName, DisplayErrorMessageDelegate displayErrorMessage)
   at NationalInstruments.TestStand.Utility.LaunchTestStandApplicationInNewDomain.LaunchProtectedHelper(MainEntryPointDelegate entryPoint, MainEntryPointDelegateWithArgs entryPointWithArgs, String applicationName, String[] args, DisplayErrorMessageDelegate displayErrorMessage, Boolean parseArgs)
   at TestExec.MainForm.Main(String[] args)

Now I assume the "modal dialog" in question is the login prompt that pops up when running the sequence. Running the same command inside a remote session (also from a Bash) confirms that indeed such a login prompt pops up, blocking the sequence from running.

 

To avoid the login prompt from opening I have already tried the following:

  1. Tried the same using CMD and Powershell
  2. Automatically logging in as admin via FrontEndCallback[1] (both in the Public and the TestStand directory)
  3. Use an example FrontEndCallback for an older TestStand version[2] (also for both directories)
  4. Play with the TestStand GeneralEngine config[3] for auto-login etc (which is usually done from within the Sequence Editor which I don't have on the agent)
  5. Briefly try to use the FrontEndCallback from [1] as a StationCallback instead

Messing with the config file (I've reset everything to the way it was before) seemed to avoid the popup, but still prevented the sequence from running. I think that's some user needs to be logged in in order to run it.

 

The fact that none of the FrontEndCallbacks seemed to have any effect at all suggests to me that they are not being called at all. Maybe they are specific to the Sequence Editor Front-End? Or am I chasing the wrong problem here?

 

I'm running out of ideas and would appreciate any pointers to possible solutions.

Cheers!

 

[0] At C:\Program Files\National Instruments\TestStand 2019\UserInterfaces\Simple\CSharp

[1] Disabling User Management in TestStand

[2] Automatically Create a TestStand User for the Windows System User in TestStand 

[3] At C:\ProgramData\National Instruments\TestStand 2019 (64-bit)\Cfg\GeneralEngine.cfg

0 Kudos
Message 1 of 3
(1,325 Views)
Solution
Accepted by topic author iseGmbH

FrontEndCallbacks are not specific to the Sequence Editor. I've attached a Front End Callback that will auto login without a dialog.

 

I made a dummy sequence and use this cmd line and everything worked as expected.

 

"C:\Users\Public\Documents\National Instruments\TestStand 2019 (32-bit)\UserInterfaces\Simple\CSharp\Source Code\bin\x86\release\TestExec.exe" /operatorInterface /runEntryPoint "Single Pass" "C:\path...\DoSomething.seq"

 

The difference seems to be the forward slash before "runEntryPoint". Your example is missing that. If you are missing that it doesn't actually run the sequence.

 

 

Message 2 of 3
(1,290 Views)
Solution
Accepted by topic author iseGmbH

Oh, good catch with the forward slash. I would have expected the runner to complain about not finding the file "runEntryPoint", but that wasn't the problem anyways.

 

From the path you ran the TestExec from, I assume you ran it on a computer with a full TestStand installation (on my test node the example front ends are missing). On my development machine I got it running too, my problem was deliberetely with a machine only having the TestStand engine installed.

 

I found out what the problem was however. I was using the shortcut variable %TestStandPublic% to navigate to the public directory where the callbacks are at. Although allmost of the NI services running on the machine seem to be 32bit, I didn't consider replacing the FrontEndCallbacks.seq at %TestStandPublic64%.
Once I replace the callbacks there it works for me as well.

 

Thank you for your help! 🙂

0 Kudos
Message 3 of 3
(1,262 Views)