Forum Discussion

jsc's avatar
jsc
Regular Contributor
11 years ago
Solved

create a passed checkpoint from script

Hi all,



can I somehow create a passed checkpoint from scripts?



Currently my code looks like this:




 if (averageOpenTime > allowedTime)


    Log.Error(some text);


else


    Log.Message(some text);



Is it somehow possible to create a passed checkpoint (instead of the Log.Message entry) that will be shown as a green passed checkpoint in the keyword tests?

 


Best regards,

Joachim

  • Hi Joachim.



    Have you tried Log.Checkpoint() instead of Log.Message() in your script?





9 Replies

  • Hi Joachim.



    Have you tried Log.Checkpoint() instead of Log.Message() in your script?





  • AlexKaras's avatar
    AlexKaras
    Champion Level 3
    Hi Joachim,



    According to my knowledge, there is no checkpoint to compare two variables, but I would love if SmartBear adds such type of checkpoint to be able to have a consistently looking log where all evidences of passed/failed verifications have a unified view of passed/failed checkpoints.
  • jsc's avatar
    jsc
    Regular Contributor
    Yes, this would be great.

    Is there some feature-request-overview where I can vote for this or suggest this?
  • jsc's avatar
    jsc
    Regular Contributor
    Hey Andrey,



    this is great, I did not know Log.Checkpoint, just knew (Warning, Error, Message (as shown in keyword tests).

    But the idea of an extra variable checkpoint is still great. So I would not have to code a if then else but just call Log.Checkpoint(var1, var2).



    Best regards,

    Joachim
  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)

    Hi  Guys,


     


    I have registered a suggestion to implement the Variable Checkpoint in our DB, and added 2 votes to it.


    Thanks.


     


    At the moment, you can use Andrey's suggestion.


     

  • jsc's avatar
    jsc
    Regular Contributor
    Hey Tanya,



    I just registered a idea proposal as well.

    Could you delete this duplicate?



    Best regars,

    Joachim
  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)

    Hi Joachim,


     


    I've asked people from Customer Care to close the case.