Configuring log options
When working on new tests or debugging existing ones, the logs are usually a good indicator of what is going on while a test is being run and what happens if it fails. While we see them on the command line when running a test there, they are also usually stored within the Maven project’s target
directory – the standard directory that is created when running the test project via Maven:
Figure 5.1 – karate.log within the target directory
Now, let’s look at log levels and what they mean!
Understanding log levels
Log levels determine which kinds of logs you want to include in the output. Karate uses the logging library Logback, which supports multiple log levels: TRACE
, DEBUG
, INFO
, WARN
, and ERROR
. These get less verbose from left to right and determine the scope and purpose of each log entry. The most common one is INFO
, which indicates a log output that prints out the basic actions and values that...