06-02-2010 10:33 AM
Solved! Go to Solution.
06-02-2010 11:00 AM
Let me provide a little more detail: We have written a C#application which is a GUI wrapper around TestStand to hand hold the user through the selection of a test, installation of the proper equipment on the testing hardware, execution of the test, and generating reports.
When looking at the report data that TestStand provides (in the End Execution Event), it reports "Failed" for both a true failure and a ForceFail, and it reports "Passed" for both a true pass and a ForcePass.
Is there a way to detect the forced status?
06-02-2010 11:04 AM
06-02-2010 11:31 AM
06-02-2010 12:02 PM
I'll do you one better, here's a working example. It uses the SequenceFilePostResultListEntry callback, but you could also implement it in process model using ProcessModelPostResultListEntry. You may have to modify your stylesheet to get results to populate correctly, particularly with XML or ATML reporting.
It's pretty simple: if the reporting step uses either Force Pass or Force Fail, the callback updates both the UI's ResultStatus and the Result.Status going into the report. If you only want one or the other, remove or comment out the part you don't want.
06-02-2010 01:05 PM
Thanks.
However, I'm using TestStand 4.0.1 and can not open your TestStand 4.2 file.
I assume I can use your SEQ file as a template to modify my C# code to handle this event.
06-02-2010 01:21 PM
06-02-2010 02:30 PM
private void axExecutionViewMgr_Trace(object sender, _ExecutionViewMgrEvents_TraceEvent ev)But ev.ctxt.PreviousStep is a ReadOnly property, and I can not change its ResultStatus. So I was looking for a different event that would get raised at the end of every step and would allow my event handler method to manipulate the ResultStatus property.
{
string runMode = ev.ctxt.PreviousStep.GetRunModeEx(System.Type.Missing);
if (runMode == RunModes.RunMode_ForceFail)
ev.ctxt.PreviousStep.ResultStatus = "ForcedFail";
else if (runMode == RunModes.RunMode_ForcePass)
ev.ctxt.PreviousStep.ResultStatus = "ForcedPass";
}
06-03-2010 08:16 AM
06-03-2010 08:31 AM
tlaford wrote:
Approaching the issue from the opposite direction: Is there a way to tell TestStand to flag a ForcePass/ForceFail with a different ResultStatus string, or some other way that can be used when parsing the "ResultList" in an EndExecution event handler?
Yes, that's precisely what the callback I posted does. Did you look at it and see if it does what you're looking for?