Skip to content

Scenario Studio

itaiag edited this page Aug 9, 2016 · 1 revision

Scenario Studio

Once the developer has written a test or tests in java using the Eclipse development environment they are then saved in the class folder. The user then opens the JRunner and starts writing JSystem scenarios and executing them by opening the JRunner and activating the "run" batch script.

JRunner Environment Overview

The JRunner work environment is divided into two main modules, the scenario studio where the scenarios are built and configured and the scenario runner, where configured test scenarios are run, analyzed and published.

The scenario editor is divided into five tabs, the most important of which is the "Tree Tab" that display the list of tests as they were written in java code adhering to the java hierarchical layout convention. These tests are dived into classes and function methods that appear with check boxes alongside them. To create a new scenario the user simply checks the required method or methods, clicks on the "Add to Test Scenario" button and the methods are added to the scenario runner pane.

The user can now run the test scenario by pressing the "play button", JSystem then signals the SUT and performs the test method functions that have been imported into the scenario runner from the scenario editor.

Scenarios

JSystem scenario is an (Ant) script file. When creating a new scenario, and initial ant script file is created, when performing an operation on the scenario (for example adding a test), the ant script is updated.

Managing the Scenarios Repository

The following table lists the operations for managing the scenarios repository.

Name Description Button
New Scenario Creates a new scenario.
Copy Scenario Saves a scenario using a different name.
Save and Load Failed Sequence Enables the user to create a scenario from all the tests that failed or were not activated in the last execution.
Select Scenario Selects a scenario to edit and or execute.
Clear/Delete Scenario Deletes current scenario and selects the "default" scenario.

Editing a Scenario

The following table lists the operations for editing a scenario.

Name Description Button
Add item Adds a test/scenario/fixture to the currently active scenario.
Move Up Item Moves test up in scenario order.
Move Down Item Moves test down in scenario order.
Remove Item from Scenario Deletes test/fixture/sub scenario from scenario.
Edit with spreadsheet editor Used to convert the scenario into an excel spread sheet format and then edit it and then save it automatically returning to the JSystem interface.
Add Change SUT Event This button enables the user to add and change the SUT event during the test run, changing the SUT file.
Add Publish Results Event Adds an event that automatically publishes the test results to date, after the test cycle reaches it in the already running scenario.
View Test Code Opens test java code in an HTML browser.

Viewing and Editing Test Parameters

In order to edit and or view test parameter values in a scenario, either "double click" on a selected test in the scenario tree or just select the test and then select the "Test Info" tab.

The "Test Info" tab has three parts:

  1. Full class name and method name.
  2. Associated fixture and fail to fixture.
  3. Execution time of last test activation.

The snapshot above shows the "Test Info" tab with the general information section marked with red.

Test documentation, which contains two sub-tabs:

  1. Test documentation - Tests the "javadoc" taken from test source code.
  2. User Test Documentation – User input and comments text box. The JRunner user can add additional saved scenario information.

The snapshot shows the "Test Info" tab with the text documentation area.

Test Parameters - Exposing test parameters in the "Test Info" tab is performed by the java programmer that authors the test.

Note: In order to edit test parameter values click on the value of the parameter and edit parameter value.

The snapshot shows the "Test Info" tab with the text parameters.

Sorting Parameters

In order to sort parameters "click" on the parameters table head. When clicking on the "Name" column head for the first time, the parameters are sorted by their name in an alpha numeric descending order, when clicking the second time, parameters are sorted by their name in an alpha numeric ascending order, when clicking for the third time, the test order returns to the default order which can be defined by the "params.include" annotation.

Order Parameters Tabs

In order to change and correct the order of the parameters tabs, click on the "Sort Sections" button. A pop-up menu opens with two types of options:

  1. Predefined – as defined by test author.
  2. Alphabetical – alpha numeric sort by tab name.

General Operations

This section describes JRunner operations that are common to the JRunner module and to the scenario studio module.

Switch Project

In order to change the automation project that appears in the JRunner, select the "Switch Project" option from the "File" menu.

Once the selection has been made, the "Select tests classes directory" dialogue opens, browse to the classes folder of the automation project that you require and select it.

Note: The JRunner validates that the selected automation project includes the "SUT" package in the "tests" folder and in it at least one SUT file. If not, the user is asked to re-select the automation project folder.

Refresh

After making code changes or configuration changes (by altering the jsystem.properties file), new compiled code and or configuration have to be reloaded into the JRunner. In order to reload configurations and or code press on the "Refresh" button.

Working with Sub-Scenarios

When using the scenario studio the user can build a compound scenario. To add a sub-scenario to the root scenario or to one of the sub scenarios of the root scenario perform the following steps:

  1. Select the test in the scenario after which the sub scenario will be added.
  2. Select the scenario you want to add in the "Test Tree".
  3. Press on the "Add test to scenario" button.

Working with Multiple Instances of a Sub Scenario

A scenario can be added several times as a sub-scenario. When editing a sub scenario note the following:

  1. Changing the test order or removing or add tests to scenario the changes made to the sub scenario will affect all sub scenario instances.
  2. Editing test parameters, changes will affect only the sub scenario instance that is working on.
  3. Changing user documentation, meaningful name and or comment of a sub scenario only affects the instance that is being working on.
Clone this wiki locally