Ask a Question

Can you manually for a checkpoint in the log for anything?

SOLVED
autoguy1
Occasional Contributor

Can you manually for a checkpoint in the log for anything?

Let me give my scenario to make this more clear. Currently I have a situation when I am exporting a report to a CSV, creating a list of all data from that CSV and comparing it to an expected list. 

 

Currently I have something along the lines of:

if list_a == list_b:

     Log.Message("The two lists match")

It is more complex than this but basically this is it.  

The fact this data matches is the main point of the test and instead of just a log message I would like there to be the green checkbox symbol in the test results. This is just to help identify critical steps in tests, particularly those tied to requirements. 

 

Is there a way to do this?

4 REPLIES 4
autoguy1
Occasional Contributor

I just had a random thought to check if there is a Log.Checkpoint function. There apparently is. I guess I answered my own question. 

you are indeed correct, this is a checkpoint

 

Log.Checkpoint("List A" == "List A")

Lee_M_1-1635408262523.png

 

Log.Checkpoint("List A" == "List A")

Lee_M_3-1635408351845.png

 

Consider; your required solution may need a little more coding

  var lista = "my csv list";
  var listb = "my csv list";
  
  if (lista  == listb) {
    Log.Checkpoint ("List A is the same as List B")
  } else {
    Log.Error ("List A and List B are not equal !")
  }

 

autoguy1
Occasional Contributor

Thank you Lee, my solution already has if else statements with error logging, stating what exactly what elements are included that shouldn't be or should be included that are missing.  I was just trying to keep my summation brief and not really bog it down with details. 

 

Thank you for the extra info that you can put the actual validation in the checkpoint. 

That's what the community is for, happy we can help

cancel
Showing results for 
Search instead for 
Did you mean: