07-31-2017 07:12 AM
Hello,
I'm using TS 2014 and custom OI GUI on C#.
I've implemented UIMsg_ModelState_TestingComplete and successfully get status of my <Stop On Fail> test sequence by calling uiMsg.StringData.
In case the sequence is failed I'd like to display the name of the failed step. How can I do this?
Thanks
08-01-2017 08:58 AM
Where do you want to display it at? In a popup? Or just on a form control? Or in the Status Bar?
08-01-2017 09:58 AM
You should work throught the Black UI example contained here.
08-01-2017 11:55 PM
I'm going to display it on the DataGridView form control
08-02-2017 05:02 PM
Hi airspan,
Have you had a chance to look through the example Norbert linked to?
Justin
Applications Engineer
National Instruments
08-02-2017 06:00 PM
I'm not well versed in C# but have you seen this: https://stackoverflow.com/questions/479329/how-to-bind-a-liststring-to-a-datagridview-control
I think what you need to do is in the UI Message callback set your datagridview to a dataset that contains the name of the failed step.
08-02-2017 06:03 PM
To be a little more specific:
If you are dead set on using that UI message you referenced then you would get the ActiveXDataParam as the sequence context. This will then give you access to the MainSequence result list. You would need to recurse through that and look for the step that caused the failure. Once you have that step or steps then you would create a List that can become the dataset for your DataViewGrid.
08-03-2017 04:22 AM
To add to jigg's reply with the dead set to this UI Message:
It is not sufficient to identify the first failing step. You have to verify that this step was causing the sequence to fail (step setting: Step Failure Causes Sequence Failure).
08-03-2017 06:54 AM
My problem is getting access to MainSequence result list. I didn't understand what exactly I have to do...
08-03-2017 08:48 AM
There are 2 ways to get access to the MainSequence result list.
ThisContext.Locals.ResultList[0].TS.SequenceCall.ResultList
OR
RunState.Sequence.Main["MainSequence Callback"].LastStepResult
Hope this helps,