Forum

Forum Navigation
You need to log in to create posts and topics.

New custom log function $util.log()

We have released a new custom log function to help you troubleshoot. Normally we try to log all things that will be helpful for you to find issues in your tests. We have noticed that sometimes it's important to log data we didn't anticipate. We therefore launched a new utility function to help you with this

$util.log();

Note: Remember to select checkbox "Run on IDE" in Javascript dialog to make sure it runs correctly. 

In any Javascript function you can use this function to log data, and it will show up in the Boozang console and the Jenkins CI logs. Some examples

$util.log("I am a log message");
$util.log("another message");

will result in the following log output

BZ-LOG: I am a log message
BZ-LOG: another message

You can also log variables

$project.price=5.99;
$util.log($project.price);

This will result in 

BZ-LOG: 5.99

You can also combine name-value and log whole data structures

$project.product={name:"Product 1", price: "4.99"};
$util.log("product",$project.product);

This will result in a response

BZ-LOG: product
{
  "name": "Product 1",
  "price": "4.99"
}

We hope this will be useful to help debug tests. 

 

Try Boozang today

Codeless testing that works. No credit card or commitment required.