Ad Home

Theme images by kelvinjay. Powered by Blogger.

Travel

Header Ads

Java

Selenium

UFT

Framework

General QA Concept

BDD

» » Test Script Language Part-2/General Rules for TSL

Well, let me talk about some general rule about TSL:

1.Semicolon after every valid line..

Ex:

if (j>8) then
{
do this ;
}

2.Compound statements or Complex statements use curly braces and not semicolons

Ex:
See the above statement where if (j>8) then is a complex statement which is guiding the next statement ,...is braced with {}.

3.TSL is a case sensative language.

Ex:
Most of time it is lower case. The best practise will be to use a lowercase most often

4.Comments will be started with "#". Anything after this "#" will be ignored by the interpreter.If it is placed in the first character of the line then it comments all the line...called a line commenter or full commenter

if it appears inbetween of the line,it comments the characters after "#" till last character of that line.

Multiline comment is not supported by TSL.

Ex:
# this is a sample test script created by ani01104 on 12-09-09....Full Comment

if (a>9) then # to check if the value is greater than 9........Partial comment
{
do this ;
}



5.Do a structured test script while you create multiline complex scripting.
EX..
if (a>9) then
{
do this;
if (a=14) then
{
do something;
}
}
what i mean here is to indent the code

6.Try dong a version Control while changing a code.

Ex:
# Wrote login function on 12-05-09
# Modified the button press on 19-05-09

See more on Naming Convention

«
Next
Newer Post
»
Previous
Older Post

No comments:

Leave a Reply