User Tag List

Results 1 to 6 of 6

Thread: SilkTest faqs

  1. #1
    Junior Member
    Join Date
    Sep 2003
    Post Thanks / Like
    0 Post(s)
    0 Thread(s)

    SilkTest faqs


    can anyone help me out in getting good faqs interview oriented on SilkTest ?

    if anybody prepared it before, please let all of our friends in this forum have it.

    thanks in advance for you help..!

  2. #2
    Senior Member
    Join Date
    Jul 1999
    Bellingham, WA USA
    Post Thanks / Like
    0 Post(s)
    0 Thread(s)

    Re: SilkTest faqs

    Are you looking for questions to ask in an interview, or for answers to questions you might be asked by an interviewer? Both of those issues have been discussed here in the recent past. Use the forum search and you will find those discussions.

  3. #3
    Junior Member
    Join Date
    Sep 2003
    Post Thanks / Like
    0 Post(s)
    0 Thread(s)

    Re: SilkTest faqs


    i looking for the questions in SilkTest which can be asked most repeatedly in interviews.


  4. #4
    Senior Member
    Join Date
    Jul 1999
    Bellingham, WA USA
    Post Thanks / Like
    0 Post(s)
    0 Thread(s)

  5. #5
    Super Member
    Join Date
    Jul 2001
    Post Thanks / Like
    0 Post(s)
    0 Thread(s)

    Re: SilkTest faqs

    My favorite is to give them an almost complete test frame and a script with some testcases in it that contain various errors. Ask them to fix the errors and explain in writing what they did to solve the problems. Look for speed of getting the issues solved, clarity of the explanation, and the way that it was solved. That will weed out the people that saw an ad for the tool and put it on their resume from those that really can do the work.

  6. #6
    Join Date
    May 2003
    Post Thanks / Like
    0 Post(s)
    0 Thread(s)

    Re: SilkTest faqs

    I'm also new to SilkTest and testing.. I'm attaching a list of 41 question which i've prepared ,some of them are mine some i gathered with the help of net. See if its of any worth to u.

    Sample Questions on SilkTest

    1. The following example code defines the application state InvokeFind as based on the NONE keyword and associates that application state with the testcase TestFind.

    Appstate InvokeFind () basedon none
    xFind.Invoke ()
    Print (“hello”)

    testcase TestFind () appstate InvokeFind
    Print (“In TestFind”)
    xFind.Exit.Click ()
    When you run this testcase in SilkTest, what o/p will be printed?
    In TestFind
    The testcase prints hello twice because SilkTest executes the application state both as the testcase is entered and as it is exited.

    2. What do you mean by a DefaultBaseState and what role does it play in automated testing?
    Ans2. DefaultBaseState is itself an application state. The DefaultBaseState application state is responsible for restoring the application to the base state in the event the application fails or is corrupted during testcase execution or between testcases.

    3. When is the SilkTest Recovery System used?
    Ans3. SilkTest uses the recovery system for all testcases that are based on DefaultBaseState or based on a chain of application states that ultimately are based on DefaultBaseState.
    The recovery system is not used with testcases based on an application state of none or based on a chain of application states ultimately based on none.

    4. How can you run only the failed testcases in the second round of testing?
    Consider an Ex: If you have 150 testcases out of which 50 of them fail in the first round of testing. In the second round you need to run only those 50 testcases that failed.
    Ans4. It is not possible if you are executing (*.t) file directly. It can be possible only in plan file (*.pln) in which testcases are called.
    àExecute the plan file (.pln)
    àIn the result file (.res) note that under Results select-> "Marks Failures in Plan". It will mark failed testcases alone.
    àThe next time you run the .pln it will execute only failed testcases (Select run the marked testcases)

    5. Name the logical/virtual classes (SilkTest never records a declaration that has one of these classes).
    Ans5 The AnyWin, Control, and MoveableWin classes are logical (virtual) classes
    that do not correspond to any actual GUI objects, but instead define methods
    common to the classes that derive from them. This means that SilkTest never
    records a declaration that has one of these classes.

    6. Name the classes that do not derive from the AnyWin class
    Ans6 There are three classes that are not part of the AnyWin class hierarchy, CursorClass,ClipboardClass, and AgentClass because they define methods for objects that are not windows:

    7. What is a SilkTest Agent?
    Ans7 Agent is a process that translates the 4-test script into GUI-specific commands. The Agent actually drives and monitors the application you are testing. An agent can run locally on the host machine. In the network environment, any number Agents can run on remote machines.

    8. Where can you find all the methods for a class?
    Ans8 Use the Library Browser. Its invoked by choosing Help-->Library Browser from the SilkTest menu. Select the class tab, and then select the class you want to view. The methods for the class appear in the right panel. You can click on a method and view its syntax. If you check the box marked Show Inherited, all the methods from the ancestor classes will be shown. Its major disadvantage is that you can't copy from it

    9. Do methods defined in a derived class inherit explain your answer?
    Ans9. No, Consider for example:
    When you create a class using winclass MoveableWin : MoveableWin, you're actually deriving a new class which has the same name as the original class. All objects automatically become instances of the new derived class. However, other derived classes, such as DialogBox in this case, have already been inherited from the original MoveableWin. This happened at startup and can't be changed. Therefore, any methods you added to the inherited MoveableWin class will not be available for use by DialogBox objects.

    Example: winclass MoveableWin : MoveableWin Close () // Steps to close windowswindow DialogBox Test tag "Test" parent MyApplicationmain () Test.Close ()
    Notes: The DialogBox "Test" will not use the new Close method defined above, even though DialogBox inherits from MoveableWin.

    10. What does the recording statement do?
    Ans10. The recording statement sets the following Agent Verification options to FALSE
    This can be useful if you specifically want to turn these verifications off for a specific block of code, but usually it is better to remove the recording statement after you record the statements you need (run with these options set to TRUE)
    11. What is a test suite?
    Ans11 A Test suite is a collection of test scripts. SilkTest provides a way of continuously select a set of test script files and run those script files at-a-stretch.

    12. What is the difference between DOM and VO in web testing?
    Ans12. The IE DOM extension has several advantages over VO:
    ·It will find non-GUI (non-visible) objects.
    ·It offers better support for borderless tables.
    ·It is consistent with the standard being developed by the W3C.

    In general, the IE DOM extension provides more classes and properties than are available with VO.

    13. What is a test frame?
    Ans13. The test frame is the backbone that supports your testcases and scripts.
    It is a file that contains all the information about your application’s
    GUI objects that SilkTest needs when you record testcases.

    14. When and why is the Sleep () statement needed?
    Ans14. Sometimes Silk can't tell when an application is busy. When this happens, Silk tries to execute the next step which gets thrown away by the application or causes an error which is usually very difficult to reproduce either manually or under debug mode. When this happens, a well placed Sleep (2) or Sleep (5) can often solve this annoying problem. A few extra sleep statements to make sure that the application is ready to move forward may be worth the small difference in the time it takes to execute your scripts.

    15. What are the different phases involved in QA using Silk?
    Ans15. 1. The Plan phase
    The first phase of testing is writing your testplan. You should start a testplan as early as possible. You write your testplan in SilkTest. Plan Files are stored in files with extension (*.pln)
    2. The Capture phase
    Once you have at least begun a testplan, you need to capture information about the application under test before actually starting to test. First, you create a test frame, which records information about the GUI objects (such as windows, menus, and dialogs) that you will be testing. You create a test frame in SilkTest.

    3. The Create phase
    Once you have developed a testplan and a test frame, it is time to start testing your application. You create testcases to fulfill the requirements of your testplan.
    You create testcases in SilkTest.
    4. The Run phase
    The Run phase involves executing your testcases against the application under test. You select tests based on the state of the application, such as the changes, enhancements, defects, and new functionality in each build.
    You run tests in SilkTest. You can use the testplan you developed to organize your testing strategy.
    5. The Report phase
    The testcases you run produce results, which you need to review. Typically you will want to work with completion reports (which testcases have been run) and pass/fail reports (which testcases passed and which failed).
    You analyze results in SilkTest. You produce reports in SilkTest.
    6. The Track phase
    As your testing proceeds, you will want to track the progress of your project.
    You can feed your test results into SilkRadar to monitor defects. You can report trends, history, high-risk product areas, and number and type of defects.

    16. Can you call Silk Scripts from an external shell program?
    Ans16. Yes. One-way is to just call Silk and pass the name of the script using the command line arguments. The complete list of arguments is shown below.
    Command Line Options
    Syntax: optionset: filename
    -m Machine Name
    -r Script / Testplan / or Suite Name
    -q Quit SilkTest after the script or plan completes execution.
    -query Testplan query to run
    -p Post error count to calling program
    -resexport Output results files to rex files
    Example: This command would execute the query FunctionalTests defined in the testplan InsertNewData,pln on the machine LabMachine13 and exit SilkTest after the testplan completes.
    partner -m LabMachine13 -q -query FunctionalTests -r InsertNewData.pln

    17. How will you decide whether you need to create a function or a method?
    Ans17.If the action you are automating is:
    closely related to a specific window, create a method of that specific window.
    Closely related to a class of objects, create a method of that window class.
    More of a utility, not related to a window or class of windows, create a function
    18. How will you declare context-sensitive menus that pop up when you click the right mouse button or some other key combination? -(Popup menu items change dynamically, depending on the point at which the popup menu appears.)
    Ans18. You define a new class, which inherits from the PopupMenu class. The children of this class should be the menu items on the popup menu. You then include the popup menu class as a child of each control to which the popup menu applies.
    The following example is based on Microsoft Excel and illustrates how to declare and test popup menus on the Windows platform.

    winclass MyPopupMenu : PopupMenu
    // Point is the position where you click to invoke
    // the menu (or it can be reassigned dynamically to test
    // menu invoked from a variety of points)
    POINT Point
    tag "$PopupMenu/({Point.x}, {Point.y})"
    // Declare all possible menu items for the popup menu
    MenuItem Cut
    tag "Cut"
    MenuItem Copy
    tag "Copy"
    MenuItem Paste
    tag "Paste”
    MenuItem Clear
    tag "Clear"
    //and so on..

    19. What is the use of do … except statement?
    Ans19. Handles (ignores) an exception without halting a script. The do...except statement allows a possible exception to be handled by the testcase instead of automatically terminating the testcase. If an exception is raised while the do clause statements has control of the script, control immediately jumps to the first statement in the except clause.

    20. Give the most commonly used DBTester functions to access a database.
    Ans20. DB_Connect, DB_ExecuteSql, DB_FetchNext, DB_FinishSQL and DB_Disconnect.

    21. While using the Record Window Declarations dialog, you will on occasion notice that the recorded class is CustomWin why so?
    Ans21. It indicates that SilkTest does not recognize the class of the object. The object is interpreted as a custom object.

    22. What will you do in the above situation?
    Ans22. Perform class mapping. Map the custom class to a standard class in the Window Declaration.

    23.What does the tag statement do?
    Ans23. In a window declaration, defines one or more tags that the Agent uses internally to uniquely identify the object at runtime. The Agent generates tag statements for GUI objects when you record window declarations if you have turned off multiple tag recording. The Tag is the actual name of the object in the application. The Tag is mapped to Identifier, the logical name of the object in the application.

    24. What is the difference between tag and multitag statement?
    Ans24. The tag statement is functionally equivalent to the multitag statement. It specifies one or more tags that the Agent should use when identifying objects at runtime. The only difference is syntax: With the tag statement, all segments of the tag are in one string and are delimited by the pipe character ( | ), such as:

    tag "Case sensitive|$1041"

    With the multitag statement, different segments are on their own lines, such as:

    multitag "Case sensitive"

    25. How to allow several staff members to work on the plan at the same time?
    Ans25. To allow multiple users to work on the same plan, you can structure your testplan as a master plan with one or more subplans.

    26. What is the difference between a master and subplan?
    Ans26. The master plan contains only the top few levels of group descriptions, and the subplans contain the remaining levels of group descriptions and test descriptions/

    27.Explain the SilkTest Architecture.
    Ans27. SilkTest consists of two distinct software components that execute in separate processes:
    v The SilkTest host software.
    v The 4Test Agent software.
    The below diagram explains its functioning.

    28. What will the following code (declaration) snippet do?
    winclass DialogBox : DialogBox
    GetCaption ()
    Print ("Dialog")
    Print (derived::GetCaption ())
    Ans28. The above example defines a GetCaption method for DialogBox that prints the string “Dialog” before calling the built-in GetCaption method (defined in the AnyWin class) and printing its return value

    29. What will be the o/p of the following example and give reason?
    winclass MyWin : AnyWin
    WhatAmI ()
    Print ("I am a MyWin")

    GetInfo ()
    WhatAmI ()

    winclass MySubWin : MyWin
    WhatAmI ()
    Print ("I am a MySubWin")

    window MySubWin WinInstance

    main ()
    WinInstance.GetInfo ( )

    Ans29. This prints, "I am a MyWin". That's because the call to WhatAmI in GetInfo is resolved at compile time to the implementation of WhatAmI in the MyWin class.

    30. What is the o/p of the following example?
    winclass MyWin : AnyWin
    virtual WhatAmI ()
    Print ("I am a MyWin")

    GetInfo ()
    WhatAmI ()

    winclass MySubWin : MyWin
    WhatAmI ()
    Print ("I am a MySubWin")

    window MySubWin WinInstance

    main ()
    WinInstance.GetInfo ( )

    Ans30. This prints, "I am a MySubWin" because the version of WhatAmI is determined at runtime, when the class of object calling WhatAmI can be identified as a MySubWin, so the MySubWin version of WhatAmI is used.

    31. Can you raise your own exception in SilkTest? If yes how?
    Ans31. Yes, in addition to using built-in exceptions, you can define your own exceptions and generate them using the raise statement.

    Consider the following testcase:

    testcase raiseExample ()
    STRING sTestValue = "xxx"
    STRING sExpected = "yyy"
    TestVerification (sExpected, sTestValue)

    TestVerification (STRING sExpected, STRING sTestValue)
    if (sExpected == sTestValue)
    Print ("Success!")
    raise 1, "{sExpected} is different than {sTestValue}"
    print ("Exception number is {ExceptNum()}")

    32. State true or false
    All built-in exceptions have negative numbers, so you should use positive numbers for your user-defined exceptions.
    Ans32. TRUE

    33.Consider you have tested your web application, which ran on IE. Will your testcases handle different browser the same way?
    Ans33. In most cases, your include files (declarations) and scripts apply to any browser. You can run testcases against different browsers by simply changing the default browser and running the testcase, even if the pages look a bit different, such as pushbuttons being in different places. Because SilkTest is object-based, it doesn’t care about layout. It just cares what objects are on the page.
    But there could be certain situation where a test you ran successfully on one browser fails on a different browser because SilkTest cannot find the Web page of the application.

    34. What could be the cause and solution you think, when tests that ran successfully on one browser fails on a different browser?
    Ans34. Cause could be…
    Web browsers truncate Web page titles if they are too long. Each browser truncates long titles in a different way. SilkTest derives the tag for a page from the page’s title. The browser used to record the page declaration will recognize the tag derived from the page’s truncated title; other browsers may not.
    The following example shows how Netscape Navigator and Internet Explorer truncate the title of the same page in different ways.
    For the Web page entitled “Heretoday Com Information:

    Internet Explorer creates this tag:

    tag “http:??www.heretoday.com? . . . ?information.htm

    Netscape Navigator truncates the identifier to create this tag:

    tag “http:??www.heretoday . . . valuable?information.htm

    Use a wildcard (*) to abbreviate the tag unambiguously. For example:
    tag "*information.htm"

    35. If the resolution of the display is changed, do you need any modification in your SilkTest files?
    Ans 35. No. Silktest has a feature to overlay a logical grid of X rows by Y columns on a graphic that has evenly spaced logical GUI declarations for each hot spot. These X:Y row/column coordinates are resolution independent.

    36. Consider in the application you are testing, uses some third party components/controls, how would you test them?
    Ans36. Map the custom classes to a standard class. You can create your own properties of the custom class for verifying if necessary. Also you can create your own methods for the particular class.

    37. What limitations did you observe in SilkTest while your testing period?
    Did you observe any limitation in SilkTest while your testing period?

    Ans37. SilkTest cannot test dot Net applications.

    38.Consider a situation in web testing, when you are recording or playing back tests, SilkTest does not see the objects in your Web application. Instead, it sees custom windows.
    For example, it might see something like this when you are recording window identifiers and your pointer is on a Web page:

    Whereas it should be seeing something like this:

    BrowserPage.HtmlHeading("GMO OnLine")
    What could be the possible causes and solutions you find?

    Ans38. Possible Causes and Solutions
    ·Cause: The browser extension is not enabled.
    Solution: Enable the browser extension.
    ·Cause: The browser extension is enabled, but the default browser is not correct. For example, you might have extensions enabled for Explorer and Netscape, but the default browser is Explorer and you are testing Netscape.
    Solution: Change the browser type. You can change it in the Runtime Options dialog or you can specify it in a script using the SetBrowserType function.
    ·Cause: You are using an older version of the browser.
    Solution: Upgrade your browser.

    39.Consider the following code snippet, give its o/p.

    testcase ExceptDataExample ()
    Verify ("xxx", "yyy")
    Print (ExceptData ())
    raise 1, "My error"
    Print (ExceptData ())
    Print ("This will cause an exception. {5/0}")
    Print (ExceptData ())
    *** Error: Verify Failed - expected yyy, got xxx
    My error
    *** Error: Divide by zero
    40. Refer to the testcase below, what will be the o/p printed if sExpectedVal is not equal to sActualVal.

    testcase except1 (STRING sExpectedVal, STRING sActualVal)
    Verify (sExpectedVal, sActualVal)
    Print ("Verification succeeded")
    Print ("Verification failed")

    Ans40. Verification failed

    41. What will the following declaration and code do?

    Ans41. Because the object being acted upon has no tag, Silk inherently understands that it doesn’t exist and doesn’t even try to act upon it. Just leaves it alone and goes on its merry way. However, the really interesting part is that the GetClass method returns that it’s a DialogBox.
    42. An Application State cannot contain parameters.
    Example :
    appstate State1(String PlanID,String sLocation) basedon none
    State True or False.
    Ans42. True



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 08:42 AM.

Copyright BetaSoft Inc.