Troubleshooting

Once you have documented your use cases, recording or coding your test scripts should be a relatively simple task. With Silk Performer you have both the record/playback option and the option of coding your test scripts manually. Each approach has its advantages and disadvantages. The most efficient way to create test scripts with Silk Performer is to combine the two approaches, as follows:

  1. With Silk Performer, record the scenario you have outlined in your use case description.
  2. Use TrueLog Explorer to visually customize your script (this is where the “Text synchronization” feature comes into play).
  3. For more complex scripting, edit the generated BDL script manually. Manually editing a script is also the best option for inserting the content of your use case into your test script (in the form of comments). See the example below, which uses numbered notation format:
    100.001 In the “Microsoft Word” window, navigate the menu to File, Open….
    100.002 [The “Open” dialog window shows] 
    100.003 Select Test.doc.
    100.004 Click Open.
    100.005 [The “Open” dialog window goes away]
    100.006[The “Microsoft Word” window has focus again]
  4. You can now copy/paste these contents into your BDL script as follows:.
    // 100.001 In “Microsoft Word" window, 
        hwndWordMainWindow := CitrixSearchWindow(“*Microsoft
        Word”, MATCH_Wildcard);
        CitrixWindowBringToTop(hwndWordMainWindow);
    
    // navigate the menu to File, Open…. 
        CitrixKey(KEY_Alt);
        CitrixKeyString("f");
        CitrixKeyString("o");
    
    // 100.002 [The “Open” dialog window shows] 
        hwndOpenDialog := CitrixWaitForWindowCreation(“Open”,
        Match_Exact);
    
    // 100.003 Select Test.doc. 
        CitrixMouseClick(150, 100, hwndOpenDialog, MOUSE_
        ButtonLeft);      
    
    // 100.004 Click Open 
        CitrixMouseClick(300, 200, hwndOpenDialog, MOUSE_
        ButtonLeft);
    
    // 100.005 [The “Open” dialog window goes away] 
        CitrixWaitForWindow(hwndOpenDialog, EVENT_Destroy);
    
    // 100.006 [The “Microsoft Word” window has focus again] 
        CitrixWaitForWindow(hwndWordMainWindow, EVENT_Activate);
    If the script fails, these comments will help you determine where the script failed in reference to the use case.