Forum Discussion

TAHbKA's avatar
TAHbKA
Occasional Contributor
14 years ago

Test log question

Is it possible to add to error/message/checkpoing/event/warning more features? If it is - can someone please point me to the appropriate documentation (afraid didnt find anything useful on that in the logs help)



10x

9 Replies

  • If you are using Keyword testing you can use From keywork you can add log messages and checkpoint from operations. On the left side of workspace you can find these options.



    If you using script you can use log fucntions to enter log messages and checkpoints



    Log.Message("You message");

    Log.Checkpoint("Checkpoint criteria")



    You can find more help on these fucntions in Test Complete help. Just select Log in the script and press F1. It will give you more help.



    I hope this solves your query.



    Regards,

    Saurabh
  • TAHbKA's avatar
    TAHbKA
    Occasional Contributor
    Saurabh, this is exactly what I didn't ask. I want to add to a log something that is NOT message/checkpoint/error/warning/event. Say, `success' or  `fail' that are not `checkpoint' nor `error'. I didn't find it in help provided with the F1 mentioned.
  • I am still clear about your question. Generally Logs are used to provide execution details and appending error messages etc. As i can get from your questions you dont want to add Error/Warning/Messages/Checkpoint/Event in your logs.

    can you be more specific about what do you want to add? If you just want to say "Success" or "Fail", i assume it is message and can be append in logs using Log.Message fucntion.

    can you please provide more info?



    regards,

    Saurabh
  • TAHbKA's avatar
    TAHbKA
    Occasional Contributor
    Saurabh,

    think I was clear enough with what I want. I want all the messages that appear in the log now and some additional ones. I.e. I do want all the `Errors'/`Warnings'/`Checkpoints' etc to appear as they do now, and in ADDITION I want some fields of my own. Yes, I can write

    Log.Message("Success"), but I want to be able to use filtering that is provided with `error'/`warning' etc. I.e. I will want to see the whole log, my boss will only want to see the `fail'/`success' part.
  • Hi Tanya,



    IIn testcomplete Test Log window you can select and deselect options based on your requirements. You can select Messages checkbox there and deselct all the other options.

    Please see the attached snapshot. Please let me know if it solve your problem?



    Regards,

    Saurabh
  • TAHbKA's avatar
    TAHbKA
    Occasional Contributor
    Saurabh,

    no, it's not what am asking. You keep writing things that appear in the documentation. Thank you very much, those I read. It is NOT what I was looking for.
  • Hi Tanya,



    Is using the Filter dialog along with the possibility to customize execution logs through the Log object what you want? Note that you can point out your custom messages by customizing the font appearance (change its color, make it bold or italic, and so on). This can be done by customizing a LogAttributes object that is passed to the Log.CreateFolder, Log.Error, Log.Warning, Log.Message, Log.Event, Log.Picture, Log.File or Log.Link method as the Attr parameter.
  • TAHbKA's avatar
    TAHbKA
    Occasional Contributor
    Mike, thank you! That answers 50% :)

    Even when using different fonts/colours I still will not be able to choose (in the screenshot Saurabh  posted above) to show, say, only messages written in purple, right?
  • Hi Tanya,



    You can try setting such messages priority to pmHighest and then, apply a filter that will display only messages with the highest priority.