I want to print the exact text as the file "basic_text_info.txt" to my customized tear down method. how can i do that? #1604
-
Hello sir, The below logs is from archived_logs>basic_test_info.txt and i want to use that in my different file
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
If you call def tearDown(self):
# do things before regular tearDown()
super().tearDown()
# do things after regular tearDown() This will get you the full folder path where the individual test logs are stored per test: import os
os.path.join(os.path.abspath("."), self.log_path, self._BaseCase__get_test_id()) Remember that |
Beta Was this translation helpful? Give feedback.
-
And i also want to add below part of html report to allure report |
Beta Was this translation helpful? Give feedback.
If you call
super().tearDown()
from your customizedtearDown()
method, then thebasic_text_info.txt
file will be generated if the test has failed, and then you can use Python File-IO to get the data from thelatest_logs
folder.This will get you the full folder path where the individual test logs are stored per test:
Remember that
basic_text_info.txt
is only generated for failing tests.