python-behave

Need to print logs from behave step files


I am trying to print the - print statements in python behave step files, meanwhile i do not want to print the traceback errors. I used behave.ini file with stdout_capture=False setup. It helps to print the print statements in the step file but along with it, it also prints the traceback errors. I do not want this to print and want only output the print statements mentioned in the step files. Is there any way to do it ?

I used below command. behave exmaple.feature --logging-level= ERROR


Solution

  • Try to add this to behave.ini
    stderr_capture = no

    refer the below documentation: https://github.com/behave/behave/blob/master/docs/behave.rst#configuration-files