How to log lower keywords in console log?

Hello,

I am organizing the suites by using only one keyword per test case and placing all the steps in another file to keep the suite file more organized. However, I am not able to see the lower keyword steps in Jenkins. Is there any way to log the lower keyword steps in Jenkins without editing the structure?
I will give an example,

SUITE FILE

TC001 Approval Pocess
[Arguments] …
[Documentation] For Approval
Approval Process for Salesforce App

KW FILE
Approval Process for Salesforce App
Step1
Step2
Step3
.
.
.
Step20

CONSOLE LOG in JENKINS
2024-02-20 08:22:50.588493 [PID:8880] [3] [ID:10] still running SuiteFile.Approval Process for Salesforce App after 62790.0 seconds

What I want to see in Jenkins is the step logs. Is there any way to do this?

hi,

Currently I use Listener to achieve that. In the start_keyword function, I print the keyword.name.

Additionally, because of python buffer behavior, I have to set the PYTHONUNBUFFERED=true on Jenkins to show the log in real-time. If not, you’ll see the printed steps after the job is finished.

3 Likes

Hey @Dex,

Thank you very much, I don’t want to implement the listener for now. But your suggestions directed me to the real source of my problem and I could solve it. :+1:

2 Likes