Hello friends,
I am trying to create my own log file and report by using custom listener. Currently i am overiding start suite and end suite methods.
def start_suite(self, name, attrs):
def end_suite(self, name, attrs):
using start_suite method to create a new log and report file and end_suite method to close the log and report file.
In between i am writing in to the log and report files during the course of test run by overiding some more method of start_test, end_test, start_keyword, end_keyword.
The reason why we wanted the custom log and report file is we are using the unix platform and these files should be .txt and should be having very minimal information as per my project need.This needs to be integrated in to the different quality dashboard.
i am creating a new report and log file for each test run. All looks good till here as long as i specifiy a single .robot file when running robot tests as below.
python -m robot.run -i devicecapability --listener path\customListener.py --loglevel INFO --listener path\customListener.py path\caf.robot
But if am providing suite parameter which has many sub suites under it, it is generating multiple report and log fles files one for each suite.
running a suite as shown below.
python -m robot.run -i tagname --suite nextGenAutomation.testSuites <pathtotestsuite\workspaceRobotframework\nextGenAutomation>.
Any pointers on what is the good way to generate your own log files and report files. Which is the listener method which gets called only once during the whole test run as part of the test execution where i can create or initialize my log and report file for each test execution.