Suitest Test Editor

In the Suitest Test Editor you can create, edit and run automation scenarios without programming. You can also export the test cases to JavaScript files.


To create an automation test in the Test Editor press New button on the main toolbar and then add operation lines to perform actions the scenario needs

Example test scenario in the test editor
Example test scenario in the test editor

The main toolbar

The main toolbar provides access to operations with test scenarios and their individual lines. All the buttons have a corresponding keyboard shortcut for quicker access. Check the keyboard shortcuts by pressing . (full stop).

Manipulating test cases and lines within a test case

Main toolbar available actions - basics
Main toolbar available actions - basics
Toolbar actions legend
  1. New test - creates a new test in the specified folder.

  2. Save test - saves the test.

  3. More menu

    • Clean test - cleans up the results of the previous test execution.
    • Delete - deletes test.
    • Export - exports the test definition either in a JSON format or in JavaScript API format.
    • Import - imports the JSON test definition.
  4. Undo (Redo) - reverts (replays the reverted) edit operations.

  5. Paste, Copy, Cut, Delete, Duplicate - perform the standard editing operations on the selected test lines.

  6. Merge - merge compatible lines into one.

  7. Create snippet - creates a new snippet from selected lines and replaces the lines with a reference to that snippet.

Creating new test lines

All test operations available for the currently selected configuration are presented on the main toolbar. Pressing a button will create a line template for that particular test operation that can be further customized.

Example line template for Wait until operation in test editor
Example line template for Wait until operation in test editor

Default line actions on main toolbar

For HTML-based platforms the line actions are arranged on the main toolbar in the following way:

Main toolbar available actions
Main toolbar available actions
Toolbar actions legend
  1. Assert - inserts an assertion line.

  2. Press button - inserts a button press line.

  3. Poll URL - inserts a poll URL line.

  4. Wait until - inserts a delayed assertion line.

  5. Run test inserts a reference to a test snippet.

  6. Sleep - inserts a sleep line.

  1. Clear data - inserts a Clear application data line. (Not available for Apple TV and Roku)

  2. Exec cmd - inserts an execute command (Only HTML-based platforms) line.

    1. More... a drop-down with items:

    2. Open app - inserts an open app line.

    3. Open URL - inserts an open URL line. (Only HTML-based platforms)

Main toolbar line actions for websites

The Websites platform dedicated to testing traditional websites and web apps has the main toolbar line actions arranged in the following way:

Main toolbar available actions for the **Websites** platform
Main toolbar available actions for the Websites platform
Toolbar actions legend
  1. Click on - inserts a click on line.

  2. Send text - inserts a send text line.

  3. More... a drop-down with items:

Interactive test recording and execution

The currently active test can be executed on a connected device directly from the Test Editor. Editor can also record the interaction with the app and such recording can be used as a basis for a test.

Test editor run / schedule
Test editor run / schedule
Toolbar actions legend
  1. Record Navigation - switch recording on or off.

  2. Schedule on devices - opens Test packs defined for this application.

  3. Run test interactively - drop-down with items:

    • Run test - runs test interactively on a connected device.
    • Run test with preview - runs test interactively with a previewturned on.
    • Other drop-down items are configurations created for the current app.
  4. Help - opens documentation pages.

  5. Actions - opens a window with all the actions available in test editor and their shortcuts.

Exporting and importing test definitions

You can export test definition in either JSON or JavaScript API format. The JSON format of the test is proprietary and intended for transferring the test between applications.

After exporting to JavaScript API format you can further edit the JavaScript code and run it with Suitest API launcher.

Please note, that currently the references to view elements are exported as is, meaning that elements referenced in the test are expected to exist (in element repository) before the definition will be imported again.

Recording navigation

Suitest can record navigational and other events that happen within the application. This recording can serve as a good basis for creating a test. You will only need to add your own assertions. (Not available for Android TV and Apple TV)

Merging compatible lines

A test recording may become littered with many press button lines. You can combine similar press button lines by using the Merge lines operation on the main toolbar.

Merging press lines
Merging press lines

You can also create lines with multiple presses without merging existing lines.

Press button line manipulations in Test Editor
Press button line manipulations in Test Editor

Previous versions of a test definition

Every time you save the test Suitest creates a snapshot of the test definition. A list of such snapshots is accessible from revisions link close to the test title:

Revisions of this test
Revisions of this test

You can view a particular revision in read only mode to check on past work. If necessary the test can be reverted to a previous revision or saved as a new test.

The virtual remote control

Using the virtual remote control (VRC) you can control devices right within Suitest. Connect to a device, then press on the small VRC toggle on the right hand side to bring up the VRC.

TV remote and Xbox One controller
TV remote and Xbox One controller

The Suitest console

The Test editor has an integrated device console that displays application logs.

Device console in Test Editor
Device console in Test Editor

The Suitest console also allows you to view network requests that are made by the application during test execution. From the log you can easily create assertions on the network requests.

Showing network request logs
Showing network request logs
Supported by platforms

Currently the Suitest console is only available for HTML-based and Xbox One Native platforms.

HTML based

Most devices will support console API, for those devices that do not you can use the suitestConsole object to log messages to Suitest console. You can also send JavaScript commands to the device through the console's command line which will be executed in real-time.

The suitestConsole function is only available for apps that have included the Suitest instrumentation library. It is used like so:

suitestConsole.log('This will appear in the Suitest console');

Since you should not use the instrumentation library in your production code you should prepare your code accordingly.

For example, by using the following initialization snippet:

if (!window.console) {
    window.console = suitestConsole || {
        log : function(){/* own implementation*/},
        info : function(){/* own implementation*/},
        warn : function(){/* own implementation*/},
        error : function(){/* own implementation*/},
    }
}

Xbox One (Native)

Once your application is instrumented you can use the Suitest console.

Suitest console supports the following:

await Suitest.Console.ErrorAsync("Your message...");
await Suitest.Console.WarnAsync("Your message...");
await Suitest.Console.InfoAsync("Your message...");
await Suitest.Console.LogAsync("Your message...");

Since you should not use the instrumentation library in your production code you should prepare your code accordingly.

If you followed the managing native app builds guide then you can wrap the console method calls like so:

#if SUITEST
await Suitest.Console.ErrorAsync("Your message...");
#endif

If you like to use the Suitest console in more often then it would make sense that you create a logger class and a special method in it that has the wrapper like the example above.

Beware that if you send empty messages with null or "" an exception System.ArgumentException will be thrown.

TraceSource

TraceSource is optional NuGet package for logging. Our instrumentation library adds the SuitestListener and forwards all the messages to the Suitest console.

Trace.Listeners.Add(new SuitestListener());

For example, when you call:

Trace.WriteLine("My message from Trace.");

The message will appear in the Suitest console. If you would like to keep this functionality do not remove the listener.