Anda di halaman 1dari 4

et of 10 Questions

Q. 71: Need to use the relative paths in my SilkTest Project. How to change the absolute paths to
relative paths?
Say you have following organization of files
C:\Test\Script\Script.t
C:\Test\WDec\WDec.inc
Now in Scrpt.t file to include WDec.inc, code following
1. use " C:\Test\WDec\WDec.inc" --> Absolute
OR
2. use "..\WDec\WDec.inc" --> Relative [Move one level up from Script folder, then go to WDec folder]
<<<<<< =================== >>>>>>
Q. 72: We are testing a login feature for web application. In the first window login will be
successful, in the second window it will show error that user is already logged in. But with the
Recovery system set in SilkTest I can only launch One application window at a time.
Now the question is - how to launch 2 web application windows simultaneously through SilkTest?
This can be done using the following method
Browser.Invoke ()
Browser.LoadPage ("URL for login screen")
Browser.WaitForReday ()
// Do login
Browser.Invoke ()
Agent.SetOption (OPT_VERIFY_UNIQUE, FALSE)
Browser.LoadPage ("URL for login screen")
Browser.WaitForReday ()
// Attempt to login and verify the message
Agent.SetOption (OPT_VERIFY_UNIQUE, TRUE)
Browser.TypeKeys ("")
<<<<<< =================== >>>>>>
Q. 73: Suppose we are using a testcase for creating location. SilkTest is reading location as html
link. Locations are being stored alphabetically. But there is no tag associated with the latest tag
(suppose its cg11).

Now the question is - How to search for html link?
Following function is related to HTML Table.

This function checks whether passed link-name is HTML link or not. "this" parameter is referred as
"HtmlTable".
[+] BOOLEAN IsHtmlLink(STRING sLinkName)
[+] do
[ ] INTEGER iColCnt=0,iRowCnt=0,iNextCCnt,iNextRCnt
[ ] BOOLEAN bflag=FALSE
[ ] iColCnt=this.GetColumnCount()
[ ] iRowCnt=this.GetRowCount()
[ ]
[-] for (iNextRCnt=1;iNextRCnt<=iRowCnt;iNextRCnt++)
[-] if !bflag
[-] for (iNextCCnt=1;iNextCCnt<=iColCnt;iNextCCnt++)
[-] if (this.HtmlColumn("#{iNextCCnt}").GetRowText(iNextRCnt) == sLinkName
)
[-] if (Trim(this.HtmlColumn("#{iNextCCnt}").HtmlLink("#{iNextRCnt}").GetLocation()) !="")
[ ] bflag=TRUE
[ ] break
[ ]
[-] else
[ ] break
[ ]
[ ] return (bflag)
[-] except
[ ] return (FALSE)
<<<<<< =================== >>>>>>
Q. 74: Say we are using SilkTest to create automated user registration application. How to validate
that the data inserted via SilkTest is successfully inserted and the record of each user is found in
the database?
Our intention is to verify the data integrity in the DB for a single registration.
There are couple of ways to do that. One being, if you have a list of registrations provided from UI, after
the registration is done successfully, go the listing page and select the particular record and go to the
properties of it and compare the values against the corresponding values given during the filling of
registration form.
The second way is that, try to write a query(as simple stored procedure) in the db that displays all the
values for a single registration and call that stored procedure from silk test using data driven functions.
<<<<<< =================== >>>>>>
Q. 75: How do I declare the tag, so that SilkTest recognizes only the beginning of the text?
1. Try to declare the tag with prior text.
2. Try to declare the tag with location ... meaning #3 (This means that this is the 3rd dynamic text in the
page).
3. You can try to GetText ()
<<<<<< =================== >>>>>>
Q. 76: What I have to do to use the same scripts for web based testing
Same script can be used.
Only URLs need to be updated.
Might be some tags also but you can manage them using wild characters or multi-tag...
<<<<<< =================== >>>>>>
Q. 77: Can we integrate Silk Test with Quality Center?
Silk cannot be integrated with Quality center.
<<<<<< =================== >>>>>>
Q. 78: How can we verify if the two files are same and also check whether the data in them is also
correct function using file verify?
Use the SystemFunctions in that case
SYS_CompareText
eg.:
letscompare = SYS_CompareText(sFile1,sFile2)
<<<<<< =================== >>>>>>
Q. 79: How can we do load testing with SilkTest?
SilkTest is not a load testing tool - it is a functional testing tool.
You could do a crude load test by having Silk on multiple boxes and then running each one at the same
time - but that is very crude.
You need Silk Performer or Load Runner or some other load testing tool for doing load testing.
<<<<<< =================== >>>>>>
Q. 80: Can SilkTest run on Mac?
Yes, you can. Except that you will need Mac Runtime for Java (MRJ).