Silk Test Interview Questions: Q. 51 to 60
Set of 10 Questions
Q. 51: How to run a test case from a testplan file?
If a testcase is linked to a testplan, you can run it from the testplan:
Open the testplan.
Select the test description line which has the testcase linked.
Click Run/Testcase menu. The Run Testcase dialog box shows up.
Click the Run button. SilkTest starts to run the test case.
Do not touch mouse or keyboard, to avoid interrupting the test case execution.
SilkTest finishes executing the testcase. The Restuls window shows up with the execution result.
Review the execution result.
<<<<<< =================== >>>>>>
Q. 52:How to run all test cases in a testplan?
Open the testplan.
Click Run/Run All Tests menu. SilkTest starts to run all the test cases in the testplan.
Do not touch mouse or keyboard, to avoid interrupting the test case execution.
SilkTest finishes executing the testcase. The Restuls window shows up with the execution result.
Review the execution result.
<<<<<< =================== >>>>>>
Q. 53: How to select a group of test cases in a testplan to run?
Usually, a testplan contains a big number of test cases. For some reason, you don’t want to run all test cases in the testplan. You want to select a group of test cases and run them:
Open the testplan.
Select the test description line (linked to the testcase) to mark.
Click Testplan/Mark menu. The selected test description line is marked.
Repeat this process to select more linked testcases.
Click the Run/Run Marked Tests menu. SilkTest runs all the marked testcases.
Do not touch mouse or keyboard, to avoid interrupting the test case execution.
SilkTest finishes executing the testcase. The Restuls window shows up with the execution result.
Review the execution result.
<<<<<< =================== >>>>>>
Q. 54: How to open an existing SilkTest project?
Run SilkTest.
Select File menu.
Select Open Project.
Select the project.
Click OK.
SilkTest will open the selected project.
<<<<<< =================== >>>>>>
Q. 55: Where is a testplan stored?
A SilkTest testplan is stored in a file with .pln file extension.
<<<<<< =================== >>>>>>
Q. 56: How can I access a string from oracle DB?
*DB_Connect (con_string)*
<<<<<< =================== >>>>>>
Q. 57: How can I access empty string from excel sheet?
This can be done by customizing the code as under:
Solution1:
[-] if sText!=NULL
[ ] Page.tfldName.SetText(sText) // do the operation
[-] else
[ ] Page.tfldName.CleartText()
Permanent solution:
Add the below winclass to your code (if it is web application simply paste it, else make HtmlTextField as TextField), Now Text field will not raise exception on null value.
[-] winclass HtmlTextField: HtmlTextField
[ ]
[-] void SetText(String sText optional)
[+] if sText==NULL
[ ] this.ClearText()
[+] else
[ ] derived::SetText(sText)
<<<<<< =================== >>>>>>
Q. 58: How to do negative testing on webpage ? Do we have to capture all error pages?
Capturing all the error messages page would lengthen your script.
Capture only one page and using “*” in declaration try to make the identifier common to all the pages.
If the error message appears as a text message, get the index of the text (Generally it is fixed) and retrieve the value of the test and compare with the expected e,g
if BrowserPage.HtmlText (“#1”).GetText () == “Invalid date”
Print (“Pass”)
else
Print (“Fail”)
Suppose first time you enter an invalid mail ID and the error page has the tag “Error Page – Invalid mail ID”. 2nd time you enter invalid date and the error page has the tag “Error Page – Invalid date”.
To generalize the error page, change the tag to “Error Page – Invalid*” or “Error Page*” which suffices that error page is there.
<<<<<< =================== >>>>>>
Q. 59: How SilkTest works internally from the developer�s point of view?
SilkTest interacts with the GUI to submit operations to the application automatically i.e. it drives the application.
It consists of two distinct software components:
1) The Silk host software, and
2) The 4Test Agent software.
The host software is the program you use to develop, edit, compile, run, and debug your 4Test scripts & test plans.
The 4Test Agent is the software process that translates the commands in your 4Test scripts into GUI-specific commands.
One Agent can run locally on the host machine, and in a networked environment, any number of Agents can run on remote machines.
<<<<<< =================== >>>>>>
Q. 60: What is the escape sequence for ‘space’ in Silk Test? For e.g. on the command line I have to execute an exe, the location of which is : C:Program Filesxyzabc.exe & we need to escape the ” ” in ‘Program Files’.
You can use as C:Progr~1xyzabc.exe
Or use myWindow.TypeKeys(” “)
Or just enclose the whole cmd in “”. This will handle the space.
like:
string sCmdLine = “C:Program Filesxyzabc.exe”
Sys_Execute(sCmdLine)
Next Set of Silk Test Interview Questions: Q. 61 to 70
An expert on R&D, Online Training and Publishing. He is M.Tech. (Honours) and is a part of the STG team since inception.