NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

disable run selected step option

Solved!
Go to solution

Hi,

 

I am working on an issue that I want to prevent operator to run selected step without going through process model.  From User Manager, I see the option that I can disable the RunSelectedTests, but that also disables the RunSelectedTests using SinglePass, which is one option we want to keep for operator.  Any idea on how I can approach this problem?

 

Thanks.

 

Peggy

0 Kudos
Message 1 of 11
(4,285 Views)

Hi,

 

One thing you could check for is the existance of RunState.ProcessModelClient, if this exists then you are running with the ProcessModel entry point.

 

Regards
Ray Farmer
0 Kudos
Message 2 of 11
(4,277 Views)

 

Can I disable the "Run Select Tests" option so that operator will not be in that situation and I won't need to check the ProcessModelClient variable?

 

And, I wonder, since "Run Select Tests" does not use process model, where I can check 'RunState.ProcessModelClient'?

 

Thanks.

 

Peggy

 

0 Kudos
Message 3 of 11
(4,274 Views)
Solution
Accepted by topic author PeggyC

On the second part of your question, you could use one of the Interactive Callbacks and perform Exists("RunState.ProcessModelClient") and if it exists continue and if it doesn't terminate with some message.

 

On the first part to your question:

Ideally it would be better not to offer the option in the first place but I am not sure if that is an option useless, if you doing your own UI you can taylor the menu to not include it. ie instead of using the Commandkind_DefaultExecuteMenu_Set you would only include the items you actually want to see. So you would not setup CommandKind_RunSelectedSteps but you would setup CommandKind_RunSelectedStepsUsingEntryPointSubmenu.

 

Checkout one of the fully Featured UI supplied with TestStand.

 

 

 

Regards
Ray Farmer
0 Kudos
Message 4 of 11
(4,267 Views)

 

Thank you, Ray.  That is very good information. 

 

I have one more question.  I am now able to disable the "Run Selected Test" from Operator Interface's menu, but when I right select the sequence file in the "Sequence Files" pane and right select the test step, I still have the "Run Selected Test" selection.  Can I disable that selection?

 

Thanks.

 

Peggy

 

0 Kudos
Message 5 of 11
(4,254 Views)

Peggy,

 

I found this help.

 

Now it adds a right mouse click option to the SequenceViewMgr but the same should apply to the ExecutionViewMgr except that you are disabling one of the options which I think you should beable to do rather than create a new right mouse click menu item.

 

Hope it gets you started

Regards
Ray Farmer
0 Kudos
Message 6 of 11
(4,241 Views)

 

I found the corresponded function.  Thank you!

 

Peggy

0 Kudos
Message 7 of 11
(4,213 Views)

Hello Ray,

 

I was trying to disable Run Selected step in the UI. For the executeMenuCommands[] array I made the following modifications:

 

static int RebuildMenuBar(int menuBar)
{

static enum TSUIEnum_CommandKinds executeMenuCommands[] =
{
TSUIConst_CommandKind_Restart, // add only the command needed
TSUIConst_CommandKind_Separator,
TSUIConst_CommandKind_Separator,
TSUIConst_CommandKind_ExecutionEntryPointDefaultMenuInsertionMarker,
TSUIConst_CommandKind_ConfigurationEntryPointDefaultMenuInsertionMarker,
TSUIConst_CommandKind_Separator,
TSUIConst_CommandKind_RunCurrentSequence,
TSUIConst_CommandKind_Separator,
TSUIConst_CommandKind_RunEntryPointOnSelectedSteps,
TSUIConst_CommandKind_LoopEntryPointOnSelectedSteps,
TSUIConst_CommandKind_Separator,
TSUIConst_CommandKind_BreakOnFirstStep,
TSUIConst_CommandKind_BreakOnStepFailure,
TSUIConst_CommandKind_BreakOnSequenceFailure,
TSUIConst_CommandKind_TracingEnabled,
TSUIConst_CommandKind_NotACommand // list terminator
};

 

// rebuild Execute menu
errChk( TS_InsertCommandsInMenu(executeMenuCommands, menuBar, BAR_EXECUTE, -1, viewMgr, NULL,TRUE, errMsg));

}

Drop down menu in CVI OI still displays "Run Selected step" and "Loop on Selected Steps"

I am using TS 4.2.1 and CVI 8.5.

 

Any suggestions why would still show?

Thanks

 

 

*************************************************
CLD
*************************************************
0 Kudos
Message 8 of 11
(4,027 Views)

Correction to original post marked in Blue below:

 

static enum TSUIEnum_CommandKinds executeMenuCommands[] =
{
TSUIConst_CommandKind_Restart, // add only the command needed
TSUIConst_CommandKind_Separator,
TSUIConst_CommandKind_Separator,
TSUIConst_CommandKind_ExecutionEntryPointDefaultMenuInsertionMarker,
TSUIConst_CommandKind_ConfigurationEntryPointDefaultMenuInsertionMarker,
TSUIConst_CommandKind_Separator,
TSUIConst_CommandKind_RunCurrentSequence,
TSUIConst_CommandKind_Separator,
TSUIConst_CommandKind_RunSelectedStepsUsingEntryPointsSubmenu,
TSUIConst_CommandKind_LoopOnSelectedStepsUsingEntryPointsSubmenu,
TSUIConst_CommandKind_Separator,
TSUIConst_CommandKind_BreakOnFirstStep,
TSUIConst_CommandKind_BreakOnStepFailure,
TSUIConst_CommandKind_BreakOnSequenceFailure,
TSUIConst_CommandKind_TracingEnabled,
TSUIConst_CommandKind_NotACommand // list terminator
};

 

Right click menu still shows "Run on Selected Steps"

Execute menu has both the items greyed out. "Run Selected Steps Using" and "Loop on Selected Steps Using" are greyed out.

*************************************************
CLD
*************************************************
0 Kudos
Message 9 of 11
(4,021 Views)

When you insert your new command names do you have currentMenuName, allMenuNames set to "" otherwise you will just insert on top of the default set.

 

 

Regards
Ray Farmer
Message 10 of 11
(3,993 Views)