SilkPerformer Citrix Tutorial - Borland Technical Publications
SilkPerformer Citrix Tutorial - Borland Technical Publications SilkPerformer Citrix Tutorial - Borland Technical Publications
2 CREATING TEST SCRIPTS Verification & Parsing via OCR Adding OCR parsing functions Understanding OCR verification & parsing 9 In the Severity portion of the dialog box, specify the severity that is to be raised if the verification returns a negative result (Error, Warning, Informational, or Custom). 10 Click OK. 11 A confirmation dialog appears. Click OK to add the OCR verification function to your Citrix test script. Procedure To generate an OCR parsing function: 1 From SilkPerformer record a Citix session as described in the “Creating a Load Test Script” section of this chapter. 2 Run a TryScript run, with the Animation checkbox selected on the TryScript dialog. This opens TrueLog Explorer. 3 When the TryScript run is complete, select the API node that includes the bitmap screengrab of the screen on which you’d like to parse text. 4 Click and drag your cursor onscreen to select the screen region that includes the text you would like to parse. 5 Right-click in the selected area and select Parse Text from the context menu. 6 The Insert Parsing Function dialog offers parameters by which the parsing function can be configured. Though the default settings will likely be correct, you can adjust: - Parameter name - Enter the name of the parameter that is to receive the result of the parsing function. - Informational statement insertion - Select Print statement to insert an informational Print statement into the script after the Web page call. This writes the result of the parsing function to SilkPerformer's Virtual User Output window. Select Writeln statement (“write line” statement) to write the parsed value to an output file to facilitate debugging (in addition to writing the value to the Virtual User Output window as a Print statement does). Because generating output files alters load-test time measurements, these files should only be used for debugging purposes and should not be generated for full load tests. 7 Click OK. 8 A confirmation dialog appears. Click OK to add the OCR parsing function to your Citrix test script. String verification via optical character recognition (OCR) is achieved using CitrixVerifyText API calls. These functions are inserted via TrueLog Explorer 24 SilkPerformer Citrix Tutorial
2 CREATING TEST SCRIPTS Verification & Parsing via OCR during script customization. CitrixVerifyText functions compare text strings in replay bitmaps to determine if they are identical. CitrixParseText functions are available for parsing text. These API calls work in the same way that standard parsing functions work (Web, database, etc). Optical character recognition relies on pattern databases to recognize varying fonts and text styles. Font databases must be generated before OCR can be run. See “Citrix System Settings for OCR” for details. Only Citrix TrueLogs show verification and parsing API calls in the tree view. With other TrueLog modes (Web, database, etc), new API nodes are not added to the tree view. Note It is absolutely important to perform OCR operations on stable content, because when used on a frequently changing screen it is only a matter of timing which image to use for the conversion, which results in accidental results. When synchronizing on window events it is possible that the screen refresh is slightly delayed, which again results in timing dependent outcome. Therefore it is a good practice to either script a wait or a CitrixWaitForScreen function call before all OCR verification/ parsing functions. SilkPerformer Citrix Tutorial 25
- Page 1 and 2: Citrix Tutorial SilkPerformer®2010
- Page 3 and 4: Contents Introduction 1 Overview .
- Page 5 and 6: Introduction About these tutorials
- Page 7 and 8: INTRODUCTION Support for Citrix Ter
- Page 9 and 10: INTRODUCTION Support for Citrix Ter
- Page 11 and 12: 1 Defining 1Chapter Load Test Proje
- Page 13 and 14: 1 DEFINING LOAD TEST PROJECTS Defin
- Page 15 and 16: 2 Creating 2Chapter Test Scripts In
- Page 17 and 18: 2 CREATING TEST SCRIPTS Creating a
- Page 19 and 20: 2 CREATING TEST SCRIPTS Creating a
- Page 21 and 22: 2 CREATING TEST SCRIPTS Creating a
- Page 23 and 24: 2 CREATING TEST SCRIPTS Screen Sync
- Page 25 and 26: 2 CREATING TEST SCRIPTS Screen Sync
- Page 27: 2 CREATING TEST SCRIPTS Verificatio
- Page 31 and 32: 2 CREATING TEST SCRIPTS Trying Out
- Page 33 and 34: 2 CREATING TEST SCRIPTS Trying Out
- Page 35 and 36: 2 CREATING TEST SCRIPTS Trying Out
- Page 37 and 38: 2 CREATING TEST SCRIPTS Trying Out
- Page 39 and 40: 2 CREATING TEST SCRIPTS Trying Out
- Page 41 and 42: 2 CREATING TEST SCRIPTS Trying Out
- Page 43 and 44: 2 CREATING TEST SCRIPTS Trying Out
- Page 45 and 46: 3 Customizing 3Chapter User Data In
- Page 47 and 48: 3 CUSTOMIZING USER DATA Customizing
- Page 49 and 50: 3 CUSTOMIZING USER DATA Customizing
- Page 51 and 52: 3 CUSTOMIZING USER DATA Customizing
- Page 53 and 54: 4 Testing 4Chapter Citrix Web Inter
- Page 55 and 56: 4 TESTING CITRIX WEB INTERFACE SESS
- Page 57 and 58: 5 Citrix 5Chapter Project & System
- Page 59 and 60: 5 CITRIX PROJECT & SYSTEM SETTINGS
- Page 61 and 62: 5 CITRIX PROJECT & SYSTEM SETTINGS
- Page 63 and 64: 5 CITRIX PROJECT & SYSTEM SETTINGS
- Page 65 and 66: 6 Best 6Chapter Practices Introduct
- Page 67 and 68: 6 BEST PRACTICES Test Preparation U
- Page 69 and 70: 6 BEST PRACTICES Test Preparation I
- Page 71 and 72: 6 BEST PRACTICES Recording Use Case
- Page 73 and 74: 6 BEST PRACTICES Recording Use Case
- Page 75 and 76: 6 BEST PRACTICES Troubleshooting Sc
- Page 77 and 78: 6 BEST PRACTICES Issues Specific to
2 CREATING TEST SCRIPTS<br />
Verification & Parsing via OCR<br />
Adding OCR parsing<br />
functions<br />
Understanding OCR<br />
verification & parsing<br />
9 In the Severity portion of the dialog box, specify the severity that is to be<br />
raised if the verification returns a negative result (Error, Warning,<br />
Informational, or Custom).<br />
10 Click OK.<br />
11 A confirmation dialog appears. Click OK to add the OCR verification<br />
function to your <strong>Citrix</strong> test script.<br />
Procedure To generate an OCR parsing function:<br />
1 From <strong>SilkPerformer</strong> record a Citix session as described in the “Creating<br />
a Load Test Script” section of this chapter.<br />
2 Run a TryScript run, with the Animation checkbox selected on the<br />
TryScript dialog. This opens TrueLog Explorer.<br />
3 When the TryScript run is complete, select the API node that includes the<br />
bitmap screengrab of the screen on which you’d like to parse text.<br />
4 Click and drag your cursor onscreen to select the screen region that<br />
includes the text you would like to parse.<br />
5 Right-click in the selected area and select Parse Text from the context<br />
menu.<br />
6 The Insert Parsing Function dialog offers parameters by which the<br />
parsing function can be configured. Though the default settings will<br />
likely be correct, you can adjust:<br />
- Parameter name - Enter the name of the parameter that is to receive<br />
the result of the parsing function.<br />
- Informational statement insertion - Select Print statement to insert<br />
an informational Print statement into the script after the Web page<br />
call. This writes the result of the parsing function to <strong>SilkPerformer</strong>'s<br />
Virtual User Output window.<br />
Select Writeln statement (“write line” statement) to write the parsed<br />
value to an output file to facilitate debugging (in addition to writing<br />
the value to the Virtual User Output window as a Print statement<br />
does). Because generating output files alters load-test time<br />
measurements, these files should only be used for debugging<br />
purposes and should not be generated for full load tests.<br />
7 Click OK.<br />
8 A confirmation dialog appears. Click OK to add the OCR parsing<br />
function to your <strong>Citrix</strong> test script.<br />
String verification via optical character recognition (OCR) is achieved using<br />
<strong>Citrix</strong>VerifyText API calls. These functions are inserted via TrueLog Explorer<br />
24 <strong>SilkPerformer</strong> <strong>Citrix</strong> <strong>Tutorial</strong>