This video demonstrates how to perform a web protocol level recording, and replay of the script. (Please visit the site to view this video) In Silk Performer Workbench click START HERE which will allow you to create a new project. The Outline project dialog will appear, and shows a list of the available project types within Silk Performer. It’s important to choose the correct project type for testing your application, and for the purposes of this demonstration the ‘Web Business Transaction (HTML/HTTP)’ project type was used. Give the project a suitable name and Description, and click Next to create the project. In the subsequent Model Script dialog you see the selected Application Profile is set to Internet Explorer by default. If you wish to use a different browser you can click on the dropdown and make your selection. By default Internet Explorer, Firefox, and Chrome are all automatically included. There is also a URL section where you should enter the URL of the application you wish to test. Here we used the Borland demo application called ShopIt. There are two other options – Start Recording, and Record over a secure connection. The Record over a secure connection option would be selected when recording secure sites. Clicking on it brings you to another dialog where you can import the relevant certificates to allow secure recording. A very important step before you start recording is clearing the browser cache and cookies. In IE this can be achieved under the TOOLS menu. It’s also advised to set the default webpage to ‘about:blank’. When that is complete select ‘Start Recording’. When recording starts you’ll see the application appear in the browser, and the function count will start to increase in the Recorder. There are a number of useful options available in the recorder, one of which being the ability to create your own custom timers which will automatically be entered into the script. You can place these around groups of actions that you want to time together. T o create your own custom timer, click the ‘New Timer’ button, give the timer an appropriate name and click OK. Carry out the actions you want to be included in the timer, and when they are complete you can select the ‘Stop Timer’ option. Select the name of the timer you're stopping, and click OK. Another useful option in the recorder is the ability to add your own comments to the script automatically during record. To do this click on the ‘Add Comment’ button in the recorder, and enter the required details. When you have completed the required actions you should then be sure to close the application, in this case the browser, before you stop the recorder. This will ensure that there are no redundant hooks left behind in the application. This is an important step. Give your script a suitable name, bearing in mind you could have multiple scripts per project, and save the recording. You will now be displayed with the script you have just recorded containing all the actions taken during recording, including the MeasureStart and MeasureStop functions for the custom timer, and your custom comment. The next step in the Workflow is running a TryScript. The TryScript is a 1 user run and is designed to ensure that your script is running as expected, and to address any issues before trying to run your test. When you click on the TryScript option you have the option to select the relevant script, profile and usergroup to run. These last two options are covered in more detail in a later tutorial. There is also a check-box ‘Animated run with TrueLog Explorer’. This will display TrueLog Explorer, allowing you to watch the TryScript running, and it remains open so you can check everything ran as expected, and troubleshoot any issues. When the TryScript is complete you can step through the actions, and the Rendered view will show the pages that have been selected during record. A green tick on a node shows that that they have been successfully executed. You can also see the MeasureStart function entered during record, and on the MeasureStop function you’re displayed with the duration for the timer, which tells you the length of time taken for the steps within the timer to execute. For some of the later steps there is a red ‘X’, indicating that the step has failed. Clicking on this shows the application error “session timed out”. The Info tab contains a more detailed message on the error, and indicates that the server returned an error code. This is as designed as we have not yet performed any customization on the script. The ShopIt application is designed to generate a session error, and the next video in the series will demonstrate how to deal with this.
↧