TestComplete 8 Sneak Peek: Script Extension Improvements

Script extensions are plug-ins for TestComplete created in VBScript and JScript and used for extending TestComplete functionality. Objects and actions provided by script extensions are defined by XML elements in the description.xml file.

The script extension engine now supports two new elements: a LogAction element and an Option element which provides new features for creating script extensions.

LogAction Element

Now you can create your own procedures for exporting, processing and submitting tests results to issue-tracking systems. A new LogAction element supported by TestComplete’s script extension engine allows you to specify actions that process the test results.

Action items specified by the element are added to the new Export Log via Script Extensions group on the Log panel toolbar.

When you click the log action item, TestComplete saves the currently opened test log to the temporary .MHT file and passes it as the parameters to the code routine specified by the script extension. The routine accepts the file and performs actions over it. After the routine’s execution is over the temporary file is removed.

Routines processing the test log get exported to the .MHT file as the parameter automatically. You do not have to create any helper routines to export and obtain that file.

For the new log action you create, you can specify a custom icon that will be displayed on the Log panel in the Export Log via Script Extensions group. You can also add user forms to the extensions. These user forms will be displayed during the test data processing and used to obtain data required for importing data to the issue-tracking systems.

By default, TestComplete already contains several script extensions that provide integration with AxoSoft OnTime, Atlassian JIRA and Software Planner issue-tracking systems and allow creating error reports from the test log and submit the report to the database.

These extensions reside in the BinExtensionsScriptExtensions folder and add custom Post Defect to OnTime, Post Bug on JIRA and Post Defect to Software Planner actions to the Log panel.
For example, to submit the test results to the Software Planner database, click Post Defect to Software Planer item on the Log panel toolbar.

These script extensions provide dialogs to specify settings to post defects to the database. For example, when you export the test results to the Software Planer system, the Software Planner Integration dialog appears allowing you to specify connection settings and defect information.

The Add Defect Info to Software Planner Database Dialog

With the LogAction element you can create any custom operations for your test log data and create your own integration with issue-tracking systems.

Option Element

The script extension engine now allows you to specify extension’s options with the new Option element.

Extension’s options are available for both reading and writing and their values are stored between TestComplete executions. The values that are set during the TestComplete current session become available in the next session.

You can use the script extension options for storing data, conditions and settings required for extension executions and for extension parameterizing.

Since the options are account specific you can create script extensions with settings customized for each user.
For example, the TestComplete software package includes a script extension that allows submitting test results to the AxoSoft OnTime issue-tracking system.

The user login information and server location information is stored in extension’s options and is available after TestComplete restarts. You do not have to reenter the server name and the user name to access the OnTime database since the corresponding form fields are already populated.

The Add Defect Info to OnTime Database Dialog

When you create your own script extensions, you can specify the whole set of options for your script extensions and use the options for storing data and transmitting them between TestComplete sessions.

We hope these new features will be useful for you and will help you create more powerful script extensions for TestComplete and track defects even better. You can use these new features in the TestComplete 8 Beta so if you have not joined the beta testing yet, apply for the beta today.


Close

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