Silk Test Interview Questions: Q. 41 to 50
Set of 10 Questions
Q. 41: What is a test frame?
A test frame is a file that contains information about the application you are testing. Information stored in a test frame will be used as references when SilkTest records and executes testcases.
A test frame is stored in an include file with file extension .inc.
<<<<<< =================== >>>>>>
Q. 42: How DOM browser extension identify a Web application UI object?
A Web application UI object is identified in two parts:
Identify
the Web browser window where the Web application is running. For example, a Web browser window can be identified as “Browser.BrowserChild(“Yahoo Home Page”)”. Another Web browser window can be identified as “Browser.BrowserChild(“Google Home Page”)”.Identify the Web UI object based on the HTML element that represents the UI object. For example, an image in a Web page can be identified as “HtmlImage(“Yahoo Logo”)”; A hyperlink in a Web page can be identified as “HtmlLink(“Site Map”)”;
The full identification of a Web applicatin UI object is the concatenation of the browser window identification and the HTML element identification. For example, the Yahoo logo image is identified as: Browser.BrowserChild(“Yahoo Home Page”).HtmlImage(“Yahoo Logo”). The site map link is identified as: Browser.BrowserChild(“Google Home Page”).HtmlLink(“Site Map”).
<<<<<< =================== >>>>>>
Q. 43: What is multi-tagging?
Multi-tagging is a technique used by the DOM browser extension to identify a Web page UI object. Whenever possible, DOM extension inserts more than one tag into the object identifier in following format:
Browser.BrowserChild
(“page_title”).html_class(“caption_tag|#index_tag|window_tag”)
“caption_tag” is the caption of the HTML element.
“#index_tag” is the index of this HTML element, counting from the beginning of this page of the same class of HTML elements.
“window_tag” is the window identifier.
<<<<<< =================== >>>>>>
Q. 44: How can we specify a browser extension to a Web application?
Run SilkTest.
Open Internet Explorer (IE).
Enter the URL of the Web application.
Leave the IE window with the Web application. Don’t minimize the IE window.
To back to SilkTest window.
Select Basic Workflow bar.
Click Enable Externsions on the Workflow bar.
The Enable Extensions dialog will show up. Your Web application running in the IE window will listed in the dialog box.
Select your Web application and click Select.
The Extension Settings dialog will show up. Click OK to enable the DOM browser extension.
<<<<<< =================== >>>>>>
Q. 45: How can we test the DefaultBaseState?
Close your Web application and other Web browsers.
Make sure your test frame is open.
Click Run/Application State menu. The Run Application State dialog box shows up with a list of states. One of them should be DefaultBaseState.
Select DefaultBaseState.
Click Run button. The Runtime Status dialog box shows up. And the Results File dialog box shows up too.
You should see no error message in the results file.
<<<<<< =================== >>>>>>
Q. 46: What are the important aspects of a test case?
Each test case must be independent of other test cases.
Each test case have a single test purpose.
Each test case should start from a base state and returning to the same base state.
<<<<<< =================== >>>>>>
Q. 47: How to include a test case into a Testplan?
Make sure your Testplan is open.
Enter a test description into your Testplan. For example, “Test login process”.
Select this test description.
Click Testplan/Detail menu. The Testplan Detail dialog box shows up.
Click the Test Execution tag on the Testplan Detail dialog box.
Click the “Scripts” button to browse and select a test case script file. For example, LoginTest.t.
Click the “Testcases” button, to select a testcase recored in the specified script file.
Click OK to close the Testplan Detail dialog box.
<<<<<< =================== >>>>>>
Q. 48: How can we Set Max value?
Here’s the function you need to verify that an object (TextField) accepts a max char limit.
[code]
[+] boolean VerifyMaxChars (window wTarget, integer iMax, string sChar optional)
[ ]
[ ] string sText = “”
[ ] string sComp
[ ]
[+] if sChar == null
[ ]
[ ] sChar = “A”
[ ]
[ ]
[ ] sText = Replicate (sChar, iMax)
[ ]
[ ] wTarget.TypeKeys (sText)
[ ]
[ ] sComp = wTarget.GetText ()
[ ]
[+] if sText != sComp
[ ]
[ ] Verbose (“Verify Max Chars failed, expected number {iMax}, actual {Len (sComp)}”)
[ ]
[ ] return false
[ ]
[ ]
[ ] sText = Replicate (sChar, iMax + 1)
[ ]
[ ] wTarget.SetText (sText)
[ ]
[ ] sComp = wTarget.GetText ()
[ ]
[+] if sText == sComp
[ ]
[ ] Verbose (“Verify Max Chars failed, expected number {iMax}, actual {iMax + 1}”)
[ ]
[ ] return false
[ ]
[ ]
[ ] return true
[ ]
[/code]
<<<<<< =================== >>>>>>
Q. 49: How can we record a test case into a testplan automatically?
Test cases can recorded first without a testplan, then included into a testplan later. Test cases can also be recorded into a testplan directly:
Make sure your testplan is open.
Enter a test descripption into your testplan. For example, “Test change password”.
Select this test description.
Click Record/Testcase menu.
Enter a name for the script file.
Click Open. The Record Testcase dialog box shows up.
Enter a testcase name in the Testcase Name field.
Select DefaultBaseState in the Applicatin State dropdown list.
Click Start Recording button.The Record Testcase dialog closes. Your Web application is will be automatically started by SilkTest, based on the information in test frame file. SilkTest Editor window closes. The Record Status dialog box shows up.
Continue to use your Web application. SilkTest records everything you did on your application.
Click the “Done” button on the Recording Status dialog box to stop recording. The Recording Status dialog box closes. The Record Testcase dialog box shows up again.
Click Paste to Editor. SilkTest will insert the recorded acitivities as 4Test statements into a script file. The Record Testcase dialog closes.
Click File/Save menu to save the script file. You can enter a script file name. For example, ChangePasswordTest.t.
<<<<<< =================== >>>>>>
Q. 50: Can SilkTest switch browsers automatically?
This can be done by using Organizer.
There you can re-run the same testcases but at the top open a different .opt (options) file.
You have to save these 2 opt files though after you set the runtime with Netscape, save the 1st one and save another after you set it up with IE.
Next Set of Silk Test Interview Questions: Q. 51 to 60

An expert on R&D, Online Training and Publishing. He is M.Tech. (Honours) and is a part of the STG team since inception.