Before Recording
  • Launch the TestSmith application in the usual way.
  • Open the pre-recorded script 'yahoo-login.smith'.
  • Read through the script, especially the comments. This is the kind of script you will record when following this Quick Start Guide.
  • Click the Play (green triangle) button on the TestSmith toolbar to run this script.
  • At the end of the playback, observe the report that is shown in the Report Window.


Prepare

  1. Open an IE Browser
  2. Set up your desktop so you can see both the IE Browser and the TestSmith application.
Record

  1. Click the Web Mode button on the TestSmith toolbar so it appears in its pressed down state.
  2. Click the Record (red circle) button on the TestSmith toolbar to start recording. A pop-up will appear entitled: "Configure Recording"
  3. From the list of windows select the IE Browser window. The title of this window will vary depending on your home page.
  4. Do not select any other windows. (Time to experiment later...)
  5. Do not select the Desktop or Task bar checkboxes.
  6. Click OK. Another pop-up will appear entitled "Set Script Properties".
  7. Enter nothing. The default name "default.smith" will be used for the script name. Other info can be entered at a later time, by selecting Properties from the Script menu.
  8. Click OK. You are now recording. You will see the wndInit command in the script (lower) window (which now takes up the whole TestSmith window space).
  9. Click on your IE Browser and perform some actions: click on links and buttons, enter text in input fields, select radio buttons, etc. Keep it short and simple. If you log in to an account you must log out before you end the recording, otherwise the playback will start in an unfamiliar state (i.e. logged in already!).
    CAUTION: do not use the Tab key to move between fields; use the mouse to click on each field that you plan to enter text into. Likewise, do not use the Enter key to submit a form; use the mouse to click on the Submit button instead.
  10. Click the Stop (red X) button on the TestSmith toolbar to stop the recording.
Playback

  1. Ensure the IE Browser is at the same page it was at when you began recording. (This directive is to keep this test simple - it is not a requirement of TestSmith playbacks.)
  2. Set the Playback Options: these should all be left at their default values. If you have previously changed these values, use the context-sensitive help (available by clicking the [?] button in the dialog title bar and then clicking on a control) to find out the default value for each option.
  3. Click the Play (green triangle) button on the TestSmith toolbar to start playback. A pop-up will ask if you want to play back the currently open script.
  4. Click YES. The script will start to play. You will see the report being created in the report (upper) window (which now takes up the whole TestSmith window space).
  5. Playback can be aborted at any time by clicking the Stop (red X) button, or pressing the key combination Ctrl+Alt+F10.
  6. Playback can be paused/resumed by pressing the key combination Ctrl+Alt+F8.
  7. Playback will end when the script has run through to completion.
  8. THERE MAY BE ERRORS. See next section.
Tinker (to get successful playback)

  • At the end of playback you may see some errors in the report. With HTML navigation clicks it is often because the navigation is slow and the expected element is not yet present when a command expects it.
  • To solve this problem simply increase the value of the Default Sync Timeout Playback setting, or add the zsync parameter to the command and set it to an appropriate wait value. If synchronization occurs before the specified wait time is reached the script will continue immediately; if synchronization does not occur within that time the command will output an error.
  • Another possible cause of error is when an anchor href specifies a URL which is dynamically created at runtime and may contain a generated id or similar.
  • Establish what the base URL is (enough to make it unique) and using just that text rewrite the hhref parameter using its fuzzy counterpart, i.e. hhref~=&your_text (where your_text is the unique bit of URL or a comma-separated list of the URL parts that must be matched, e.g. hhref~=&yahoo,com,mail would match with mail.yahoo.com/myemail?ac=23456789 , and so on...
  • The hhtml parameter may also need to be made into its fuzzy counterpart.
  • Additonal tinkering information can be found in the Creating successful Web Application tests article.
Experiment

  • Keep playing. The best way to learn this is by doing it.
  • Open the "datadriver.smith" script and read the comments.
  • Run this script in the different ways suggested.
  • Use the Context Help (?) button on the TestSmith main frame and on all the pop-up windows to get context-sensitive information.
  • Read the other help files available here.
  • Email questions, comments, etc. to support@qualityforge.
  • Have fun :-)
Further reference