# Simulator

{% hint style="info" %}
The availability of functionality depends on the license and may not be available in all deployments.
{% endhint %}

Thanks to the application simulator we have the possibility to open a form with parameters defined by us:

* the selected environment,
* user identifier,
* specific input parameters,
* the selected channel: App (RWD), Native, IB inline, IB popup or in a new browser tab.

In the App and Native channels there is also the possibility to indicate a specific device for simulation. Additionally, for Native the API calls for the given application are presented.

## Starting the application simulator <a href="#symulatorwnioskow-uruchomieniesymulatorawnioskow" id="symulatorwnioskow-uruchomieniesymulatorawnioskow"></a>

To start the application simulator, select the option from the Eximee Designer navigation bar **Simulator**.

### Setting input parameters <a href="#symulatorwnioskow-ustawienieparametrowwejsciowych" id="symulatorwnioskow-ustawienieparametrowwejsciowych"></a>

The form located at the top of the module allows you to start the application with the selected parameters.&#x20;

1. Button that shows/hides the input parameters form.
2. **Environment** - the environment on which the tested application is located.
3. **Application** - the name of the tested application; if the value is empty, the simulator will display a list of available applications (for the App, Native, New Tab channels) or a default, predefined application (for the IB inline and IB popup channels).
4. **User identifier** - allows you to enter a user identifier for which a session key will be fetched and added to the URL when showing the simulator. If the field is empty, the key will not be fetched.
5. **Parameters** paths (query parameters) - a field allowing you to define parameters that will be appended to the path (e.g. source=ib).
6. The **App** - launches the simulator in the desktop (app) channel.
7. The **Native** - launches the simulator in the native application channel.
8. The **IB inline** - launches the simulator in the IB inline channel.
9. The **IB popup** - launches the simulator in the IB popup channel.
10. The **New Tab** - opens the application on the selected environment in a new browser tab.
11. **Channel**\* - the theme in which the application is to be launched (option dependent on configuration).

<figure><img src="https://2112972046-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2CssJT0zIo4SJQLbSZ6l%2Fuploads%2Fl7dy90qH1sqGkVNLcUjG%2Fimage.png?alt=media&#x26;token=00a0be3e-1fa1-4bf5-9f4f-b3846adfd4a1" alt=""><figcaption><p><em><strong>Illustration 1.</strong> Simulator properties</em></p></figcaption></figure>

<figure><img src="https://2112972046-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2CssJT0zIo4SJQLbSZ6l%2Fuploads%2FvBl5jimHrG5mQfAcxlmS%2Fimage.png?alt=media&#x26;token=3b6b1f7d-50b1-4e99-84ad-d2a471d2763e" alt=""><figcaption><p><em><strong>Illustration 2.</strong> Simulator properties with the possibility of channel selection</em></p></figcaption></figure>

### Selection of simulated device <a href="#symulatorwnioskow-wyborsymulowanegourzadzenia" id="symulatorwnioskow-wyborsymulowanegourzadzenia"></a>

After selecting the application launch channel, a button allowing you to choose the simulated device (12) will appear in the lower left corner of the screen. Changing the device adjusts the form dimensions to the dimensions of the selected device. By default Desktop Mode is simulated for the App, IB Inline, IB Popup channels, while for the Native channel the iPhone X is simulated by default.

### Preview of API calls <a href="#symulatorwnioskow-podgladwywolanapi" id="symulatorwnioskow-podgladwywolanapi"></a>

After selecting a channel other than desktop for launching the application, a panel will be displayed in the lower right corner **API calls**. It presents the API methods called by the simulated application. The component can be collapsed by clicking the title bar. The button with a trash icon on the title bar allows clearing the component's content.

<figure><img src="https://2112972046-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2CssJT0zIo4SJQLbSZ6l%2Fuploads%2FSUR9q8A6JFcv6R7JI37v%2Fimage.png?alt=media&#x26;token=6390e135-dc90-4243-ba6e-1b512a086af7" alt=""><figcaption><p><em><strong>Illustration 3.</strong> Application screen after selecting the "Native" channel</em></p></figcaption></figure>

### Configuration <a href="#symulatorwnioskow-konfiguracja" id="symulatorwnioskow-konfiguracja"></a>

To configure the simulator operation you must prepare a file in JSON format that will contain a description of the available environments, themes and channels in which application simulation will be possible.

In the Eximee Designer settings there should be a path to the configuration file as the value of the parameter **form-starter.configurationPath**, e.g.:

```
form-starter.configurationPath=/etc/eximee/form-starter.json
```

Sample configuration file:

<details>

<summary>Configuration file</summary>

```
{
  "showChannels": false,
  "channels": [
    {
      "name": "app",
      "formModes": [
        {
          "name": "app",
          "label": "App",
          "icon": "desktop_windows"
        },
        {
          "name": "mobile",
          "label": "Native",
          "icon": "phone_iphone"
        },
        {
          "name": "inline",
          "label": "IB inline",
          "icon": "featured_play_list_outlined"
        },
        {
          "name": "popup",
          "label": "IB popup",
          "icon": "flip_to_front"
        },
        {
          "name": "newTab",
          "label": "New tab",
          "icon": "open_in_new"
        }
      ],
      "defaultChannel": true
    },
    {
      "name": "form",
      "formModes": [
        {
          "name": "app",
          "label": "App",
          "icon": "desktop_windows"
        }
      ]
    }
  ],
  "environments": [
    {
      "displayName": "Dev bank",
      "url": "https://pl.dev.bank.eximee.consdata.local"
    },
    {
      "displayName": "Dev bank CZ",
      "url": "https://cz.dev.bank.eximee.consdata.local"
    },
    {
      "displayName": "Mandarynka",
      "url": "https://pl.mandarynka.eximee.consdata.local"
    },
    {
      "displayName": "Mandarynka RREV",
      "url": "https://pl-rrev.mandarynka.eximee.consdata.local"
    },
    {
      "displayName": "Mandarynka CZ",
      "url": "https://cz.mandarynka.eximee.consdata.local"
    },
    {
      "displayName": "Mandarynka SK",
      "url": "https://sk.mandarynka.eximee.consdata.local"
    }
  ]
}
```

</details>

where:

* **showChannels** - an attribute specifying whether the simulator should display a dropdown list allowing theme selection
* **channels** - list of available themes
  * **name** - name of the theme
  * **defaultChannel** - whether the theme should be selected/checked by default&#x20;
  * **formModes** - channels in which the given theme is available
    * **name** - name of the channel supported in Eximee Designer
    * **Each component should have a label (** - displayed name of the channel
    * **icon** - icon representing the given channel
* **environments** - environments on which the application simulation can be run
  * **displayName** - displayed name
  * **url** - environment address.
