1
votes

I want to limit the keywords that are reported in the output.xml / log.html Something like, I don't want to log keywords like SET VARIABLE or QUERY, etc., but log only specific keywords that create a meaningful test report

checked multiple questions on StackOverflow How can I prevent the logging of all keywords except Log keyword in robot framework?

How can I tell robot framework not to log a keyword? This provides a very close answer at the end, but it is not working and getting into the LOGGER is perhaps not my cup of tea

Have tried FlattenKeywords, removekeywords options, but they dont completely help, as I need more dynamic control over the logging

Tried the SET LOG LEVEL keyword also, but that just removes the information within the keyword, does not remove the whole keyword

Expected results should log only the specific keywords that i mention in the script, something like only the checkpoints are reported and not all the steps

1

1 Answers

1
votes

If --removekeywords and --flattenkeywords don't work for you, I can think of two possible solutions.

For one, you could write your own script to filter out all the keywords you don't want from output.xml, and then generate the log.html and report.html after you've run the filter.

You could also create your own log file. You can create a listener that can decide at runtime whether a keyword should be logged or not. You can then write the keyword information to your own custom log file.