SilkTest Question 29: How to hide password in the 4test script file?

My QA team is doing transition from Winrunner to SilkTest and we have a problem with the web application user name/password recording. The Winrunner records the password in the encrypted format, but SilkTest records password as a plain text. Can we do something to hide password?

There is no way to encrypt and decrypt password using 4test script, but QA engineer can make a work around with some external languages like Perl or Python. More advance solution is too never use your own account and create test accounts to access application under test.

UPDATE: SilkTest 2006R2 supports password encryption/decryption. Passwords can be encrypted, so that they are not displayed in recorded test scripts or when playing back test scripts.Two new functions, Decrypt() and Encrypt(), have been added to the 4Test language to support password encryption.

SilkTest Question 28: How to start installation testing?

The QA department assigned for installation testing of our software product. I as A Lead Test Engineer try to develop 4test script which will recognize the correct path for installation CD-ROM drive and launch application. Can you give me some clue to start?


To recognize drive letter to CD-ROM, you have to use API with name GetDriveType(). See the 4test code written below:

[-] dll "kernel32.dll"
[ ] long GetDriveTypeA(inout String strDrive)
[ ]
[-] testcase GetDriveName() appstate none
[ ] GetCDDriveLetter()
[ ]
[ ]
[-] String GetCDDriveLetter()
[ ] integer i
[ ]
[-] for i=67 to 90
[ ] String strDrive=chr(i)+":\"
[-] if GetDriveTypeA(strDrive)==5
[ ] print(strDrive)
[ ] return(chr(i))
[ ] return " "


To launch application from the installation CD you can use the following 4test script

use "bwcompat.inc"
[-] testcase LaunchFromCD () appstate none
[ ] STRING sStart = "{GetCDDriveLetter ()}:\{strPathToSetupFile.Exe}"
[ ] App_Start (sStart)

App_Start is described in bwcompat.inc file file that comes with Silk Test.

SilkTest Question 27: How to set correct browser extension for web based application?

The following steps describes setting browser extension for testing web based applications.

  • Start SilkTest application.
  • Start Internet Explorer browser
  • Enter the URL of the Web application into Internet Explorer address bar and leave the Internet Explorer window with the web based application. Do not minimize browser window!
  • Switch back to SilkTest window.
  • Select Workflow->Basic in SilkTest menu
  • Press Enable Extensions on the Workflow bar.
  • The Enable Extensions dialog will show up. In most cases the web based application running in the browser window will be listed in the dialog box.
  • Select your web based application and click select.
  • The Extension Settings modal dialog window will show up. Select radio button DOM and click OK to enable the DOM browser extension.
  • Restart your web based application as asked in Text Extension Setting window and press Test button.
  • The SilkTest window with text "Configuration of your Internet Explorer 6 application is complete" should appear in case of successful settings.

SilkTest interview questions for QA Testers