NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

inactivity timeout for TestStand user credentials

Hello all,

 

I'm curious if anyone has done any work on inactivity timeouts for TestStand user credentials; I am looking for some solution that will allow windows to lock, but if i have a test running and I walk away, my credentials will lock after the test has finished.  Anyone have any ideas on where I can start some research into this?

 

-Bill

John 3:16
0 Kudos
Message 1 of 7
(4,215 Views)

Hi Bill,

 

From the sounds of it, you're going to want to use a callback in your sequence file. In the "Clean Up" section of the Process model, you could override the Process Cleanup callback to either log out of the API, or perhaps call a module that shows a log in screen. 

 

Can you elaborate on the functionality that you want? Do you want to lock TestStand so that only you can open it, or just log out? 

 

It may also help to have more information about your application. What process model are you using? Is this one test on one UUT, or multiple in sequence or parallel?

 

Regards,

 

Alexandra

National Instruments
Applications Engineer
0 Kudos
Message 2 of 7
(4,191 Views)

Alexandra,

 

Thanks for your quick reply...my reply speed needs some work though 😞

 

The functionality I'm looking for is the ability to lock out Test Sequences that are running if there is no user activity in a set amount of time.  Once the "No User Activity" threshold is met, I am looking to let the test finish and then lockout the test sequences from being run again until the next user enters their login information.

 

Sorry again for the delayed response, I got pulled off this project and now I'm back on.

 

-Bill

John 3:16
0 Kudos
Message 3 of 7
(4,113 Views)

Hi Bill,

 

In order to programmatically log out of TestStand, you first have to programmatically shut down the TestStand Engine. To execute the FrontEnd Callback to log out of TestStand, you will have to create a Property Object to pass to the LoginLogout Callback.

 

Locals.PropObj = RunState.Engine.NewPropertyObject(PropValType_Container,False,"",0),
Locals.PropObj.AsPropertyObject.SetValBoolean ("logoutOnly", PropOption_InsertIfMissing, True),
Locals.PropObj.AsPropertyObject.SetValBoolean ("isInitialLogin", PropOption_InsertIfMissing, False),
RunState.Engine.CallFrontEndCallbackEx("LoginLogout",Locals.PropObj.AsPropertyObject,ConflictHandler_Prompt,0)

 

You will also have to develop a code module to poll for UI messages after calling the first Shutdown sequence.

 

Are you intending to run a test, walk away, and come back hours later to a completed test and TestStand idle? Or are you wanting to abort an abandoned test and reset to the initial login screen? This is going to be a fairly complex implementation, so I'm trying to make sure of your intentions.

 

Regards,

 

Alexandra

 

National Instruments
Applications Engineer
0 Kudos
Message 4 of 7
(4,100 Views)

Alexandra,

 

The goal is to be able to walk away, have a test run to completion (including reports, Database steps and etc) and if no User activity is encountered , TestStand will log the user out.  TestStand will then call a UI for another user to log in and select sequences that the user has rights to.  I do not want another user to log in to the sequence that was running, when the inactivity timeout was encountered, if they do not have the rights to access that sequence.

 

Thanks for the help and insight,

 

-Bill

 

 

John 3:16
0 Kudos
Message 5 of 7
(4,064 Views)

Hi Bill,

 

Were you able to try implementing Alexandra's suggestion?  Which part of this would you like help with?

 

Warm Regards,

Daniel Dorroh
National Instruments
0 Kudos
Message 6 of 7
(4,043 Views)

Daniel,

 

The Object Model for TestStand is something I will have to learn as I have been able to mold my sequences to the base functionality of TestStand.  So I will have to give these methods a whirl.  I've found the white-paper "Using the NI TestStand Object Model" so that's my beginning point to start working with this, I will keep you updated on my progress.

 

-Bill

 

John 3:16
0 Kudos
Message 7 of 7
(4,012 Views)