Summary
Question
This method doesn't validate or compare anything, it simply prints the message with the given values and shows a pass or fail criteria
(this is similar to UFT's Reporter.ReporterEvent )
Notes:
- Except for StatusEnum, all the arguments are string values and have no relevance on the
pass or fail status of the message
- Checkpoint.Report can only be implemented in a CheckpointEvent
- The values for StatusEnum.X are found in object HP.ST.Fwk.RunTimeFWK.CheckpointFWK
Answer
Samples
1. Define a CheckPointEvent
2. Copy / paste the following code
public void CodeActivityX_OnCodeCheckPointEvent(object sender, CheckpointEventArgs args)
{
//assign StatusEnum pass and fail object values
var vPass = HP.ST.Fwk.RunTimeFWK.CheckpointFWK.StatusEnum.Succeed;
var vFail = HP.ST.Fwk.RunTimeFWK.CheckpointFWK.StatusEnum.Fail;
//Display StatusEnum values
this.Context.UserLogger.Info(" - Act6.Check: StatusEnum.Succeed: '" + vPass + "'"); //Succeed
this.Context.UserLogger.Info(" - Act6.Check: StatusEnum.Fail: '" + vFail + "'"); //Fail
//Sample checkpoints
//1. pass 4 arguments
args.Checkpoint.Report("act text1", "exp text1", "logical oper1", vPass);
//2. pass 5 arguments
args.Checkpoint.Report("method2", "act text2", "exp text2", "logical oper2", vPass);
//3. pass 6 arguments
args.Checkpoint.Report("method3", "act text3", "exp text3", "logical oper3", "details3", vPass);
//4. pass 7 arguments: Pass
args.Checkpoint.Report("method4", "act text4", "exp text4", "logical oper4", "detail4", "pro4", vPass);
args.Checkpoint.Report("method5", "act text5", "exp text5", "logical oper5", "details5", "prop5", vFail);
}
OUTPUT:
TEST RESULTS:
DISCLAIMER OF WARRANTY
The example software is experimental and is provided as a courtesy, free of charge, "AS-IS" by Micro Focus. Micro Focus shall have no obligation to maintain or support this software sample. MICRO FOCUS MAKES NO EXPRESS OR IMPLIED WARRANTY OF ANY KIND REGARDING THIS SOFTWARE SAMPLE. MICRO FOCUS SHALL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES, WHETHER BASED ON CONTRACT, TORT OR ANY OTHER LEGAL THEORY, IN CONNECTION WITH OR ARISING OUT OF THE FURNISHING, PERFORMANCE OR USE OF THIS SOFTWARE SAMPLE.