In my teststand sequence there is a pass/fail test. When the test fail, a fail test message pop up. I would like to add the comment to this dialog but I don't know how to input the message. Please tell me how.
Beside this I would like to understand why there is a sentence "The sequence has not failed"? In Run Options tab, I have Step Failure Causes Sequence Failure checked.
that's looking like a custom popup from either a custom step or a post action or somewhere else in the sequence file callbacks or the processmodel callbacks for post step failure. My guess would be the last one since this looks like an architecture that allows for multiple retries, but that's just a guess. One easy check may be to run the sequence without the process model, or look for a sequence called "SequenceFilePostStepFailure" in your client sequence file.
Given the timing of when this comes up, the step failure may not have yet caused the sequence failure - open up the TestStand help file and go to search - type in "Step Execution" and somewhere not far from the top of the list will be one titled "Step Execution". Within that Action list, the step evaluates the status expression around action number 18 (depends on version of TestStand - I've currently got TestStand 2012 open) and then at action number 20, it runs any post step failure engine callbacks related to looping steps. If this is where your message popup is living, then it's checking on the flag for the sequence failed too early - that occurs around action 27 for a full step (i.e. after any looping is finished) and then action 28 would call the post step failure callback which should show as the sequence has been appropriately marked. It may be that the message popup step is not quite looking in the correct place for the evaluation on the sequence having failed at this point.
Can you post a cut down sequence and your process model so we can see what the configuration is like so we can advise?
I followed your instruction and look into "SequenceFilePostStepFailure". I found it use Step.AsPropertyObject.Comment so I can modify the comment now.
As it is in SequenceFilePostStepFailure, I would like to know how can I move it to the right action as you say? Is it the name of the call back we should use?
Thank you very much!
Do you want the operator to be able to type a comment? If so you need to enable the response for the message popup.
Or are you trying to get the Step Comment property? Seems like that would be useless to know that information for this dialog.
One more thing:
This example shows how to do all this: http://zone.ni.com/reference/en-XX/help/370052K-01/tssuppref/infotopics/callbacks_sequencefilepostst...
Hope this helps,
I would like to inform user why the test failed with a custom string input. For example scan a wrong barcode, I would like to show what is the scanned barcode is.
Generally the Comment property for a step is used by the developer to describe information about the step for maintenance purposes.
The problem with your request is that you would like to somehow dynamically generate a string that contains values from variables. The question is: how do you know which variable to put in there? How do you know what message to give the user? Potentially any step can fail and cause this dialog to appear. Without some sort of Lookup Table or database or something that defines what the comment should be you cannot just magically create that dialog for individual steps.
Is that dialog just a simple message popup? Or is it calling a code module?