SilkTest Question 22: Explain advantages of DOM extension over VO extension?

Document Object Model (DOM) browser extension has several advantages over
Virtual Object (VO) browser extension in Silk Test.
  • The recorder displays a rectangle which highlights the controls as QA Engineer is recording them.
  • The DOM extension recognizes text size and actual name of objects.
  • No dependency from browser size and text size setting.
  • Better support fir borderless tables.
  • The DOM extension provide more classes and properties than are available in VO extension.

SilkTest Question 21: How to fix bitmap failed to stabilize error?

Software Quality Assurance Manager suddenly asked me to create straightforward test case for bitmap verification. During test case recording I selected option to verify entire window, but the eerie error "*** Error: Bitmap failed to stabilize" appeared during test case execution. The whole QA team is not able to find solution related to this issue in SilkTest documentation and one of us have seen already prepared pink slips for the whole department in manager's office.

Described bitmap issue occurs if the verified windows in not stable i.e. there is something changing on the screen frequently. The automation testing tool captures the stable copy of the bitmap and would raise E_BITMAP_NOT_STABLE exception if didn't get tested window in the specified time.

Your QA engineers can use the different approaches to get stable bitmap.

Set the following options to 0 in code
Agent.SetOption (OPT_BITMAP_MATCH_COUNT, 0)
Agent.SetOption (OPT_BITMAP_MATCH_TIMEOUT, 0)
Agent.SetOption (OPT_BITMAP_MATCH_INTERVAL, 0)

or

if your manager don't want you to mess with 4test code park your mouse pointer outside the verified window during test plan execution.

or

go to Options -> Agent -> Bitmap and change appropriate values in tab.

SilkTest Question 20: How to use regular expression in Silk Test?

The QA engineer would like to know how to use regular expressions in the test case to verify that certain string has the valid format?

Unfortunately, SilkTest does not support POSIX or Perl style regular expressions even in the recent 8.0 version. The smart Quality Assurance Engineer can use question mark (?) to match any single character or asterisk (*) to match any string of zero or more characters. The following function SubStr, MatchStr and GetFiled might be useful, but all of them have some limitations.

SilkTest Question 19: How to execute the string as the function?

During SilkTest training session I was unsuccessfully tried to create script which can read string from a text file and execute string as the function. Is it possible?

The following 4test code use the @ operator for function reference. Make sure that that the calling function is defined or you will get an exception. For more details on the @ operator take a look into the appendix of the language reference provided by Borland.

[-] testcase foobar() appstate none
// prints directory on the host machine where startup include files located
[ ] string sFunc = "GetStartupDir"
[ ] string sDirectory = @(sFunc)()
[ ] print(sDirectory)

Update on job market for automation testing tools.

Today the regular monthly results for job openings for quality assurance engineers from popular job search engines shows that Winrunner leads again in the race.

Search result from dice.com on May,19 2006:
  • silktest - 164 jobs
  • winrunner - 519 jobs
The spike for Silk Test positions has an easy explanation. This time I run the search as boolean expression "(silk AND test) OR silktest", and dice.com added around 70 positions for QA Engineers based on this modified query.

Search result from Craigslist for San Francisco Bay Area on May,19 2006:
  • silktest - 23 jobs
  • winrunner - 27 jobs
It is not too many for Bay Area comparing with total 463 open positions for QA Engineers from the same Craigslist. Probably on the current stage of market the companies would like to hire more manual testers than people with automation testing skills.

SilkTest Question 18: How to read data from Microsoft Excel worksheet?

For QA purposes we are trying to read a block of cells from Excel spreadsheet and use values later for creating data driving automated test. The testing process set up in such way that we don’t want to use exact column names and prefer to just get data from cell numbers specified for example as B4:D11. Basically we want to obtain the cell values for all spreadsheet cells from B4 to D11 and print them out.

Try to create your test script based on the following code

[] hDBC = DB_Connect ("DRIVER=Microsoft Excel Driver (*.xls); FIRSTROWHASNAMES=1;READONLY=FALSE;
DRIVERID=790;DBQ=C:\QA.xls")
[] //run a SQL statement
[] hSQLq = DB_ExecuteSQL (hDBC, "SELECT * from [Sheet1$B4:D11]")
[] //while there are still rows to retrieve
[-] while DB_FetchNext (hSQLq, description, var1, var2)
[] print("{++i}:{ description } { var1} { var2} !")
[]
[] DB_Disconnect(hDBC)

For training purposes you have to take a look at SilkTest user manual for the following functions:
  • DB_Connect
  • DB_ExecuteSQL
  • DB_FetchNext
  • DB_FinishSql
and Datatypes:
  • HDATABASE
  • HSQL
Also take a look for the following answer about DBTester database functions.

SilkTest 8.0 released by Borland

I noticed just a few days ago in my blog posting SilkTest 8.0 is coming that probably we will see a new version of Silk Test very soon as an answer to Mercury Interactives's Quick Test Pro 9.0 and today Borland announced in press release about releasing improved version of application for automated testing. Actually I not expected that they will make it live so fast and I guess Segue already had some prototype in progress.

I briefly looked over technical specifications and I definately like the following features of SilkTest 8.0: it can be used for testing web based applications running in the Firefox 1.5 and Microsoft Internet Explorer 7.

Silktest Question 17: How to close all windows on desktop?

I would like to close all application windows on desktop not only Internet Explorer, but MS SQL Query Analyzer, Visual SourceSafe, SecureCRT and so on before stating to execute my test cases as was requested by my outsourced team in India.

Use the following code in 4Test language:

SilkTest

SilkTest 8.0 is coming

On recently updated supported environment page for SilkTest 7.6.1 the meticulous QA Engineer may notice petite mentioning of expected release of SilkTest 8.0. Borland (BORL) will phase out support in SilkTest 8.0 for some older technologies like Windows 2000, Internet Explorer 5.x, Netscape 6.x and so on, but there are no any information about support for new environment and when the new version will be released.

As some of QA Engineers know Borland's competitor in automated testing tools Mercury Interactive (MERQ) added support of Web services, .NET 2.0, Firefox 1.5, Netscape 8, Macromedia Flex 2, Win XP 64 bit, Internet Explorer 7 to the new version of QTP 9.0 introduced on April 3th, 2006.

Will Borland strike back?

Silktest Question 16: How to delete cookies files using the 4test language?

I created a 4test script to test our web based application and would like to know how to delete a specific cookie file during script execution?


The following 4test function can be used for deleting specific cookie file:

[-] RemoveCookies (String sPath, String sFile)
[ ] //*******************
[ ] //* The function for removing a stored web cookie file.
[ ] //* sPath The complete path to the directory where the cookie is stored
[ ] //* Example "C:\Documents and Settings\Administrator\Cookies\"
[ ] //* sFile unique part of the cookie file name
[ ] //* for example "*winrunner*"
[ ] //*******************
[ ] LIST OF FILEINFO lfInfo
[ ] LIST OF STRING lsFileName
[ ] INTEGER iCount
[ ] STRING sLFile
[ ] Boolean bFound
[ ]
[ ] lfInfo = SYS_GetDirContents (sPath) //obtain directory content
[-] for iCount = 1 to ListCount(lfInfo) //for every FILEINFO in lsInfo
[ ] ListAppend(lsFileName, lfInfo[iCount].sName) //append the name of the files
[ ]
[-] for each sLFile in lsFileName //for each file name in lsFileName
[ ] bFound = MatchStr (sFile, sLFile) //check if the sFile string is in the File Names
[-] if bFound == TRUE //if the sFile string is in file name
[ ] SYS_RemoveFile (sPath + sLFile) //delete the file from the sPath directory
[ ]

You can easily modify this 4test function to remove all files in the particular directory or within a loop delete a list of files.

Silktest Question 15: The SilkMeter license server is down. What can I do?

The server with SilkMeter license is down and would be not available this week, but I need to finish the testing of very important project by the end of this week. What can I do to complete my chores on time?

You need to call Borland support and ask for temporary or mobile license for SilkTest.

Silktest Question 14: How to test dynamic text in web based application?

I'm using Silk Test for testing a web based application. When I fill the form out and submit, the page shows a text message along with the username in the next page, for example "Successfully created test account for user John Winrunner". The message changes when different username is given, for example "Successfully created test account for user Andrew SilkTest". How to verify this dynamic text?


There must be a particular set of messages that you might be getting. Here are some few advices that you might want to use depending on your testing requirements.

1) Use the index of the message and not the caption to declare it, since the caption keeps on changing non-uniquely.

2) Declare each message separately, and check for their existence. At a time only one should exist and you can proceed depending on what is to be done on the occurrence of the corresponding message.

3) Setting Agent Option OPT_VERIFY_UNIQUE to false temporarily through 4Test code. For example :

Agent.SetOption (OPT_VERIFY_UNIQUE, FALSE)
// 4Test code that requires non-unique messages
Agent.SetOption (OPT_VERIFY_UNIQUE, TRUE)

Borland Software to cut work force by 300 employees.

I hope this lay off didn't affect the former Segue company employees and Borland will continue to work on Silk Test improvement and soon we would be able to evaluate and buy a new enhanced version of Silk Test.

Struggling Borland Software Corp. on Wednesday announced plans to lay off 300 employees, or about 20 percent of its work force, in a cost-cutting move aimed at reversing the company's recent losses.

Now Borland is trying to bounce back again after losing $29.8 million in 2005. The company widened the loss Tuesday from a previously reported $28.5 million after concluding that inadequate oversight over its accounting practices had caused some invoices to be improperly recorded in its financial statements.

Borland also restated its third quarter-results, widening its third-quarter loss to $5.3 million -- $446,000 higher than the company previously reported.

The headaches have discouraged investors. The company's stock price has plummeted by nearly 60 percent since the end of 2004. Borland's shares ( BORL )fell 6 cents to $4.94 during Wednesday's trading on the Nasdaq Stock Market.

Silktest Question 13: What is SilkTest Host?

SilkTest Host is a SilkTest module that manages and executes test scripts. SilkTest Host typically runs on a separate computer different than the computer where AUT (Application Under Test) is running.

Silktest Question 12: What are the database functions offered by DBTester?

DBTester presents 6 functions. You can use them straight in your 4Test scripts:

DB_Connect: Opens a database connection linking the data through the specified OBDC DSN name. DB_Connect returns a connection handle which can be used on other DBTester functions. SQL statements can be submitted to the database.
DB_Disconnect: Closes the database connection represented by the specified connection handle. All resources related to this connect are also released.
DB_ExecuteSql: Sends the specified SQL statement to the specified database connection for execution. DB_ExecuteSql returns a query result handler which can be used by the DB_FetchNext function.
DB_FetchNext: Retrieves the next row from the specified query result handler.
DB_FetchPrevious: Retrieves the previous row from the specified query result handler.
DB_FinishSql: Closes the specified query result handler

SilkTest interview questions for QA Testers