SilkTest Question 36: How to open and close browser?

There is Invoke method declared for the Browser window. The following 4test code invokes the currently defined browser - Browser.Invoke(). The Close method will close current browser windows – Browser.Close(), but in most cases this method can be used in combination with CloseOthers. The CloseOthers closes all instances of the current browser except the top most one. One more method would be useful for testing FireFox with SilkTest. The CloseOtherTabs closes all instances of the current browser tabs expect the left most one.

The 4test language examples:

SilkTest Question 35: Did you have any issues with SilkTest 8.0?

I guess this one is the nice question for someone who has the latest version of Borland SilkTest 8.0 in his/her resume. One of the answers may be the following:

While testing a huge webpage which has almost 1000 objects we figured out that automation tool is not able to see a lot of objects at the bottom of the webpage. The developers can not brake down the page into smaller web pages due to customer requirements. We tried to recognize objects with previous version of SilkTest 7.6 and with WinRunner 8.0 and both automated tools do not have such problem on this page. Our QA manager contacted Borland and currently they are trying to fix this issue in the future version. In the mean time we are trying to find a workaround, but not able to get any satisfactory solution.

SilkTest Question 34: How can QA engineer execute SilkTest from the command line

The full development version of SilkTest uses – partner.exe file, therefore the start command would be %SEGUE_HOME%\partner.exe -r winrunner.t

The runtime version of SilkTest uses - runtime.exe file, hence the command should be: %SEGUE_HOME%\runtime.exe -r winrunner.t

There are many options for execution automation tool from command line and one of the most useful is "-q" which quiets application after the script, suite, or test plan completes.

Silktest tips:
The experience with running runtime version on Microsoft Windows 2003 server has shown that runtime version is not able to execute 4test script for browser in case the 'Internet Explorer Enhanced Security Configuration' is enabled on computer. To disable one need to use the following instruction:

Press start, select Control Panel, and select Add/Remove Programs
Press on Add/Remove Windows Components image
As soon it is done find and uncheck the check mark next to Internet Explorer Enhanced Security Configuration. (click detail in case you would like to only disable it for administrators or only for users)
Press Next, and try to run your 4test script or test plan again.

SilkTest Question 33: How to stop a running test case before it completes?

From my experience as interviewer around 25% applicants for QA Engineers position don’t know answer on this interview question although everyone of them has at least 2 years of experience with SilkTest automated tool.

To stop running a test case before it completes:

  • if your application under test is running on your host computer, press SHIFT+SHIFT
  • if your application under test in on target computer other than host computer, select Run/Abort from SilkTest menu

SilkTest Question 32: Can you explain the standard flow of test case execution?

  • The test case drives the application under state from the initial stage to the state QA Engineer wants to test.
  • The test case verifies that the actual state matches the expected state. The QA department might use term baseline or basestate to refer to expected state.
  • The test case verifies that the actual result of execution matches expected result.
  • The test case declares that the test passes or failed
  • The test case cleans up application in preparation on next test case.

SilkTest Question 31 : How to update an Excel spreadsheet using SilkTest?

First of all the QA engineer should verify that ODBC data source, which SilkTest is going to use, is not set to read-only otherwise the Excel worksheet cannot be updated

The Microsoft's Excel OBDC driver does not support INSERT keyword, so QA Engineer will not be able to use this keyword in the SQL statement. Instead of INSERT keyword 4test code developer have to use to use the UPDATE keyword.

The following 4test example will update data in Microsoft Excel.

[ ]
[ ] HANDLE hDBC = DB_Connect("DSN=Documentation")
[ ]
[ ]
[ ] hSQLq = DB_ExecuteSQL(hDB, "UPDATE 'Sheet2$' SET 'Sheet2$'.Language='4Test' WHERE 'Sheet2$'.Name='Winrunner'")
[ ]
[ ] DB_Disconnect(hDBC)

Also take a look at SilkTest Interview Question 18: How to read data from Microsoft Excel worksheet?

SilkTest interview questions for QA Testers