NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Sequence failure with Ignore Run-Time Errors Disabled

I have disabled reporting run-time errors so that errors.occurred is not set. I am using the Pass/Fail step type calling a CVI DLL. I am testing a driver DLL and have created steps that I expect to fail (hence the disabling of run-time errors) and want to create a test pass or fail based on the expected results ( some test are expected to fail while others are expected to pass).

Since the PassFail is not set within the DLL, how can I set it based on the expected results?

I have tried changing the "Edit Pass/Fail Source" dialog to check Results.Status against the expected result ("Passed" or "Error").

I have also tried setting the PassFail as a Post Expression.

The test sequence result is always Pass.

Any he
lp would be greatly appreciated.

Thanks.
0 Kudos
Message 1 of 4
(3,549 Views)
Hi,

Try this sequencefile as an example. I have just used a None Adapter Pass/Fail step type but the same will apply to the DLL type.

Regards
Ray Farmer
Regards
Ray Farmer
0 Kudos
Message 2 of 4
(3,549 Views)
Hi Ray,

Thanks for the input.

You are forcing the error but I can't force it I need to do it programmatically. I may just need to set the RunState.SequenceError.Occurred variable if I detect the error.
0 Kudos
Message 3 of 4
(3,549 Views)
Hi,

Sorry miss-understood your requirement.

I've attached another example.
The first step returns an Error but the reporting has been switched off. It does matter how my first step sets up the step to "Error", just that it does. As long as your steps passes back the error condition via the testError parameter.
The second step checks the status of the first steps error. In this case I have done a check for Step.Result.Error.code !=0.
If this is so I have set the PassFail to True and False if it not on the second step. The Step will then report a Passed or Failed for the Previous Steps Error or not Error condition.


Hope this meets your needs
Regards
Ray Farmer
Regards
Ray Farmer
0 Kudos
Message 4 of 4
(3,549 Views)