Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Travetto PluginNew to Visual Studio Code? Get it now.

Travetto Plugin

Timothy Soehnlin

|
110 installs
| (0) | Free
VS Code plugin for interacting with the Travetto framework
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

VS Code Plugin

The VSCode plugin directly integrates with Travetto framework, exposing some of the Command Line Interface functionality.

The currently supported features are:

  • Real-time test evaluation and debugging
  • Application launching with parameters
  • Miscellaneous utilities

Testing

The test related functionality relies upon the Testing module being installed, and used to define tests (@Suite and @Test).

Real-time Test Evaluation

The real-time test functionality will re-evaluate your test code on save. This means as you type and save, the test will run. The test will provide feedback inline, using green to indicate success, red to indicate failure, and gray to indicate unknown.

Real-time Testing

Debugging Tests

While working on a test, if you want to debug it, you can press running command-shift-t on OSX or ctrl-shift-t on Windows/Linux. This will start a debug session with the current line activated as a breakpoint. This allows you to seamlessly jump into a debug session while writing tests.

Debugging Single Test

In addition to manual invocation at a line, each test has a CodeLens, that allows for trigger the test as well.

Debugging Single Test

Commands

  • Travetto: Debug Tests to force a running all the tests in debug mode. Will not establish a breakpoint, but will use any existing breakpoints.
  • Travetto: Re-run Tests to force a full re-run of all the tests in a given document

Application Launching

While using the Application, a common pattern is to use @Application annotations to define entry points into the application. These entry points can take parameters, and if using the cli, you can invoke them with parameters, type checked and validated.

The plugin exposes this functionality as a command, to allow you to debug these applications directly from the editor.

Running

Run Workflow

Launching relies upon the command Travetto: Run New Application. This will show you a list of the available entry points in the application, with the parameters they support. Selecting an application will take you through the parameter flow to select inputs, and once all parameters are selected, your application will launch.

After running and selecting a configuration for an application, you can now access those configurations via Travetto: Run Recent Application. This allows you to execute a recent run that you can invoke immediately without prompting for inputs. If you find yourself running the same application multiple times, you can also invoke Travetto: Run Most Recent Application to bypass application selection overall.

Exporting and Customizing

Export Workflow

If at any point in time, you wish to modify the launch configuration of any application, you can execute the command Travetto: Export Application Launch, and it will provide the same options as launch. The only difference is that instead of running the application when it's done, you will have a new launch config in your debug launch configs. This option is now completely independent from the plugin and can be modified without issue.

Commands

  • Travetto: Run New Application to launch a new application config
  • Travetto: Run Recent Application to launch a previously configured application
  • Travetto: Run Most Recent Application to launch the most recently run configured application
  • Travetto: Export Application Launch to export an application config

Email Template Development

While using the Email Templating module, the desire to visual inspect output, as well as quickly test changes is paramount. To that end, the plugin supports the ability to compile, view, and send email templates all from within the plugin.

The plugin exposes this functionality as a command, to allow you to debug these applications directly from the editor.

Editing

Any file that ends with .tpl.html is assumed to be an email template, and will trigger background compilation upon editing the file. All of the following commmands require the user to be actively editing the .tpl.html file to be available.

Additional, for rendering the email, a context may be needed to exercise the various logic paths. The plugin picks up resources/email-dev-context.json by default, and if its not found, then an empty object is provided.

Commands

  • Travetto: Preview Email HTML to view the html version of the rendered template
  • Travetto: Preview Email Text to view the text version of the rendered template
  • Travetto: Send Email Template to trigger sending an email (requires SMTP configuration)
  • Travetto: Email Template Context to view/edit the context file used to render the template

Misc Utilities

Currently the supported commands are:

  • Travetto: Clean to run the cli operation travetto clean. This will purge the project's cache, which is generally after workspace changes, like npm installs.

Release Info

Requirements

  • You should have the Travetto framework installed, version 1.1.0 and higher.
  • Tests require the Testing module to be installed.
  • Application running requires the Application module to be installed.

Known Issues

  • None

Release Notes

1.1.x

  • Introduced the email template functionality

1.0.x

  • Complete rewrite of plugin
  • Test framework integration completely inverted, and majority of logic offloaded to framework

0.5.x

  • Introduced application launching
  • Resolved test stability issues
  • Introduced clean functionality
  • Contact us
  • Jobs
  • Privacy
  • Terms of use
  • Trademarks
© 2021 Microsoft