LDTP
3.5.0
|
ldtplog('<Message to be logged>', '<tag>')
where tag can be any of these
messages can be logged while executing in debug mode
warning message can be logged
tag used to indicate the beginning of the test suite
tag used to indicate the end of the test suite
tag used to indicate the beginning of test case
tag used at the end of the test case
error messages can be logged with this message
message will be logged on successful execution of the testcases
message will be logged on if execution of testcases fail
begin and end: These keywords are to be used with the same logging message and at beginning and end of testscripts
teststart and testend: These keywords are to be used with the same logging message and at the beginning and end of testcases
Logs the message in the specified log file in LDTP engine side, with the tag which can be viewed after the execution of scripts
The required message will be logged into the log.xml on execution of scripts
1 | on success and 0 on error |
With Respect to Evolution:
1) ldtplog('EvolutionSuite', 'begin')
execfile('evolution.py')
ldtplog('EvolutionSuite', 'end')
2) With respect to Appointment-to check the checkbox,
In Try Block:
selecttab('dlgAppointment-NoSummary', 'ptlAppointment-Nosummary', '1')
ldtplog('Selecttab-In-Appointment', 'pass')
In except block:
print "Error"
ldtplog('Selecttab','fail')
3) With respect to creation of vFolders
ldtplog('Creation-of-vFolders', 'teststart')
Create_folder()
ldtplog('Creation-of-vFolders', 'testend')
4) Log message showing success of some test case
from ldtp import *
You can log the message to start the test case before writing the test case as
ldtplog('Open a file', 'teststart')
ldtplog('opening a file', 'pass')