TestComplete 4 Sneak Peek - TC4 Script Compatibility
Test and Monitor | Posted October 11, 2005

So, you want to upgrade to TestComplete 4 but are reluctant because you wonder if it will support TestComplete 3 scripts. Well it does, so don't worry! In this blog entry I will discuss the compatibility between earlier versions of TestComplete and TestComplete 4 scripts.

One of the design goals of TestComplete 4 was to provide backward compatibility for scripts introduced in earlier versions of the product. As a result, TestComplete 4 includes the same programming objects that existed in earlier versions and supports features that were introduced in TestComplete 3.0 and earlier.

However, some objects and subsystems have new advanced functionality, which makes them incompatible with their predecessors. In some cases, the backward compatibility is simply impossible. For instance, the Log program object now lets you post images along with messages to the test log, and parameters of the Message, Warning and Error methods are not compatible with parameters of these methods in earlier versions. Also, the object offers some new methods that let you organize the log content better. These new methods could not be added earlier, because they did not match the old log’s architecture. All of these changes made the test log of TestComplete 4 incompatible with the test log of TestComplete 3. But don't worry, to provide support for non-converted lines, TestComplete 4 includes a special plug-in named TestComplete 3 Compatibility. We will cover this plug-in in another blog entry.

When you open a project created in previous versions of TestComplete through TestComplete 4, the project is converted to a new format. When converting, TestComplete 4 automatically changes script statements. For example, TestComplete 4 converts the following objects:

  • Sys.Delay converts to Delay

  • Sys.GetOleObject converts to Sys.OleObject

  • Sys.ActiveWindow converts to Sys.Desktop.ActiveWindow

  • UnmappedName converts to Name

  • Options.Project.Directory converts to Project.Path

  • Options.Log.Enabled converts to Log.Enabled

  • Sys.LaunchApplications converts to TestedApps.RunAll

  • NetSuite converts to NetworkSuite

  • Sys.LowProcedure("procedureName") converts to LLCollectionName.GetProcedure("procedureName").Execute

  • .ParentObject converts to .Parent

  • .SLeft converts to .ScreenLeft

  • .STop converts to .ScreenTop

  • .WndIndex converts to .Index

  • Local variables are converted as well, for example:

  • Options.LocalVars.variableName converts to Project.Variables.variableName

  • Options.LocalVars.variableName converts to ProjectSuite.Variables.variableName

  • Options.LocalVars.variableName converts to NetworkSuite.Variables.variableName

  • TestComplete 4 sets bookmarks at all script lines that were changed automatically as well as the lines that it considers for a change. This way, users can always find the changed lines and rework the script if need be. With scripting compatibility and the thought put into the development of TestComplete 4, upgrading older TestComplete versions to receive new features and enhancements without worrying about manually changing mass lines of script code is a possibility. Stay tuned for more TestComplete 4 sneak peeks!


    By submitting this form, you agree to our
    Terms of Use and Privacy Policy

    Thanks for Subscribing

    Keep an eye on your inbox for more great content.

    Continue Reading

    Add a little SmartBear to your life

    Stay on top of your Software game with the latest developer tips, best practices and news, delivered straight to your inbox