Setup SmartBear TestComplete
for SAFS on Windows

Updated 2016.01.20

Authors:

Copyright (C) SAS Institute
General Public License: http://www.opensource.org/licenses/gpl-license.php


Top, Verify Install, Update Old SAFS, Updates, Configure, Both TestComplete/Execute, HTML & Flex, Recognition Strings, Both TC9 & TC10,

The TestComplete Project (installed at C:\SAFS\TCAFS) has been "upgraded" to TestComplete V10.

If you are running an earlier version of TestComplete you will need to:

After the SAFS install, if you install a version of TestComplete that is newer than V10, you will need to manually open and convert the existing TCAFS project at C:\SAFS\TCAFS\TCAFS.PJS for your newer version of TestComplete.  Open the TCAFS project and TestComplete will prompt for your approval to convert the project for you.

Without proper conversion to match your version of TestComplete the TCAFS test automation will not be allowed to run.


Top, Verify Install, Update Old SAFS, Configure, Both TestComplete/Execute, HTML & Flex, Recognition Strings, Both TC9 & TC10

Script Updates and Overlays:

Released updates to SAFS and TCAFS can be found at:

If there are no updates to be installed, proceed to Verify Install.

TCAFS updates usually require you to add or replace scripts in your TCAFS project directories.  If you add or replace any script files to the TCAFS project space you will need to verify your project has these scripts properly imported.   To do this:

  1. Open the TCAFS project in Test Complete.

  2. Expand the Project Explorer TCAFS project tree to show and select the TCAFS "Script" item:

    TCAFS\TCAFS\Script Item   'Test->Check Syntax' MenuItem

  3. With "Script" selected, select the main menu item "Test->Check Syntax":

  4. If there are "No Syntax Errors" then the project should be ready.

  5. Resolve reports of missing files thru the "Add->Existing Item" menuitem when right-clicking the "Script" node:

    'Add->Existing Item' MenuItem

    The new scripts are found in the \SAFS\TCAFS\TCAFS\Script directory.

  6. Repeat Steps 3-5 until all the missing file errors have been resolved.


Top, Update Old SAFS, Configure, Both TestComplete/Execute, HTML & Flex, Recognition Strings, Both TC9 & TC10

Verify the SAFS/TCAFS Install:

SmartBear TestComplete 9.0 or higher must be installed and connecting properly to any local or remote License Server.  You should also review and heed the TestComplete setup information that follows before attempting to verify the SAFS/TCAFS Engine.

  1. If not done as part of the original SAFS install, or if TestComplete has been installed or upgraded AFTER the SAFS install:

  2. Open/Connect TestComplete to the project at C:\SAFS\TCAFS\TCAFS.PJS
    Allow TestComplete to convert the project repository if you are prompted to do so.
    Shutdown TestComplete once the conversion, if any, is completed.

  3. Verify SAFS/TCAFS runtime integration:

  4. Problem launching SmartBear TestComplete?


Top, Verify Install, Configure, Both TestComplete/Execute, HTML & Flex, Recognition Strings, Both TC9 & TC10

Using TestExecute on older SAFS Installs

  1. THIS STEP is only applicable if you installed TestExecute AND your C:\SAFS\TCAFS\TCAFS.vbs file is dated BEFORE 4/13/2011.

    SKIP this step if you installed TestComplete.
    SKIP this step if your TCAFS.vbs file is dated 4/13/2011 or LATER.

    Prior to the 4/13/2011 file, the SetupTCAFS.wsf file did not run properly if TestExecute was installed on the machine instead of TestComplete. Either put a copy of the newer TCAFS.vbs on your machine and run the SetupTCAFS.wsf file, or do the following instead of running the SetupTCAFS.wsf file:

  2. Before running the C:\SAFS\Project\runTCAFSTest.bat file:

  3. The 1st time you run the runTCAFSTest.bat file, it may take a little time for TestComplete (or TestExecute) to become visible. Also, at the end of the test, it may take some time for TestComplete (TestExecute) to shut down. Please be patient.


Top, Verify Install, Update Old SAFS, Both TestComplete/Execute, HTML & Flex, Recognition Strings, Both TC9 & TC10

TestComplete / TestExecute: Configuration and Usage Tips

  1. Minimize TestComplete during playback:
    (Unfortunately, I think this has to be set for each of your TestComplete projects.)

  2. Options to ensure quick playback:

  3. Other Options

  4. TCAFS Timeout so TestComplete has time to open during SAFS test:


Top, Verify Install, Update Old SAFS, Configure, HTML & Flex, Recognition Strings, Both TC9 & TC10

Configuration for running either TestComplete or TestExecute on the same machine

Read this entire section before deciding which method to use to set your machine for either TestComplete or TestExecute.

  1. When you are just running tests and not developing tests, you should use TestExecute instead of TestComplete.
  2. TestExecute licenses are separate and cheaper than TestComplete licenses, so you can have more of them.
  3. You can have both TestComplete and TestExecute installed on the same machine and you can execute either one.
  4. You can modify the the System Environment Variables or C:SAFS\TCAFS\TCAFS.vbs file to invoke TestExecute instead of TestComplete.

  5. You can switch runtime execution between TestComplete and TestExecute by setting the system environment variable TESTCOMPLETE_EXE to the desired EXE--"TestComplete.exe" or "TestExecute.exe" and TESTCOMPLETE_HOME to the proper install location.

  6. You can also prepare separate TCAFS.vbs files--one for TestComplete and one for TestExecute.


Top, Verify Install, Update Old SAFS, Configure, Both TestComplete/Execute, Recognition Strings, Both TC9 & TC10

Configuration for HTML and Flex playback (IMPORTANT!):

NOTE: If you will be testing web and/or Flex applications you should make sure you have the latest patches for your version of TestComplete and TestExecute supporting the versions of the browsers you will be using for testing.

Go to TestComplete Download Center and get any and all patches and instructions to apply the patches for BOTH TestComplete and TestExecute.

You will also need to follow the instructions in this Smartbear Support Article to install and configure the Adobe Debug Flash Player for Flex testing.

Additional information for configuring the debug player for Internet Explorer:

  1. Download Adobe Debug Flash Player.
  2. See Version Information Here
  3. Configure for HTML and Flex playback per the install document above.
  4. Configure the Flash Player for Flash injection:

You also need to verify/edit your TestComplete Project Properties settings:

  1. Open TestComplete
  2. Open your project (for our purposes, this is the TCAFS project)
  3. From the main menu, select Tools > Current Project Properties
  4. On the left side select Open Applications > Web Testing
  5. On the right side select "Tree" from the Tree model dropdown.
  6. Save the project
  7. Exit TestComplete

TestComplete / Execute Enablement:

  1. When you first move to Flex testing, you must make sure the your TestComplete Project directory (Ex: C:\SAFS\TCAFS\TCAFS\) has an up-to-date TCAFS.mds file appropriate for your version of TestComplete.

  2. The System Environment "PATH" variable should have the STAF and SAFS "bin" directories at the beginning of the PATH:

  3. After making any System Environment variable changes, make sure you log out and back in so the Window's user session takes the changes.


Top, Verify Install, Update Old SAFS, Configure, Both TestComplete/Execute, HTML & Flex, Both TC9 & TC10

Determine recognition strings:

  1. Open TestComplete
  2. Open your project or create a new project for determining your project strings. (Most testers use the C:\SAFS\TCAFS project.)
  3. In your application, open to the dialog of interest (the one you want to determine the recognition string).
  4. In TestComplete, in the toolbar, you can use the 'Map Object from Screen' icon or the 'Object Spy' icon.
  5. Use the 'Map Object from Screen' tool if you just need the long string as this tool will not block your other windows.
  6. Use the 'Object Spy' tool if you need information about object properties or if you need the short string for TFSM.
  7. In the tool, click the "drag" button to the desired screen or component and release the mouse button.

  8. Be patient....Really patient.

  9. Eventually, the recognition string will be appropriately displayed in the tool.

  10. HTML and Flex tip:
    For full strings, highlight the entire browser window to get the string for your Window component. The Window recognition string is not a prefix for the component strings in that window, so use the full string as given by TestComplete for each component as well.

  11. For TFSM strings see the TFSM FAQ.

    If you are using TFSM strings:


Top, Verify Install, Update Old SAFS, Configure, Both TestComplete/Execute, HTML & Flex, Recognition Strings

TestComplete 9 and TestComplete 10 on the same machine:

When\If you upgrade to TestComplete 10 it will prompt you to convert your project files to the TestComplete 10 format. So, before trying TestComplete 10, be sure to back up your TCAFS directory C:\SAFS\TCAFS.

The V10 conversion does not change many files, but does modify the .pjs and .mds files. So for those who want to try TestComplete 10, do the following (Assuming you have TestComplete 9 on machine already)

  1. Make a copy of C:\SAFS\TCAFS
  2. Install TestComplete 10 (it goes to a unique directory)
  3. Make sure your License Manager is pointing to appropriate licenses, if applicable.
  4. Bring up TestComplete 10, open up your existing TCAFS project (File->Open)
  5. It will prompt to convert files (do so)
  6. Exit TestComplete

If you want/need to have both TestComplete 9 and 10 on the same machine, please be aware of the following:

  1. Have separate TCAFS project directories for V9 and one for V10

    Make sure you made a copy\backup of the V9 TCAFS Project before using V10 on it.
    TestComplete 10 will CONVERT the TCAFS project as mentioned above!
    This will allow you to use both V9 or V10, if you wish.

  2. Note that V9 and V10 are in different named default install directories

  3. Updating the applicable V9 or V10 TCAFS.VBS file to execute TestComplete or TestExecute

  4. Updating the Adobe Debug Flash Player..\mm.cfg file to load the correct swf

Making sure you have both V9 and V10 swf directories defined in the Flash Player Settings Manager

If you want to run your tests with TestComplete 10, you will have to update your TCAFS.VBS script to point to TestComplete 10 instead of 9. Then let it rip.


Top, Verify Install, Update Old SAFS, Configure, Both TestComplete/Execute, HTML & Flex, Recognition Strings, Both TC9 & TC10,
Carl Nagle, SAS
Project Manager, SAFSDEV
Subscribe to appropriate Support Forums to review support archives and ask questons.