Logo Search packages:      
Sourcecode: ldtp-doc version File versions  Download package

ldtplog

Syntax

ldtplog ('<Message to be logged>', '<tag>')

where tag can be any of these

debug

messages can be logged while executing in debug mode

warning

warning message can be logged

teststart

tag used to indicate the beginning of the test suite

testend

tag used to indicate the end of the test suite

begin

tag used to indicate the beginning of test case

end

tag used at the end of the test case

error

error messages can be logged with this message

pass

message will be logged on successful execution of the testcases

fail

message will be logged on if execution of testcases fail

Note:
Messges for the Tags teststart and testend should not contain spaces in between
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

Description

Logs the message in the specified log file in LDTP engine side, with the tag which can be viewed after the execution of scripts

Implementation

The required message will be logged into the log.xml on execution of scripts

Return values:
1 on success and 0 on error

Example

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')

Author:
Nagashree <mnagashree@novell.com>

Generated by  Doxygen 1.6.0   Back to index