Forum Discussion

rgratis's avatar
Frequent Contributor
12 years ago

Check Script Extension Version

Is there a way to check the version of a Script Extension from scripts?  We have a script extension that provides wrapper objects for our application.  We are continuously adding to the script extension over development cycles as new UI elements are added, so we run into cases where a user is attempting to run a test script on an installation of TestComplete with an outdated extension.

I realize I can do an exact version match with aqEnvironment.IsScriptExtensionInstalled, but this means that every time we release a new version, we would have to update all test projects to check for the next version?  It seems like we really need to be able to do a "version is greater than" style check in test scripts.

If this feature isn't currently available in TestComplete, I think it would be a great addition (or even just a way to obtain the version field and do our own checks).
  • Can you not expose a .Version property from your extension?

4 Replies

  • I see that aqEnvironment.IsScriptExtensionInstalled has a version parameter.

    Can you have this version parameter published somewhere in your network and retrieve it before calling 
    IsScriptExtensionInstalled, maybe with something like "getLatestPluginVersion"?

    You would still have to update this page, but this change would be centralized at least, and it makes sense that you have some official source to know what is the latest approved version for an extension.
  • hlalumiere's avatar
    Regular Contributor
    Can you not expose a .Version property from your extension?
  • rgratis's avatar
    Frequent Contributor
    Yes, we would need to update the version in two places whenever we made a release.  Seems a shame to already have a version field there and not have access to it.  I was just wondering if there was a way to access the version that I was not aware of.  Thanks for the reply.
  • rgratis's avatar
    Frequent Contributor
    That's an interesting idea, but it is probably more than we need at the moment.  Test scripts don't always have to be run with the latest version, but they do have minimum extension versions, before which they will not work.

    For now, I've implemented the previous suggestion and added an "ExtensionVersion" property to one of the runtime objects.