Report successfull validate values
Posted: Mon Apr 12, 2010 5:21 pm
Hello,
I would like to be able to do the following but I'm not quite sure how to do it. I would like to report more than just the standard message that is displayed when a successful validation takes place.
I would like it to say the validation was complete and list the value it expected and the value it found. Almost exactly like the message that is displayed when there is a failure. The reason I would like this is because I have a combination of 4 values making up one test item so when I do have a real failure I would like to be able to duplicate the problem manually using the exact same 4 values that were entered during the automated step. Some of the values I am using are used multiple times in multiple combination's so I can't simply search for the failed item in my csv file and know which item it was associated with because it may have multiple entries.
Make sense?
Here is what my current reporting code looks like in my program.cs.
I would like to be able to do the following but I'm not quite sure how to do it. I would like to report more than just the standard message that is displayed when a successful validation takes place.
I would like it to say the validation was complete and list the value it expected and the value it found. Almost exactly like the message that is displayed when there is a failure. The reason I would like this is because I have a combination of 4 values making up one test item so when I do have a real failure I would like to be able to duplicate the problem manually using the exact same 4 values that were entered during the automated step. Some of the values I am using are used multiple times in multiple combination's so I can't simply search for the failed item in my csv file and know which item it was associated with because it may have multiple entries.
Make sense?
Here is what my current reporting code looks like in my program.cs.
Code: Select all
}
catch (ImageNotFoundException e)
{
Report.Error(e.ToString());
Report.LogData(ReportLevel.Error, "Image not found", e.Feature);
Report.LogData(ReportLevel.Error, "Searched image", e.Image);
error = -1;
}
catch (RanorexException e)
{
Report.Error(e.ToString());
Report.Screenshot();
error = -1;
}
catch (ThreadAbortException)
{
Report.Warn("AbortKey has been pressed");
Thread.ResetAbort();
}
catch (Exception e)
{
Report.Error("Unexpected exception occured: " + e.ToString());
error = -1;
}