Skip to main content
Version: 23.3

Creating Scripts with Eggplant Functional

Scripts are the basis of your automated testing with Eggplant Functional. Scripts are created using a language called SenseTalk, an English-like scripting language for controlling your system under test (SUT). Scripting with Eggplant Functional is easy, and a variety of script creation workflows are possible. Read on to learn about the different approaches to script creation, and find the approach that works best for you and your team.

The Suite window and Viewer window are essential to script creation. The Suite window is where all of your scripts and images are managed, and the Viewer window is where you capture your images for use with your scripts. You can capture images manually, by using Turbo Capture, or by using assisted scripting.

Suites

Before you can create your first script, you must create a suite. Eggplant Functional organizes and stores your scripts, images, results and schedules in folders called suites.

To create a new suite, choose File > New Suite in Eggplant Functional. This opens the Suite window with the Guide page by default. For information about the Suite window and how to use it, see Suite window.

Eggplant Functional creates each suite folder with the following subfolders by default: APITests, Features, Images, Resources, Results, Scripts, and TableScripts. You can use the Default Suite Directory General Preference to specify the location where you want Eggplant Functional to create your suite folders. When you create your scripts and save them, Eggplant Functional stores them in the suite's Scripts subfolder. After you run a script or scripts, Eggplant Functional stores the results and information about the run in the suite's Results subfolder.

Scripts

Before scripts can be arranged into larger tests, they must be created using Eggplant Functional, using one of the script creation workflows:

  • Assisted Scripting: Use the toolbar icons in the Viewer window to insert actions into a script.
  • Turbo Capture: Record your interactions with a live SUT, then create SenseTalk code to reflect those actions.
  • Autosnippet Generation: This workflow creates short script pieces that can be used as handlers or snippets. It's optimized for use with Eggplant AI, but you also can use it to make your scripts more modular, which is an Eggplant Functional best practice.
  • Manual Script Creation: Write SenseTalk code in the Script Editor.

After scripts have been created, they can be combined to create larger tests, and these script structures can be managed using a primary script, using Eggplant Manager, or with keyword-driven testing. If you've generated snippets, you can integrate them with Eggplant AI.