Eggplant Studio
Overview
In Preview
This extension is currently in preview state. We appreciate your patience as we fine-tune its capabilities.
We welcome your feedback! Please contact our Customer Support with any feedback or questions.
In the fast-paced world of software development, test automation plays a pivotal role in ensuring applications' efficiency, reliability, and quality. Keysight Eggplant Test ("Eggplant Test") provides a testing solution that is essential for test automation engineers.
This extension redefines and streamlines the test script creation and debugging experience for Eggplant Test. It combines the power of VS Code with the unique automation features of Eggplant Test, enabling you to author, debug, and run Eggplant Test SenseTalk scripts directly in VS Code.
Table of Contents
Features
The Eggplant Studio VS Code extension supports your test creation process all in one place with the following features:
Walkthroughs demonstrating how to use the extension.
An editor for authoring and editing test scripts, with line numbers, syntax highlighting, semantic tokens, tooltips, and auto-complete for the Eggplant Test “SenseTalk” language. It also lets you open suites containing test scripts and other test artifacts, such as images and resources.
Connections to your systems under test (SUTs) so you can interactively develop and run tests.
Image Capture capability on your SUTs to save test images to your suite.
Magnetic snapping during image capture to auto-identify image boundaries. Magnetic Snapping during Image Capture
Assisted Capture capability during Image Capture that allows you to capture images from a SUT, assign actions to them, and insert the appropriate SenseTalk code snippet in your script in order to execute them.
The ability to view images edited using Eggplant Test tools Image viewer demo, and to apply edits direct in Eggplant Studio using our new image editing toolbar.
A debugger for running and debugging scripts, with options to run entire scripts or selected lines, set breakpoints, and inspect variables and call stacks.
Compatibility with existing Eggplant Functional suites.
System Requirements and Recommendations
- VS Code 1.88 or the latest stable version. (Note: the capability to drag a SUT to a new window is available in VS Code 1.88)
- Eggplant Functional 23.2.0 or later. For Red Hat Enterprise Linux (RHEL) version 8 or later, you need EPF version 23.3.0 or later.
Supported Systems |
Versions |
Microsoft Windows (64-bit) |
10/11, Server 2019/2022 |
Red Hat Enterprise Linux (RHEL) (64-bit) |
8 |
CentOS (64-bit) |
7.9 |
Ubuntu (LTS) Linux (64-bit) |
22.04 |
Mac Silicon (ARM64), Intel (x64) |
macOS 14/13.6 |
Note: Eggplant Functional provides two install packages for both RHEL and Ubuntu. Be sure to download and install the appropriate one for your Linux system.
Ubuntu Support
We now support debugging in Ubuntu 22.04.
For installation instructions on how to install Eggplant Functional on Ubuntu 22.04, follow this guide installing EPF on Ubuntu 22.04.
You can add a license via the terminal following this documentation adding a license (RLM)
Other Operating Systems
Eggplant Studio was tested with VS Code and the supported operating systems listed above, but other versions may also work. To debug or execute scripts, Eggplant Functional version 23.2.0 or later is required.
Installation
Download, install, and license Eggplant Functional 23.2.0 or later.
In VS Code, open the Extensions view, search for Eggplant Studio
, and select the extension authored by Keysight Technologies. (Install VS Code from a download here if it is not already installed.)
Click Install. When the installation finishes, a notification appears in the lower right corner and the Eggplant Studio icon appears in the Activity Bar.
After the extension installs, notifications appear in the lower right corner prompting you to acknowledge Keysight's End User License Agreement (EULA) and Privacy Policy.
After acknowledging the legal agreements, you see the option to open a Demo suite or an existing Eggplant Test suite if you have one. If you open the Demo suite, you can tour the extension via a simple walkthrough or explore sample scripts to see the capabilties of the extension.
You can also use the VS Code Command Palette to see a list of Eggplant Studio commands. Type Ctrl+Shift+P
on Windows or Cmd+Shift+P
on Mac and then Eggplant Studio
to see the list. The Eggplant Studio: Focus on Getting Started View
command takes you to the Getting Started walkthrough.
When you are ready to edit your existing Eggplant Test scripts:
- Open a new VS Code window (by choosing File > New Window in the VS Code menu bar).
- Click the Eggplant Studio extension icon in the Activity Bar.
- Click the Open a Suite button.
- Navigate to the root folder of your suite and click Open.
Note: You will need to click inside the SUT window to use keyboard shortcuts against it.
Demos
This section demonstrates how to use the various Eggplant Studio features in VS Code.
Open a Suite
Open a SenseTalk Script
Connect to a SUT
Eggplant Studio supports connecting to SUTs for interactive test development and execution. If you have saved connections in your local Eggplant Functional instance, Eggplant Studio will automatically import them from your Preferences (.plist file) and make them available in its Connections view. Note that you cannot add, edit, or delete connections in Eggplant Studio at this time. The currently supported connection types are:
- Android Devices
- Citrix (Windows)
- iOS Devices
- Sauce Labs Devices (iOS/Android)
- Sauce Labs Browsers
- Tutorial SUT
- (beta) Remote Desktop (RDP)
- Single System
- VNC
You can perform the following connection-related tasks in Eggplant Studio:
- View the status of a connection.
- Connect and disconnect.
- Drag a connection, the SUT
Connection Viewer
panel, to a separate VS Code window (requires VS Code version 1.88 or higher).
- Copy any error message by hovering over the connection status and clicking the copy icon when it appears.
- Capture images from your SUT Connection Viewer.
Display the Connection View
- To display the Eggplant Studio Connections view, open the Command Palette by typing
Ctrl+Shift+P
on Windows or Cmd+Shift+P
on Mac and then typing connections
.
- Select
Eggplant Studio: Focus on Connections View
when you see it suggested. Any known connections will be available in the Connections view. You can display information about a connection, including type and connection status, by clicking the down arrow to the left of it.
Connect to a Specific SUT
- In the Eggplant Studio Connection view, hover over the SUT you want to connect to and click the link icon to the right of the connection name. You will see a status message in the lower-right corner of the VS Code window that says "Connecting to SUT name."
Disconnect a SUT
- In the Eggplant Studio Connection view, hover over the SUT you want to disconnect from and click the plug icon to the right of the connection name. You will see a status message in the lower-right corner of the VS Code window that says, "Disconnecting from SUT name."
Run or debug
Image Capture
Image capture enables you to capture images from your SUT, crop them, and save them to your suite.
To capture an image:
- Click the
Capture Mode
button on the SUT screen
- Select the part of the image you'd like to capture. If a Capture Area is already drawn, you can press
Backspace
or Delete
to remove it and draw a new one.
- Click the
Save As...
button and choose where to store it
Image Capture comes with dedicated keyboard shortcuts included. Ensure the tab is in focus for them to work. Note: If the SUT window is in focus, keybindings will be sent to it instead.
For more information, see Image Capture Best Practices.
Magnetic Snapping during image capture
When capturing an image, Eggplant Studio auto-identifies the boundaries of the selected element and snaps the Capture Area to it. To override this behavior, hold the Alt
key on Windows/Linux or Option
on Mac while making the selection. After the initial snapping, any adjustments to Capture Area boundaries will be maintained when you save the image.
Assisted Capture
When capturing an image, a lightbulb icon appears next to the Capture Area. Clicking the lightbulb icon opens a context menu with available actions. Selecting an action triggers VS Code's Quick Pick functionality, prompting you for relevant inputs. Once collected, the code snippet is appended to an open SenseTalk script. For the best expereince when you have more than one script open, please arrange the tabs together in the same panel. The assisted script feature will then add the SenseTalk snippets to the one you have showing.
Image Viewer
While viewing an image in your test suite via the built-in image preview in VS Code, you can see the modifications made [using the Eggplant Test tools] by clicking the pencil icon in the Editor Toolbar. You can now apply image edits directly in Eggplant Studio using the first iteration of our new toolbar, which adds keep and ignore colour, search type and tolerance tools.
The Hot Spot
The Hot Spot, the red crosshair which appears at the center of the Capture Area, determines where to click.
If the desired click location is not the center of the Capture Area, you can set it manually by clicking anywhere on the canvas using:
Ctrl+Click
on Windows/Linux
Cmd+Click
on Mac
Ctrl+arrow keys
to nudge the hotspot 1 pixel on Windows/Linux
Ctrl+shift+arrow keys
to nudge the hotspot in increments of 10 pixels on Windows/Linux
Cmd+arrow keys
to nudge the hotspot 1 pixel on Mac
Cmd+shift+arrow keys
to nudge the hotspot in increments of 10 pixels on Mac
- Alternatively, you can toggle the
Set Hot Spot
mode via the toolbar and click anywhere on the canvas.
The toolbar position can be changed in Capture Mode. It can be undocked for more screen real estate and docked to the top or bottom by dragging it or using the dedicated buttons in the context menu.
Image Capture Shortcuts
You can modify the following shortcuts, unless otherwise specified, by running the >Preferences: Open Keyboard Shortcuts
command and searching for eggplantteststudio.imageCapture.
(Note: if you had set custom shortcuts prior to version 0.14, you will need to set them once more due to the underlying shortcut IDs changing.)
Wherever omitted in the following tables, the shortcuts on Mac are the same as those for Windows and Linux.
Note: Quick selection shortcuts allow you to quickly perform toolbar actions and return back to having the Capture Area focused in the default Crop Selection mode.
Windows/Linux |
Mac |
Description |
Shift+Click |
|
[Not modifiable] Quick selection shortcut enabling panning the Image Capture canvas by clicking and dragging it. |
Ctrl+Click |
Cmd+Click |
[Not modifiable] Quick selection shortcut enabling setting the Hot Spot at the click location. |
Alt+Click |
Option+Click |
[Not modifiable] Disable magnetic snapping while drawing a new Capture Area rectangle. Note, you can press Alt or Option after you have started drawing the rectangle. |
1 |
|
Toggle Capture mode (in Live mode) - enables the image capture functionality. |
1 |
|
Toggle Live mode (in Capture mode) - enables interacting with the System Under Test. |
2 |
|
Enable Crop Selection. Selects the currently drawn Capture Area rectangle, if any, allowing you to interact with it. In order to draw a new Capture Area, press Backspace or Delete to remove the current one. Drawing the Capture Area automatically snaps around an image using edge detection once the selection is drawn, unless Alt or Option were pressed. |
3 |
|
Enable Moving Canvas. Allows you to freely pan the canvas by clicking and dragging the mouse on it. |
4 |
|
Enable Setting Hot Spot. Allows you to freely set the Hot Spot location by clicking on the canvas. If no Capture Area exists, clicking and dragging will switch to the Crop Selection mode and draw a Capture Area instead. |
MouseWheel |
|
Pan the canvas vertically |
Shift+MouseWheel |
|
Pan the canvas horizontally |
Ctrl+= , Ctrl+MouseWheel |
Cmd+= ,Cmd+MouseWheel |
Zoom in. |
Ctrl+- , Ctrl+MouseWheel |
Cmd+- ,Cmd+MouseWheel |
Zoom out. |
Ctrl+Shift+R |
Cmd+Shift+R |
Reset the Image Capture view back to its initial state. |
Escape |
|
Exits from capture mode and returns to live mode. |
Backspace or Delete |
|
Removes the current crop box that has been drawn. |
Ctrl+arrow keys |
Cmd+arrow keys |
to nudge the hotspot 1 pixel |
Ctrl+shift+arrow keys |
Cmd+shift+arrow keys |
to nudge the hotspot in increments of 10 pixels |
- Note that you can also use a touchpad to pan and zoom.
Capture Area Shortcuts
Windows/Linux |
Mac |
Description |
Alt+Click |
Option+Click |
[Not modifiable] Disable magnetic snapping while drawing a new box. |
↑ / ↓ / ← / → |
|
Nudge Capture Area 1 pixel in the given direction |
Shift + ↑ / ↓ / ← / → |
|
Move Capture Area 10 pixels in the given direction |
Alt + ↑ / ↓ / ← / → |
Option + ↑ / ↓ / ← / → |
Resize Capture Area 1 pixel in the given direction |
Shift+Alt + ↑ / ↓ / ← / → |
Shift+Option + ↑ / ↓ / ← / → |
Resize Capture Area 10 pixels in the given direction |
Hot Spot Shortcuts
Windows/Linux |
Mac |
Description |
Ctrl+Click |
Cmd+Click |
[Not modifiable] Quick selection shortcut enabling setting the Hot Spot at the click location. |
Ctrl + ↑ / ↓ / ← / → |
Cmd+ + ↑ / ↓ / ← / → |
Nudge Hot Spot 1 pixel in the given direction |
Ctrl+Shift + ↑ / ↓ / ← / → |
Cmd+Shift + ↑ / ↓ / ← / → |
Move Hot Spot 10 pixels in the given direction |