Feature Release: Script Includes

Have you ever had to update hundreds or thousands of test steps because a single button or label has changed? The process is tedious and error prone.

This is why the Toffee team yesterday added the include script command to Composer’s Early Access edition. This command runs one script from your library from inside another.

Use the include command inside your scripts, or enter it directly into the Composer Workspace to watch it work in real time, as shown in the following video:

The command takes two forms. The first form references the name of the script in your library that you want to include:

include script "Login as Administrator"

The second form references its short code:

include script with short code publish

Group commonly-used test steps together into one script, and call that script from other scripts. When changes to your tested application force you to change those steps, you only have to change them in one place, not hundreds or thousands.

Scripts can be nested inside one another, so that script A includes script B includes script C, etc. Composer rejects scripts that call themselves, either directly (A includes A) or indirectly (A includes B which includes A).

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.