You are on page 1of 15

Features of Silk Test: Product : Seague Software Version: 7.

1 Latest Version: 2006 Purpose: Functionality and Regression Testing Tool Kinds of Application: All kinds of Application (Both Window Based and Web Based Application) Platform Independent Tool Language: 4 Generation Language Components of Silk Test: Silk test Host S/w: The Host is the Software that is used to create and modify the test plan , frame, script, suite files. It is mainly used to interact between the application under test (AUT) Silk test Agent S/W: The Agent is the software process that translates the commands in your 4Test scripts into GUI-specific commands. In other words, it is the Agent that actually drives and monitors the application you are testing. Silk Test Process 1) Creating a Test Project 2) Creating a Test Plan 3) Recording the Test Frame

references testcases and allows execution of testcases according to the testplan detail. such as test plan. Description. Project Files will be stored in the extension .4) Creating Test Script 5) Modifying The Test Script 6) Executing the Test Script 7) Analyse the Test Result Project: Silk Test project Contains a relevant information about the project including references to all the Resources associated with a test set. Data.pln File  New  Test Plan  Design the Test Plan Recording the Test Frame Recording a test frame will create a Include file automatically captures a declaration of the AUT’s main window.vtp(verify test project) Creating a project: File  New Project  Select Create Project  Specify the Name of the project . Location of the project Click OK Creating a Test Plan Testplan is an outline that organizes and enhances the testing process. scripts. 1. frame file.File  New  Test Frame 2.Start  programsSilk Test  Sample Application  Text Editor . Test plan is stored in the extension . Results.

written in 4Test language.Rightclick-> Test Plan->test detail->browse the script->browse the test cases .Record Testcase  Start Recording  perform some task in the application 4.outline-> Move Left or outline-> Move Right 5. The way the application is getting opened in silk test is called Base State 1. that verify the behavior of the AUT.3. 5.Record Status window click Done.Specify the Menu’s and Sub menu’s(object) 3.To align the object 4. Analyse the Test Result: Is automatically created to store a history of results for a testplan or script execution.inc Creating Test Script Contains recorded and hand-written automated testcases .Save the Test Script 3.Paste to Editor Test script must be stored in extension . Quality Organiser: It is the process of linking the test script and run the test script as per the test plan 1.t Executing The Test Script It is the process of running the testcase.Place The Application in the Application area of the Test Frame Test Frame is stored in the extension .File  New Test Plan 2.File  New 4 Test Script 2.

Record Status window click Done.Save the Test Script 3.run the testplan Application State: An application state is the state you want your application to be in after the base state is restored but before you run one or more testcases.Save the Test Script 3. Default Base State 1.6.Run the test in the opened application Verification Point: .File  New 4 Test Script 2. 5. 5.Paste to Editor 6.Paste to Editor b. a.Record Status window click Done.Record Testcase  Start Recording  perform some task in the application 4. None Open the Text editor Application File  New 4 Test Script 2.Record Testcase  change the Application State As “None”->Start Recording  perform some task in the application 4.

Bitmap verification point Object Verification point : It captures the objects presented in the application under test.place the cursor in list of file type 4.press ctrl+Alt 5. Drop Down List Box… 1.In the verify window change the properties name(Enabled.In the verify window change the properties(Content property) Menu Verification point: It captures the menus presented in the application. Object data verification point is mainly used to test the object that contain multiple values like for eg: Combo Box.press ctrl+Alt 4.record->start recording 3.Object verification point 2. It checks the properties of the menu presented in the application .record->start recording 3.It is the process of checking the Expected result versus Actual Result 1.object data verification point 3. It compares the data presented in the object.Menu verification point 5.File->open .open the test script 2.Alphanumeric verification point 4.visible) Object Data Verification point: It captures the object presented in the application under test. It compares the properties of an object 1.open the test script 2.

data types and functionality that you would expect from a leading-edge programming language.open the silk test Bitmap Tool.open both the Images(File->open) 4.record->start recording 3.record->start recording 3.Type some Text in the Text Area 4. whether recorded or scripted.Create Two Bitmap Images 2. are created using 4Test. It is mainly used to test the Confidential information of the application 1.In the verify window change the properties Menu(Interchange the position of menu’s) Alphanumeric Verification Point: It is used to check the field contains alphabetic or numeric data. All tests within SilkTest.open the test script 2. 1. 3.Place the cursor in the menu bar 4.select differences->show 4th-Generation Language: SilkTest’s 4Test language is an object-based fourth-generation language (4GL) designed specifically to meet complex testing needs.press ctrl+Alt 5. Data Types: It is used to store the appropriate data in the specified type . 4Test includes a set of statements.1. operators and data types that add structure and logic to recorded testcase.open the test script 2.4Test language offers all the commands.press ctrl+Alt 5.In the verify window change the properties (Multitext) Bitmap Verification point: It compares the two images presented in the application and show the differences between the two images.

i>=1.i--) [ ] print(i) ----------------------------------------------[-] testcase ForeachEx() [-] list of string tools={..} .reterive the row value BASIC: [-] testcase addition() [ ] integer a = 10 [ ] integer b = 20 [ ] integer sum [ ] sum=a+b [ ] //print(sum) [ ] print("Value of sum is {sum}") ---------------------------------------------[-] testcase ForEx() [ ] integer i [-] for(i=10.• • • • • • • • • • • • • • • • • • INTEGER -NUMBERS REAL -Number NUMBER -Number DATE -Date TIME -Time STRING-Alphabets WINDOW – Name of the window DATETIME-date and Time ANYTYPELIST-Any data ARRAY -Collection of Data BOOLEAN -True or False SET -used to set some value BROWSERTYPE-Returns browser Name DATACLASS-parent window LIST-List of items LONG -Numbers TABLECOL -reterive the column value TABLEROW..

[ ] "WinRunner" [ ] "SilkTest" [ ] "Rational Robot" [-] string t [-] for each t in tools [ ] print(t) ---------------------------------------------[-] testcase WhileEx() [ ] integer num=10 [-] while(num>=1) [-] if num%2 !=0 [ ] print("{num} is Odd") [-] else [ ] print("{num} is Even") [ ] num---------------------------------------------------[-] testcase IfEx() [ ] integer a=10 [-] if a%2==0 [ ] print("Even") [ ] print (a) //prints the value of a [ ] print("The Value of a is {a}")// prints a string along with the value [-] else [ ] print("Odd") [ ] print (a) [ ] print("The Value of a is {a}") ------------------------------------------------------[-] testcase switchex() [ ] string str="a" [-] switch(str) [-] case "a" [ ] print("It is a Vowel") [-] case "e" [ ] print("Vowel") [-] case "i" [ ] print("Vowel") .

Paste to Editor 6.Select the keyword Right click select Data driver testcase.Record Status window click Done.close the application 6. 5.[-] default [ ] print("It's Not a Vowel Char”) Data Driven Test Case: It is used to pass Multiple Values to the Field under Test.Save the Test Script 3.Record Status window click Done.do .Paste to Editor 8.Save the Test Script 5.Record Testcase  Start Recording  Type some Phrase search->find specify the word for search. 1. 7.Create the data source name(DSN) 3. 1.Record Testcase  Start Recording  perform some task in the application and save the script 4.Create the database(With the Field name as Find) 2.File  New 4 Test Script 2.File  New 4 Test Script 4. Exception Handling: An Exception is an interruption occurs while running the program To overcome the exception we need to perform some Recovery procedures.

3. file->new->4test script use “userdefinedfilename.SetActive() MessageBox.testplan FUNCTIONS: 1. [-] Integer max1(integer a.User Defined function [ ] //Example For Userdefined Functions 1.Click() Regression Testing: It is used to call multiple test script and execute into a single suite file.file->new->4test include file. File->new->suite->Type the script name Run the script.integer b) [-] if(a>b) [ ] return a [-] else [ ] return b 2.inc” [-] testcase Sample() [ ] integer a=30 .save the file.Yes.----------------Except MessageBox.

5) ) // prints: World [ ] Print (Right (s.Predefined Function: String Functions: [+] testcase s1 () [-] STRING s = "Hello World" [ ] Print (Right (s.") [+] testcase s6() [-] STRING s3 = " Has whitespace " [ ] Print( ">{RTrim(s3)}<") // prints: > Has whitespace< [-] Print ("12345678901234567890") . 2. 20) ) // prints: Hello World [+] testcase s2() [-] STRING s1 = "Segue Software" [ ] Print (Left (s1. 4)}. 20)) // prints: Segue Software [+] testcase s3() [-] STRING sName [ ] sName = "Segue" [ ] Print (Len (sName)) [+] testcase s4() [-] STRING s2 = " Has whitespace " [ ] Print( "{LTrim (s2)}") [-] STRING s6 = " Has whitespace " [ ] Print( ">{Trim(s6)}<") // prints: >Has whitespace< [+] testcase s5() [ ] Print ("Four A's -> {Replicate ("A".[ ] integer b=20 [ ] integer ret [ ] ret=max1(a. 5)) // prints: Segue [ ] Print (Left (s1.b) [ ] print("Maximum number is {ret}") save the file.

Left. "and".Returns the left-most characters of a string. "&" )) [ ] // prints: one & two & three Right -Returns the right-most characters of a string. StrTran . [-] STRING s5 = "one and two and three" [ ] Print (StrTran (s5.boo2 [ ] print(GetField(str1.Strips leading whitespace from a string.Returns the length of a string.[ ] Print ("12345" + Space (10) + "67890")//Returns the specified number of space characters. Ltrim .Strips trailing whitespace from a string. s4)) // prints: 8 [ ] //search backward to find second occurrence of "the" [ ] Print (StrPos ("the". TRUE)) // prints: 25 [ ] Print (StrPos ("x".Returns the position of the specified substring.digit [ ] boolean boo1.Replicates a string the specified number of times. [+] testcase s7() [-] STRING s4 = "now is the time for all the good men" [ ] //search forward to find first occurrence of "the" [ ] Print (StrPos ("the".Searches for and replaces characters in a string.Strips leading and trailing whitespace from a string. Space .[-] testcase StringFun() [ ] string str1="WinRunner|SilkTest|Astra QiuckTest" [ ] string str2="Welcome" [ ] boolean boo. s4."|". Replicate . Rtrim . Len . s4)) // prints: 0 [ ] //Searches for and replaces characters in a string. Strpos . 2. Trim .Returns the specified number of space characters.2)) [ ] print(len(str2)) [ ] boo=IsAlpha("Hello") [ ] print("Value of IsAlpha is {boo}") [ ] digit=IsDigit("23ddff") [ ] print("Value of Isdigit is {digit}") .

File Handling: Fileopen. Matchstr . IsList.Tests whether the first character of a string is a digit. IsDigit.Tests whether the first character of a string is a whitespace character.Closes a file on the host system. FileClose.. .} []1 []2 []3 [] [ ] INTEGER i = 0 [ ] Print (IsList (liItem)) [ ] Print (IsList (i)) Get Field .Tests whether an expression is a list. IsAlpha.Returns a segment (field) of a string... IsArray-Tests whether an expression is an array.Tests whether the first character of a string is an alphabetic character.[ ] boo1=IsSpace(" ") [ ] print("Value of IsSpace is {boo1}") [ ] boo2=Matchstr("*Hello*"."Hi Hello there") [ ] print("Value of Matchstr is {boo2}") [ ] INTEGER i = 1 [-] ARRAY[2] OF STRING asFruit = {..} [ ] "apples" [ ] "orange" [ ] Print (IsArray(asFruit)) [ ] Print (IsArray(i)) [-] LIST liItem = {.Opens a file on the host system.Looks for a pattern in a string. IsSpace .

Reads structured data (for example. DTP_YEAR) [ ] print("Output of GetDateTimePart is {dd}") .FM_APPEND) [ ] FileWriteValue(FileHandle.2) [ ] print("2 days will be added to the Current Date {dt}") [ ] string format=FormatDateTime (dtnow.FM_WRITE) [ ] FileWriteLine(FileHandle. a 4Test record) directly to a file on the host system.c) [ ] FileClose(FileHandle) [ ] String SLine [ ] FileHandle= FileOpen("C:\SilkTest.txt"."hh:mm:ss AM/PM") [ ] print("Changed Date Format is {format}") [ ] integer dd=GetDateTimePart (dtnow.Returns the next line of a file on the host system.SLine) [ ] print("Line is {SLine}") [ ] FileReadValue(FileHandle. FileReadValue.FileWriteValue. FileReadLine. a 4Test record) directly from a file on the host system.FM_READ) [ ] FileReadLine(FileHandle.txt".c) [ ] print("Value is {c}") [] Date and Time Functions [-] testcase DateTimeEx() [ ] datetime dtnow=GetDateTime () // returns date in yyyy/mm/dd format &time in hh/mm/ss [ ] print("The Current Date and Time is {dtnow}") [ ] datetime dt=AddDateTime (GetDateTime().Writes a line of text to a file on the host system. FileWriteLine. [-] testcase FileEx() [ ] HFILE FileHandle [ ] FileHandle=FileOpen("C:\SilkTest.Writes structured data (for example."Welcome To SilkTest") [ ] FileClose(FileHandle) [ ] integer a=10 [ ] integer b=20 [ ] integer c=a*b [ ] FileHandle=FileOpen("C:\SilkTest.txt".

"select one from [Sheet1$]") [ ] string s [-] while db_fetchnext(hh1.s) [ ] print(s) [ ] db_finishsql(hh1) [ ] db_disconnect(hh) .[ ] String Date1=Datestr() // mm/dd/yy [ ] print("Only Date {Date1}") [ ] string Time1=Timestr() // hh:mm:ss [ ] print("Only Time {Time1}") -------------------------------------------------------------Window Functions [-] testcase WindowFunEx() [ ] print(ClassOf(TextEditorUntitled)) [ ] print(WindowParent (Find)) [ ] print(WindowChildren(TextEditorUntitled)) Database Functions: [-] testcase oo() appstate none [ ] handle hh [ ] handle hh1 [ ] hh=DB_connect("DSN=data1") [ ] hh1=DB_executesql(hh.