Eggplant Test 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' effciency, 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 Test 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 where you can author and edit your test scripts. The extension provides line numbers, syntax highlighting, semantic tokens, tooltips, and auto-complete to help you write scripts in the Eggplant Test "SenseTalk" language. It also lets you open the suites that contain your 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 so you can save test images to your suite.
The ability to view an image that has been edited using Eggplant Test tools Image viewer demo
As part of the image capture process, we've introduced magnetic snapping which auto-identifies the boundaries of your image. Magnetic Snapping during Image Capture
A debugger you can use to run and debug your scripts. The extension provides the option to run an entire script or just selected lines from it. It also supports setting breakpoints, and inspecting variables and call stacks.
If you are an existing user of Eggplant Functional, you can use your existing suites.
System Requirements and Recommendations
VS Code 1.88 or the latest stable version. (Note: The drag connections to a new window capability is available in VS Code 1.88.)
Eggplant Functional 23.2.0 or later. If you want to install Eggplant Functional on Red Hat Enterprise Linux (RHEL) version 8 or later, you need 23.3.0 or later.
Supported Systems |
Versions |
Micosoft 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 appropriate one for the linux system where you want to run Test Studio.
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
For Ubuntu you can add a license via terminal following this documentation adding a license (RLM)
Other Operating Systems
Test Studio was tested with VS Code and the supported operating systems shown above, but other versions can 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 Test 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 Test 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 Test Studio commands. Type Ctrl+Shift+P
on Windows or Cmd+Shift+P
on Mac and then Test Studio
to see the list. The Eggplant Test 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 Test Studio extension icon in the Actvity Bar.
- Click the Open a Suite button.
- Navigate to the root folder of your suite and click Open.
Note that you will need to click inside the SUT window in order to use keyboard shortcuts against it.
Demos
This section demonstrates how to use the various Eggplant Test Studio features in VS Code
Open a Suite
![Open a Suite GIF Demo](https://test-studio.eggplant.cloud/assets/demo-1-Open-a-suite.gif)
Open a SenseTalk Script
![Open a SenseTalk Script GIF Demo](https://test-studio.eggplant.cloud/assets/demo-2-Open-a-SenseTalk-Script.gif)
Connect to a SUT
![Connect to a SUT Demo](https://test-studio.eggplant.cloud/assets/demo-3-Connect-to-a-SUT.gif)
Test Studio supports connecting to SUTs so you can interactively develop and run tests. If you have saved connections in your local Eggplant Functional instance, Test 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 Test Studio at this time. The currently supported connection types are as follows:
- Android Mobile Device
- Sauce Labs (Browser and Device)
- TutorialSUT
- (beta) Remote Desktop (RDP)
Note: Any connections that are imported but are not a supported type, display below the supported connections in the Connections view.
You can perform the following connection-related tasks in Test 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 apears.
- Capture images from your SUT Connection Viewer.
Display the Connection View
- To display the Test 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 Test 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 Test 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 Test 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
![Run or debug GIF Demo](https://test-studio.eggplant.cloud/assets/demo-4-Run-or-debug.gif)
Image Capture
![Image Capture GIF Demo](https://test-studio.eggplant.cloud/assets/demo-5-Image-Capture.gif)
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 keep
- Click the
Save As...
button and choose where to store it
Image Capture comes with dedicated keyboard shortcuts included. You will need to have the tab in focus for them to work. Note that if you have the SUT window in focus, keybindings will get sent to it instead.
For more information, see Image Capture Best Practices.
Magnetic Snapping during image capture
![Magnetic Snapping during image capture GIF Demo](https://test-studio.eggplant.cloud/assets/demo-7-magnetic-snapping.gif)
When capturing an image, Test Studio now auto-identifies the boundaries of the element you've selected and snaps the boundary of the Capture Area to this element. 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 the hotspot boundaries will be maintained when you save the image.
Image Viewer
![Image Viewer GIF Demo](https://test-studio.eggplant.cloud/assets/demo-6-composite-image-viewer.gif)
While viewing an image contained in your test suite via the built-in image preview in VS Code, you can view the modifications you made to an image [using the Eggplant Test tools] by clicking the view icon in the Editor Toolbar. This a first iteration in our roadmap to deliver a collection of image editing tools within Eggplant Test Studio.
The Hot Spot
The Hot Spot, the little red crosshair which appears at the center of the Capture Area, is used to determine where to click.
In case 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
- Alternatively, you can toggle the
Set Hot Spot
mode via the toolbar and click anywhere on the canvas.
The initial toolbar position can be changed when in Capture Mode. The toolbar can be undocked if more screen real estate is desired. Once undocked, it can be docked to the top or bottom by either dragging it or using the dedicated buttons in the additional 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 the ones for Windows and Linux.
Note: the Quick selection shortcuts allow you to quickly perform all 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 - the default interaction mode for the Canvas when in Capture mode. Selects the currently drawn Capture Area crop selection rectangle, if any, allowing you to interact with it or to draw a new Capture Area by clicking on the canvas, outside of an existing Capture Area rectangle, and dragging around the image you want to capture. With version 0.13.21 that includes automatically snapping around an image using edge detection once a selection is drawn unless holding down Alt or Option . |
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. |
Ctrl+= |
Cmd+= |
Zoom in. |
Ctrl+- |
Cmd+- |
Zoom out. |
Ctrl+Shift+R |
Cmd+Shift+R |
Reset the Image Capture view back to its initial state. |
- Note that you can also use a scrollwheel or touchpad to zoom in or out.
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 |