generated

package
v0.18.14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 2, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Actions = map[string]common.DocEntry{
		"applybookmark": {
			Description: "## ApplyBookmark action\n\nApply a bookmark in the current app.\n\n**Note:** Specify *either* `title` *or* `id`, not both.\n",
			Examples:    "### Example\n\n```json\n{\n    \"action\": \"applybookmark\",\n    \"settings\": {\n        \"title\": \"My bookmark\"\n    }\n}\n```\n",
		},
		"askhubadvisor": {
			Description: "## AskHubAdvisor action\n\nPerform a query in the Qlik Sense hub insight advisor.",
			Examples:    "### Examples\n\n#### Pick queries from file\n\n```json\n{\n    \"action\": \"AskHubAdvisor\",\n    \"settings\": {\n        \"querysource\": \"file\",\n        \"file\": \"queries.txt\"\n    }\n}\n```\n\nThe file `queries.txt` contains one query and an optional weight per line. The line format is `[WEIGHT;]QUERY`.\n```txt\nshow sales per country\n5; what is the lowest price of shoes\n```\n\n#### Pick queries from list\n\n```json\n{\n    \"action\": \"AskHubAdvisor\",\n    \"settings\": {\n        \"querysource\": \"querylist\",\n        \"querylist\": [\"show sales per country\", \"what is the lowest price of shoes\"]\n    }\n}\n```\n\n#### Perform followup queries if possible (default: 0)\n\n```json\n{\n    \"action\": \"AskHubAdvisor\",\n    \"settings\": {\n        \"querysource\": \"querylist\",\n        \"querylist\": [\"show sales per country\", \"what is the lowest price of shoes\"],\n        \"maxfollowup\": 3\n    }\n}\n```\n\n#### Change lanuage (default: \"en\")\n\n```json\n{\n    \"action\": \"AskHubAdvisor\",\n    \"settings\": {\n        \"querysource\": \"querylist\",\n        \"querylist\": [\"show sales per country\", \"what is the lowest price of shoes\"],\n        \"lang\": \"fr\"\n    }\n}\n```\n\n#### Weights in querylist\n\n```json\n{\n    \"action\": \"AskHubAdvisor\",\n    \"settings\": {\n        \"querysource\": \"querylist\",\n        \"querylist\": [\n            {\n                \"query\": \"show sales per country\",\n                \"weight\": 5,\n            },\n            \"what is the lowest price of shoes\"\n        ]\n    }\n}\n```\n\n#### Thinktime before followup queries\n\nSee detailed examples of settings in the documentation for thinktime action.\n\n```json\n{\n    \"action\": \"AskHubAdvisor\",\n    \"settings\": {\n        \"querysource\": \"querylist\",\n        \"querylist\": [\n            \"what is the lowest price of shoes\"\n        ],\n        \"maxfollowup\": 5,\n        \"thinktime\": {\n            \"type\": \"static\",\n            \"delay\": 5\n        }\n    }\n}\n```\n\n#### Ask followups only based on app selection\n\n\n```json\n{\n    \"action\": \"AskHubAdvisor\",\n    \"settings\": {\n        \"querysource\": \"querylist\",\n        \"querylist\": [\n            \"what is the lowest price of shoes\"\n        ],\n        \"maxfollowup\": 5,\n        \"followuptypes\": [\"app\"]\n    }\n}\n```\n\n#### Save chart images to file\n\n```json\n{\n    \"action\": \"AskHubAdvisor\",\n    \"settings\": {\n        \"querysource\": \"querylist\",\n        \"querylist\": [\n            \"show price per shoe type\"\n        ],\n        \"maxfollowup\": 5,\n        \"saveimages\": true\n    }\n}\n```\n\n#### Save chart images to file with custom name\n\nThe `saveimagefile` file name template setting supports\n[Session Variables](https://github.com/qlik-trial/gopherciser-oss/blob/master/docs/settingup.md#session-variables).\nYou can apart from session variables include the following action local variables in the `saveimagefile` file name template:\n- .Local.ImageCount - _the number of images written to file_\n- .Local.ServerFileName - _the server side name of image file_\n- .Local.Query - _the query sentence_\n- .Local.AppName - _the name of app, if any app, where query is asked_\n- .Local.AppID - _the id of app, if any app, where query is asked_\n\n```json\n{\n    \"action\": \"AskHubAdvisor\",\n    \"settings\": {\n        \"querysource\": \"querylist\",\n        \"querylist\": [\n            \"show price per shoe type\"\n        ],\n        \"maxfollowup\": 5,\n        \"saveimages\": true,\n        \"saveimagefile\": \"{{.Local.Query}}--app-{{.Local.AppName}}--user-{{.UserName}}--thread-{{.Thread}}--session-{{.Session}}\"\n    }\n}\n```\n",
		},
		"changesheet": {
			Description: "## ChangeSheet action\n\nChange to a new sheet, unsubscribe to the currently subscribed objects, and subscribe to all objects on the new sheet.\n\nThe action supports getting data from the following objects:\n\n* Listbox\n* Filter pane\n* Bar chart\n* Scatter plot\n* Map (only the first layer)\n* Combo chart\n* Table\n* Pivot table\n* Line chart\n* Pie chart\n* Tree map\n* Text-Image\n* KPI\n* Gauge\n* Box plot\n* Distribution plot\n* Histogram\n* Auto chart (including any support generated visualization from this list)\n* Waterfall chart\n",
			Examples:    "### Example\n\n```json\n{\n     \"label\": \"Change Sheet Dashboard\",\n     \"action\": \"ChangeSheet\",\n     \"settings\": {\n         \"id\": \"TFJhh\"\n     }\n}\n```\n",
		},
		"changestream": {
			Description: "## ChangeStream action\n\nChange to specified stream. This makes the apps in the specified stream selectable by actions such as `openapp`.",
			Examples:    "### Example\n\nMake apps in stream `Everyone` selectable by subsequent actions.\n\n```json\n{\n     \"label\": \"ChangeStream Everyone\",\n     \"action\": \"changestream\",\n     \"settings\": {\n         \"mode\": \"name\",\n         \"stream\" : \"Everyone\"\n     }\n}\n```\n\nMake  apps in stream with id `ABSCDFSDFSDFO1231234` selectable subsequent actions.\n\n```json\n{\n     \"label\": \"ChangeStream Test1\",\n     \"action\": \"changestream\",\n     \"settings\": {\n         \"mode\": \"id\",\n         \"stream\" : \"ABSCDFSDFSDFO1231234\"\n     }\n}\n```\n",
		},
		"clearall": {
			Description: "## ClearAll action\n\nClear all selections in an app.\n",
			Examples:    "### Example\n\n```json\n{\n    \"action\": \"clearall\",\n    \"label\": \"Clear all selections (1)\"\n}\n```\n",
		},
		"clearfield": {
			Description: "## ClearField action\n\nClear selections in a field.\n",
			Examples:    "### Example\n\n```json\n{\n    \"action\": \"clearfield\",\n    \"label\": \"Clear selections in Alpha\",\n    \"settings\" : {\n        \"name\": \"Alpha\"\n    }\n}\n```\n",
		},
		"clickactionbutton": {
			Description: "## ClickActionButton action\n\nA `ClickActionButton`-action simulates clicking an _action-button_. An _action-button_ is a sheet item which, when clicked, executes a series of actions. The series of actions contained by an action-button begins with any number _generic button-actions_ and ends with an optional _navigation button-action_.\n\n### Supported button-actions\n#### Generic button-actions\n- Apply bookmark\n- Move backward in all selections\n- Move forward in all selections\n- Lock all selections\n- Clear all selections\n- Lock field\n- Unlock field\n- Select all in field\n- Select alternatives in field\n- Select excluded in field\n- Select possible in field\n- Select values matching search criteria in field\n- Clear selection in field\n- Toggle selection in field\n- Set value of variable\n\n#### Navigation button-actions\n- Change to first sheet\n- Change to last sheet\n- Change to previous sheet\n- Change sheet by name\n- Change sheet by ID",
			Examples:    "### Examples\n\n```json\n{\n     \"label\": \"ClickActionButton\",\n     \"action\": \"ClickActionButton\",\n     \"settings\": {\n         \"id\": \"951e2eee-ad49-4f6a-bdfe-e9e3dddeb2cd\"\n     }\n}\n```\n",
		},
		"containertab": {
			Description: "## Containertab action\n\nA `Containertab` action simulates switching the active object in a `container` object.\n",
			Examples:    "### Examples\n\n```json\n{\n  \"label\": \"Switch to object qwerty in container object XYZ\",\n  \"action\": \"containertab\",\n  \"settings\": {\n    \"containerid\": \"xyz\",\n    \"mode\": \"id\",\n    \"objectid\" : \"qwerty\"\n  }\n}\n```\n\n```json\n{\n  \"label\": \"Switch to random object in container object XYZ\",\n  \"action\": \"containertab\",\n  \"settings\": {\n    \"containerid\": \"xyz\",\n    \"mode\": \"random\"\n  }\n}\n```\n\n```json\n{\n  \"label\": \"Switch to object in first tab in container object XYZ\",\n  \"action\": \"containertab\",\n  \"settings\": {\n    \"containerid\": \"xyz\",\n    \"mode\": \"index\",\n    \"index\": 0\n  }\n}\n```\n",
		},
		"createbookmark": {
			Description: "## CreateBookmark action\n\nCreate a bookmark from the current selection and selected sheet.\n\n**Note:** Both `title` and `id` can be used to identify the bookmark in subsequent actions. \n",
			Examples:    "### Example\n\n```json\n{\n    \"action\": \"createbookmark\",\n    \"settings\": {\n        \"title\": \"my bookmark\",\n        \"description\": \"This bookmark contains some interesting selections\"\n    }\n}\n```\n",
		},
		"createsheet": {
			Description: "## CreateSheet action\n\nCreate a new sheet in the current app.\n",
			Examples:    "### Example\n\n```json\n{\n    \"action\": \"createsheet\",\n    \"settings\": {\n        \"title\" : \"Generated sheet\"\n    }\n}\n```\n",
		},
		"deletebookmark": {
			Description: "## DeleteBookmark action\n\nDelete one or more bookmarks in the current app.\n\n**Note:** Specify *either* `title` *or* `id`, not both.\n",
			Examples:    "### Example\n\n```json\n{\n    \"action\": \"deletebookmark\",\n    \"settings\": {\n        \"mode\": \"single\",\n        \"title\": \"My bookmark\"\n    }\n}\n```\n",
		},
		"deleteodag": {
			Description: "## DeleteOdag action\n\nDelete all user-generated on-demand apps for the current user and the specified On-Demand App Generation (ODAG) link.\n",
			Examples:    "### Example\n\n```json\n{\n    \"action\": \"DeleteOdag\",\n    \"settings\": {\n        \"linkname\": \"Drill to Template App\"\n    }\n}\n```\n",
		},
		"deletesheet": {
			Description: "## DeleteSheet action\n\nDelete one or more sheets in the current app.\n\n**Note:** Specify *either* `title` *or* `id`, not both.\n",
			Examples:    "### Example\n\n```json\n{\n    \"action\": \"deletesheet\",\n    \"settings\": {\n        \"mode\": \"matching\",\n        \"title\": \"Test sheet\"\n    }\n}\n```\n",
		},
		"disconnectapp": {
			Description: "## DisconnectApp action\n\nDisconnect from an already connected app.\n",
			Examples:    "### Example\n\n```json\n{\n    \"label\": \"Disconnect from server\",\n    \"action\" : \"disconnectapp\"\n}\n```\n",
		},
		"disconnectenvironment": {
			Description: "## DisconnectEnvironment action\n\nDisconnect from an environment. This action will disconnect open websockets towards sense and events. The action is not needed for most scenarios, however if a scenario mixes different types of environmentsor uses custom actions towards external environment, it should be used directly after the last action towards the environment.\n\nSince the action also disconnects any open websocket to Sense apps, it does not need to be preceeded with a `disconnectapp` action.\n",
			Examples:    "### Example\n\n```json\n{\n    \"label\": \"Disconnect from environment\",\n    \"action\" : \"disconnectenvironment\"\n}\n```\n",
		},
		"dosave": {
			Description: "## DoSave action\n\n`DoSave` issues a command to engine to save the currently open app. If the simulated user does not have permission to save the app it will result in an error.",
			Examples:    "### Example\n\n```json\n{\n    \"label\": \"Save MyApp\",\n    \"action\" : \"dosave\"\n}\n```\n",
		},
		"duplicatesheet": {
			Description: "## DuplicateSheet action\n\nDuplicate a sheet, including all objects.\n",
			Examples:    "### Example\n\n```json\n{\n    \"action\": \"duplicatesheet\",\n    \"label\": \"Duplicate sheet1\",\n    \"settings\":{\n        \"id\" : \"mBshXB\",\n        \"save\": true,\n        \"changesheet\": true\n    }\n}\n```\n",
		},
		"generateodag": {
			Description: "## GenerateOdag action\n\nGenerate an on-demand app from an existing On-Demand App Generation (ODAG) link.\n",
			Examples:    "### Example\n\n```json\n{\n    \"action\": \"GenerateOdag\",\n    \"settings\": {\n        \"linkname\": \"Drill to Template App\"\n    }\n}\n```\n",
		},
		"getscript": {
			Description: "## GetScript action\n\nGet the load script for the app.\n\n",
			Examples:    "### Example\n\nGet the load script for the app\n\n```json\n{\n    \"action\": \"getscript\"\n}\n```\n\nGet the load script for the app and save to log file\n\n```json\n{\n    \"action\": \"getscript\",\n    \"settings\": {\n        \"savelog\" : true\n    }\n}\n```\n",
		},
		"iterated": {
			Description: "## Iterated action\n\nLoop one or more actions.\n\n**Note:** This action does not require an app context (that is, it does not have to be prepended with an `openapp` action).\n",
			Examples:    "### Example\n\n```json\n//Visit all sheets twice\n{\n     \"action\": \"iterated\",\n     \"label\": \"\",\n     \"settings\": {\n         \"iterations\" : 2,\n         \"actions\" : [\n            {\n                 \"action\": \"sheetchanger\"\n            },\n            {\n                \"action\": \"thinktime\",\n                \"settings\": {\n                    \"type\": \"static\",\n                    \"delay\": 5\n                }\n            }\n         ]\n     }\n}\n```\n",
		},
		"listboxselect": {
			Description: "## ListBoxSelect action\n\nPerform list object specific selectiontypes in listbox.\n\n",
			Examples:    "### Examples\n\n```json\n{\n     \"label\": \"ListBoxSelect\",\n     \"action\": \"ListBoxSelect\",\n     \"settings\": {\n         \"id\": \"951e2eee-ad49-4f6a-bdfe-e9e3dddeb2cd\",\n         \"type\": \"all\",\n         \"wrap\": true,\n         \"accept\": true\n     }\n}\n```\n",
		},
		"objectsearch": {
			Description: "## ObjectSearch action\n\nPerform a search select in a listbox, field or master dimension.\n\n",
			Examples:    "### Examples\n\nSearch a listbox object, all users searches for same thing and gets an error if no result found\n\n```json\n{\n    \"label\": \"Search and select Sweden in listbox\",\n    \"action\": \"objectsearch\",\n    \"settings\": {\n        \"id\": \"maesVjgte\",\n        \"searchterms\": [\"Sweden\"],\n        \"type\": \"listbox\",\n        \"erroronempty\": true\n    }\n}\n```\n\nSearch a field. Users use one random search term from the `searchterms` list.\n\n```json\n{\n    \"label\": \"Search field\",\n    \"action\": \"objectsearch\",\n    \"disabled\": false,\n    \"settings\": {\n        \"id\": \"Countries\",\n        \"searchterms\": [\n            \"Sweden\",\n            \"Germany\",\n            \"Liechtenstein\"\n        ],\n        \"type\": \"field\"\n    }\n}\n```\n\nSearch a master object dimension using search terms from a file.\n\n```json\n{\n    \"label\": \"Search dimension\",\n    \"action\": \"objectsearch\",\n    \"disabled\": false,\n    \"settings\": {\n        \"id\": \"Dim1M\",\n        \"type\": \"dimension\",\n        \"erroronempty\": true,\n        \"source\": \"fromfile\",\n        \"searchtermsfile\": \"./resources/objectsearchterms.txt\"\n    }\n}\n```\n",
		},
		"openapp": {
			Description: "## OpenApp action\n\nOpen an app.\n\n**Note:** If the app name is used to specify which app to open, this action cannot be the first action in the scenario. It must be preceded by an action that can populate the artifact map, such as `openhub`.\n",
			Examples:    "### Examples\n\n```json\n{\n     \"label\": \"OpenApp\",\n     \"action\": \"OpenApp\",\n     \"settings\": {\n         \"appmode\": \"guid\",\n         \"app\": \"7967af99-68b6-464a-86de-81de8937dd56\"\n     }\n}\n```\n```json\n{\n     \"label\": \"OpenApp\",\n     \"action\": \"OpenApp\",\n     \"settings\": {\n         \"appmode\": \"randomguidfromlist\",\n         \"list\": [\"7967af99-68b6-464a-86de-81de8937dd56\", \"ca1a9720-0f42-48e5-baa5-597dd11b6cad\"]\n     }\n}\n```\n",
		},
		"openhub": {
			Description: "## OpenHub action\n\nOpen the hub in a QSEoW environment. This also makes the apps included in the response for the users `myspace` available for use by subsequent actions. The action `changestream` can be used to only select from apps in a specific stream.\n",
			Examples:    "### Example\n\n```json\n{\n     \"action\": \"OpenHub\",\n     \"label\": \"Open the hub\"\n}\n```\n",
		},
		"productversion": {
			Description: "## ProductVersion action\n\nRequest the product version from the server and, optionally, save it to the log. This is a lightweight request that can be used as a keep-alive message in a loop.\n",
			Examples:    "### Example\n\n```json\n//Keep-alive loop\n{\n    \"action\": \"iterated\",\n    \"settings\" : {\n        \"iterations\" : 10,\n        \"actions\" : [\n            {\n                \"action\" : \"productversion\"\n            },\n            {\n                \"action\": \"thinktime\",\n                \"settings\": {\n                    \"type\": \"static\",\n                    \"delay\": 30\n                }\n            }\n        ]\n    }\n}\n```\n",
		},
		"publishbookmark": {
			Description: "## PublishBookmark action\n\nPublish a bookmark.\n\n**Note:** Specify *either* `title` *or* `id`, not both.\n",
			Examples:    "### Example\n\nPublish the bookmark with `id` \"bookmark1\" that was created earlier on in the script.\n\n```json\n{\n    \"label\" : \"Publish bookmark 1\",\n    \"action\": \"publishbookmark\",\n    \"disabled\" : false,\n    \"settings\" : {\n        \"id\" : \"bookmark1\"\n    }\n}\n```\n\nPublish the bookmark with the `title` \"bookmark of testuser\", where \"testuser\" is the username of the simulated user.\n\n```json\n{\n    \"label\" : \"Publish bookmark 2\",\n    \"action\": \"publishbookmark\",\n    \"disabled\" : false,\n    \"settings\" : {\n        \"title\" : \"bookmark of {{.UserName}}\"\n    }\n}\n```\n",
		},
		"publishsheet": {
			Description: "## PublishSheet action\n\nPublish sheets in the current app.\n",
			Examples:    "### Example\n```json\n{\n     \"label\": \"PublishSheets\",\n     \"action\": \"publishsheet\",\n     \"settings\": {\n       \"mode\": \"sheetids\",\n       \"sheetIds\": [\"qmGcYS\", \"bKbmgT\"]\n     }\n}\n```\n",
		},
		"randomaction": {
			Description: "## RandomAction action\n\nRandomly select other actions to perform. This meta-action can be used as a starting point for your testing efforts, to simplify script authoring or to add background load.\n\n`randomaction` accepts a list of action types between which to randomize. An execution of `randomaction` executes one or more of the listed actions (as determined by the `iterations` parameter), randomly chosen by a weighted probability. If nothing else is specified, each action has a default random mode that is used. An override is done by specifying one or more parameters of the original action.\n\nEach action executed by `randomaction` is followed by a customizable `thinktime`.\n\n**Note:** The recommended way to use this action is to prepend it with an `openapp` and a `changesheet` action as this ensures that a sheet is always in context.\n",
			Examples:    "### Random action defaults\n\nThe following default values are used for the different actions:\n\n* `thinktime`: Mirrors the configuration of `thinktimesettings`\n* `sheetobjectselection`:\n\n```json\n{\n     \"settings\": \n     {\n         \"id\": <UNIFORMLY RANDOMIZED>,\n         \"type\": \"RandomFromAll\",\n         \"min\": 1,\n         \"max\": 2,\n         \"accept\": true\n     }\n}\n```\n\n* `changesheet`:\n\n```json\n{\n     \"settings\": \n     {\n         \"id\": <UNIFORMLY RANDOMIZED>\n     }\n}\n```\n\n* `clearall`:\n\n```json\n{\n     \"settings\": \n     {\n     }\n}\n```\n\n### Examples\n\n#### Generating a background load by executing 5 random actions\n\n```json\n{\n    \"action\": \"RandomAction\",\n    \"settings\": {\n        \"iterations\": 5,\n        \"actions\": [\n            {\n                \"type\": \"thinktime\",\n                \"weight\": 1\n            },\n            {\n                \"type\": \"sheetobjectselection\",\n                \"weight\": 3\n            },\n            {\n                \"type\": \"changesheet\",\n                \"weight\": 5\n            },\n            {\n                \"type\": \"clearall\",\n                \"weight\": 1\n            }\n        ],\n        \"thinktimesettings\": {\n            \"type\": \"uniform\",\n            \"mean\": 10,\n            \"dev\": 5\n        }\n    }\n}\n```\n\n#### Making random selections from excluded values\n\n```json\n{\n    \"action\": \"RandomAction\",\n    \"settings\": {\n        \"iterations\": 1,\n        \"actions\": [\n            {\n                \"type\": \"sheetobjectselection\",\n                \"weight\": 1,\n                \"overrides\": {\n                  \"type\": \"RandomFromExcluded\",\n                  \"min\": 1,\n                  \"max\": 5\n                }\n            }\n        ],\n        \"thinktimesettings\": {\n            \"type\": \"static\",\n            \"delay\": 1\n        }\n    }\n}\n```\n",
		},
		"reload": {
			Description: "## Reload action\n\nReload the current app by simulating selecting **Load data** in the Data load editor. To select an app, preceed this action with an `openapp` action.\n",
			Examples:    "### Example\n\n```json\n{\n    \"action\": \"reload\",\n    \"settings\": {\n        \"mode\" : \"default\",\n        \"partial\": false\n    }\n}\n```\n",
		},
		"select": {
			Description: "## Select action\n\nSelect random values in an object.\n\nSee the [Limitations](README.md#limitations) section in the README.md file for limitations related to this action.\n ",
			Examples:    "### Example\n\nRandomly select among all the values in object `RZmvzbF`.\n\n```json\n{\n     \"label\": \"ListBox Year\",\n     \"action\": \"Select\",\n     \"settings\": {\n         \"id\": \"RZmvzbF\",\n         \"type\": \"RandomFromAll\",\n         \"accept\": true,\n         \"wrap\": false,\n         \"min\": 1,\n         \"max\": 3,\n         \"dim\": 0\n     }\n}\n```\n\nRandomly select among all the enabled values (a.k.a \"white\" values) in object `RZmvzbF`.\n\n```json\n{\n     \"label\": \"ListBox Year\",\n     \"action\": \"Select\",\n     \"settings\": {\n         \"id\": \"RZmvzbF\",\n         \"type\": \"RandomFromEnabled\",\n         \"accept\": true,\n         \"wrap\": false,\n         \"min\": 1,\n         \"max\": 3,\n         \"dim\": 0\n     }\n}\n```\n\n#### Statically selecting specific values\n\nThis example selects specific element values in object `RZmvzbF`. These are the values which can be seen in a selection when e.g. inspecting traffic, it is not the data values presented to the user. E.g. when loading a table in the following order by a Sense loadscript:\n\n```\nBeta\nAlpha\nGamma\n```\n\nwhich might be presented to the user sorted as\n\n```\nAlpha\nBeta\nGamma\n```\n\nThe element values will be Beta=0, Alpha=1 and Gamma=2.\n\nTo statically select \"Gamma\" in this case:\n\n```json\n{\n     \"label\": \"Select Gammma\",\n     \"action\": \"Select\",\n     \"settings\": {\n         \"id\": \"RZmvzbF\",\n         \"type\": \"values\",\n         \"accept\": true,\n         \"wrap\": false,\n         \"values\" : [2],\n         \"dim\": 0\n     }\n}\n```\n",
		},
		"setscript": {
			Description: "## SetScript action\n\nSet the load script for the current app. To load the data from the script, use the `reload` action after the `setscript` action.\n",
			Examples:    "### Example\n\n```json\n{\n    \"action\": \"setscript\",\n    \"settings\": {\n        \"script\" : \"Characters:\\nLoad Chr(RecNo()+Ord('A')-1) as Alpha, RecNo() as Num autogenerate 26;\"\n    }\n}\n```\n",
		},
		"setscriptvar": {
			Description: "## SetScriptVar action\n\nSets a variable which can be used within the same session. Cannot be accessed across different simulated users.\n",
			Examples:    "### Example\n\nCreate a variable containing a string and use it in openapp.\n\n```json\n{\n    \"action\": \"setscriptvar\",\n    \"settings\": {\n        \"name\": \"mylocalvar\",\n        \"type\": \"string\",\n        \"value\": \"My app Name with number for session {{ .Session }}\"\n    }\n},\n{\n    \"action\": \"openapp\",\n    \"settings\": {\n        \"appmode\": \"name\",\n        \"app\": \"{{ .ScriptVars.mylocalvar }}\"\n    }\n}\n```\n\nCreate a variable containing an integer and use it in a loop creating bookmarks numbered 1 to 5. Then in a different loop reset variable and delete the bookmarks.\n\n```json\n{\n    \"action\": \"setscriptvar\",\n    \"settings\": {\n        \"name\": \"BookmarkCounter\",\n        \"type\": \"int\",\n        \"value\": \"0\"\n    }\n},\n{\n    \"action\": \"iterated\",\n    \"settings\": {\n        \"iterations\": 5,\n        \"actions\": [\n            {\n                \"action\": \"setscriptvar\",\n                \"settings\": {\n                    \"name\": \"BookmarkCounter\",\n                    \"type\": \"int\",\n                    \"value\": \"{{ add .ScriptVars.BookmarkCounter 1 }}\"\n                }\n            },\n            {\n                \"action\": \"createbookmark\",\n                \"settings\": {\n                    \"title\": \"Bookmark {{ .ScriptVars.BookmarkCounter }}\",\n                    \"description\": \"This bookmark contains some interesting selections\"\n                }\n            }\n            \n        ]\n    }\n},\n{\n    \"action\": \"setscriptvar\",\n    \"settings\": {\n        \"name\": \"BookmarkCounter\",\n        \"type\": \"int\",\n        \"value\": \"0\"\n    }\n},\n{\n    \"action\": \"iterated\",\n    \"disabled\": false,\n    \"settings\": {\n        \"iterations\": 3,\n        \"actions\": [\n            {\n                \"action\": \"setscriptvar\",\n                \"settings\": {\n                    \"name\": \"BookmarkCounter\",\n                    \"type\": \"int\",\n                    \"value\": \"{{ .ScriptVars.BookmarkCounter | add 1}}\"\n                }\n            },\n            {\n                \"action\": \"deletebookmark\",\n                \"settings\": {\n                    \"mode\": \"single\",\n                    \"title\": \"Bookmark {{ $element:=range.ScriptVars.BookmarkCounter }} {{ $element }}{{ end }}\"\n                }\n            }\n        ]\n    }\n}\n```\n\nCombine two variables `MyArrayVar` and `BookmarkCounter` to create 3 bookmarks with the names `Bookmark one`, `Bookmark two` and `Bookmark three`.\n\n```json\n{\n    \"action\": \"setscriptvar\",\n    \"settings\": {\n        \"name\": \"MyArrayVar\",\n        \"type\": \"array\",\n        \"value\": \"one,two,three,four,five\",\n        \"sep\": \",\"\n    }           \n},\n{\n    \"action\": \"setscriptvar\",\n    \"settings\": {\n        \"name\": \"BookmarkCounter\",\n        \"type\": \"int\",\n        \"value\": \"0\"\n    }\n},\n{\n    \"action\": \"iterated\",\n    \"disabled\": false,\n    \"settings\": {\n        \"iterations\": 3,\n        \"actions\": [\n            {\n                \"action\": \"createbookmark\",\n                \"settings\": {\n                    \"title\": \"Bookmark {{ index .ScriptVars.MyArrayVar .ScriptVars.BookmarkCounter }}\",\n                    \"description\": \"This bookmark contains some interesting selections\"\n                }\n            },\n            {\n                \"action\": \"setscriptvar\",\n                \"settings\": {\n                    \"name\": \"BookmarkCounter\",\n                    \"type\": \"int\",\n                    \"value\": \"{{ .ScriptVars.BookmarkCounter | add 1}}\"\n                }\n            }\n        ]\n    }\n}\n ```\n\nA more advanced example.\n\nCreate a bookmark \"BookmarkX\" for each iteration in a loop, and add this to an array \"MyArrayVar\". After the first `iterated` action this will look like \"Bookmark1,Bookmark2,Bookmark3\". The second `iterated` action then deletes these bookmarks using the created array.\n\nDissecting the first array construction action. The `join` command takes the elements `.ScriptVars.MyArrayVar` and joins them together into a string separated by the separtor `,`. So with an array of [ elem1 elem2 ] this becomes a string as `elem1,elem2`. The `if` statement checks if the value of `.ScriptVars.BookmarkCounter` is 0, if it is 0 (i.e. the first iteration) it sets the string to `Bookmark1`. If it is not 0, it executes the join command on .ScriptVars.MyArrayVar, on iteration 3, the result of this would be `Bookmark1,Bookmark2` then it appends the fixed string `,Bookmark`, so far the string is `Bookmark1,Bookmark2,Bookmark`. Lastly it takes the value of `.ScriptVars.BookmarkCounter`, which is now 2, and adds 1 too it and appends, making the entire string `Bookmark1,Bookmark2,Bookmark3`.\n\n ```json\n{\n    \"action\": \"setscriptvar\",\n    \"settings\": {\n        \"name\": \"BookmarkCounter\",\n        \"type\": \"int\",\n        \"value\": \"0\"\n    }\n},\n{\n    \"action\": \"iterated\",\n    \"disabled\": false,\n    \"settings\": {\n        \"iterations\": 3,\n        \"actions\": [\n            {\n                \"action\": \"setscriptvar\",\n                \"settings\": {\n                    \"name\": \"MyArrayVar\",\n                    \"type\": \"array\",\n                    \"value\": \"{{ if eq 0 .ScriptVars.BookmarkCounter }}Bookmark1{{ else }}{{ join .ScriptVars.MyArrayVar \\\",\\\" }},Bookmark{{ .ScriptVars.BookmarkCounter | add 1 }}{{ end }}\",\n                    \"sep\": \",\"\n                }\n            },\n            {\n                \"action\": \"createbookmark\",\n                \"settings\": {\n                    \"title\": \"{{ index .ScriptVars.MyArrayVar .ScriptVars.BookmarkCounter }}\",\n                    \"description\": \"This bookmark contains some interesting selections\"\n                }\n            },\n            {\n                \"action\": \"setscriptvar\",\n                \"settings\": {\n                    \"name\": \"BookmarkCounter\",\n                    \"type\": \"int\",\n                    \"value\": \"{{ .ScriptVars.BookmarkCounter | add 1}}\"\n                }\n            }\n        ]\n    }\n},\n{\n    \"action\": \"setscriptvar\",\n    \"settings\": {\n        \"name\": \"BookmarkCounter\",\n        \"type\": \"int\",\n        \"value\": \"0\"\n    }\n},\n{\n    \"action\": \"iterated\",\n    \"disabled\": false,\n    \"settings\": {\n        \"iterations\": 3,\n        \"actions\": [\n            {\n                \"action\": \"deletebookmark\",\n                \"settings\": {\n                    \"mode\": \"single\",\n                    \"title\": \"{{ index .ScriptVars.MyArrayVar .ScriptVars.BookmarkCounter }}\"\n                }\n            },\n            {\n                \"action\": \"setscriptvar\",\n                \"settings\": {\n                    \"name\": \"BookmarkCounter\",\n                    \"type\": \"int\",\n                    \"value\": \"{{ .ScriptVars.BookmarkCounter | add 1}}\"\n                }\n            }\n        ]\n    }\n}\n ```",
		},
		"setsensevariable": {
			Description: "## SetSenseVariable action\n\nSets a Qlik Sense variable on a sheet in the open app.\n",
			Examples:    "### Example\n\nSet a variable to 2000\n\n```json\n{\n     \"name\": \"vSampling\",\n     \"value\": \"2000\"\n}\n```",
		},
		"sheetchanger": {
			Description: "## SheetChanger action\n\nCreate and execute a `changesheet` action for each sheet in an app. This can be used to cache the inital state for all objects or, by chaining two subsequent `sheetchanger` actions, to measure how well the calculations in an app utilize the cache.\n",
			Examples:    "### Example\n\n```json\n{\n    \"label\" : \"Sheetchanger uncached\",\n    \"action\": \"sheetchanger\"\n},\n{\n    \"label\" : \"Sheetchanger cached\",\n    \"action\": \"sheetchanger\"\n}\n```\n",
		},
		"smartsearch": {
			Description: "## SmartSearch action\n\nPerform a Smart Search in Sense app to find suggested selections.\n",
			Examples:    "\n### Examples\n\n#### Search with one search term\n```json\n{\n    \"action\": \"smartsearch\",\n    \"label\": \"one term search\",\n    \"settings\": {\n        \"searchtextlist\": [\n            \"term1\"\n        ]\n    }\n}\n```\n\n#### Search with two search terms\n```json\n{\n    \"action\": \"smartsearch\",\n    \"label\": \"two term search\",\n    \"settings\": {\n        \"searchtextlist\": [\n            \"term1 term2\"\n        ]\n    }\n}\n```\n\n#### Search with random selection of search text from list\n```json\n{\n    \"action\": \"smartsearch\",\n    \"settings\": {\n        \"searchtextlist\": [\n            \"text1\",\n            \"text2\",\n            \"text3\"\n        ]\n    }\n}\n```\n\n#### Search with random selection of search text from file\n```json\n{\n    \"action\": \"smartsearch\",\n    \"settings\": {\n        \"searchtextsource\": \"searchtextfile\",\n        \"searchtextfile\": \"data/searchtexts.txt\"\n    }\n}\n```\n##### `data/searchtexts.txt`\n```\nsearch text\n\"quoted search text\"\nanother search text\n```\n\n#### Simulate pasting search text\n\nThe default behavior is to simulate typing at normal speed.\n```json\n{\n    \"action\": \"smartsearch\",\n    \"settings\": {\n        \"pastesearchtext\": true,\n        \"searchtextlist\": [\n            \"text1\"\n        ]\n    }\n}\n```\n\n#### Make a random selection from search results\n```json\n{\n    \"action\": \"smartsearch\",\n    \"settings\": {\n        \"searchtextlist\": [\n            \"term1\"\n        ],\n        \"makeselection\": true,\n        \"selectionthinktime\": {\n            \"type\": \"static\",\n            \"delay\": 2\n        }\n    }\n}\n```\n\n#### Search with one search term including spaces\n```json\n{\n    \"action\": \"smartsearch\",\n    \"settings\": {\n        \"searchtextlist\": [\n            \"\\\"word1 word2\\\"\"\n        ]\n    }\n}\n```\n\n#### Search with two search terms, one of them including spaces\n```json\n{\n    \"action\": \"smartsearch\",\n    \"label\": \"two term search, one including spaces\",\n    \"settings\": {\n        \"searchtextlist\": [\n            \"\\\"word1 word2\\\" term2\"\n        ]\n    }\n}\n```\n\n#### Search with one search term including double quote\n```json\n{\n    \"action\": \"smartsearch\",\n    \"label\": \"one term search including spaces\",\n    \"settings\": {\n        \"searchtext\":\n        \"searchtextlist\": [\n            \"\\\\\\\"hello\"\n        ]\n    }\n}\n```\n",
		},
		"stepdimension": {
			Description: "## StepDimension action\n\nCycle a step in a cyclic dimension\n",
			Examples:    "### Example\n\nCycle one step in the dimension with library ID `aBc123`.\n\n```json\n{\n    \"action\": \"stepdimension\",\n    \"settings\":{\n        \"id\": \"aBc123\"\n    }\n}\n```\n",
		},
		"subscribeobjects": {
			Description: "## Subscribeobjects action\n\nSubscribe to any object in the currently active app.\n",
			Examples:    "### Example\n\nSubscribe to two objects in the currently active app and remove any previous subscriptions. \n\n```json\n{\n    \"action\" : \"subscribeobjects\",\n    \"label\" : \"clear subscriptions and subscribe to mBshXB and f2a50cb3-a7e1-40ac-a015-bc4378773312\",\n     \"disabled\": false,\n    \"settings\" : {\n        \"clear\" : true,\n        \"ids\" : [\"mBshXB\", \"f2a50cb3-a7e1-40ac-a015-bc4378773312\"]\n    }\n}\n```\n\nSubscribe to an additional single object (or a list of objects) in the currently active app, adding the new subscription to any previous subscriptions.\n\n```json\n{\n    \"action\" : \"subscribeobjects\",\n    \"label\" : \"add c430d8e2-0f05-49f1-aa6f-7234e325dc35 to currently subscribed objects\",\n     \"disabled\": false,\n    \"settings\" : {\n        \"clear\" : false,\n        \"ids\" : [\"c430d8e2-0f05-49f1-aa6f-7234e325dc35\"]\n    }\n}\n```",
		},
		"thinktime": {
			Description: "## ThinkTime action\n\nSimulate user think time.\n\n**Note:** This action does not require an app context (that is, it does not have to be prepended with an `openapp` action).\n",
			Examples:    "### Examples\n\n#### ThinkTime uniform\n\nThis simulates a think time of 10 to 15 seconds.\n\n```json\n{\n     \"label\": \"TimerDelay\",\n     \"action\": \"thinktime\",\n     \"settings\": {\n         \"type\": \"uniform\",\n         \"mean\": 12.5,\n         \"dev\": 2.5\n     } \n} \n```\n\n#### ThinkTime constant\n\nThis simulates a think time of 5 seconds.\n\n```json\n{\n     \"label\": \"TimerDelay\",\n     \"action\": \"thinktime\",\n     \"settings\": {\n         \"type\": \"static\",\n         \"delay\": 5\n     }\n}\n```\n",
		},
		"unpublishbookmark": {
			Description: "## UnpublishBookmark action\n\nUnpublish a bookmark.\n\n**Note:** Specify *either* `title` *or* `id`, not both.\n",
			Examples:    "### Example\n\nUnpublish the bookmark with `id` \"bookmark1\" that was created earlier on in the script.\n\n```json\n{\n    \"label\" : \"Unpublish bookmark 1\",\n    \"action\": \"unpublishbookmark\",\n    \"disabled\" : false,\n    \"settings\" : {\n        \"id\" : \"bookmark1\"\n    }\n}\n```\n\nUnpublish the bookmark with the `title` \"bookmark of testuser\", where \"testuser\" is the username of the simulated user.\n\n```json\n{\n    \"label\" : \"Unpublish bookmark 2\",\n    \"action\": \"unpublishbookmark\",\n    \"disabled\" : false,\n    \"settings\" : {\n        \"title\" : \"bookmark of {{.UserName}}\"\n    }\n}\n```\n",
		},
		"unpublishsheet": {
			Description: "## UnpublishSheet action\n\nUnpublish sheets in the current app.\n",
			Examples:    "### Example\n```json\n{\n     \"label\": \"UnpublishSheets\",\n     \"action\": \"unpublishsheet\",\n     \"settings\": {\n       \"mode\": \"allsheets\"        \n     }\n}\n```\n",
		},
		"unsubscribeobjects": {
			Description: "## Unsubscribeobjects action\n\nUnsubscribe to any currently subscribed object.\n",
			Examples:    "### Example\n\nUnsubscribe from a single object (or a list of objects).\n\n```json\n{\n    \"action\" : \"unsubscribeobjects\",\n    \"label\" : \"unsubscribe from object maVjt and its children\",\n    \"disabled\": false,\n    \"settings\" : {\n        \"ids\" : [\"maVjt\"]\n    }\n}\n```\n\nUnsubscribe from all currently subscribed objects.\n\n```json\n{\n    \"action\" : \"unsubscribeobjects\",\n    \"label\" : \"unsubscribe from all objects\",\n    \"disabled\": false,\n    \"settings\" : {\n        \"clear\": true\n    }\n}\n```",
		},
	}

	Schedulers = map[string]common.DocEntry{
		"simple": {
			Description: "## Simple scheduler\n\nSettings specific to the `simple` scheduler.\n",
			Examples:    "### Using `reconnectsettings`\n\nIf `reconnectsettings.reconnect` is enabled, the following is attempted:\n\n1. Re-connect the WebSocket.\n2. Get the currently opened app in the re-attached engine session.\n3. Re-subscribe to the same object as before the disconnection.\n4. If successful, the action during which the re-connect happened is logged as a successful action with `action` and `label` changed to `Reconnect(action)` and `Reconnect(label)`.\n5. Restart the action that was executed when the disconnection occurred (unless it is a `thinktime` action, which will not be restarted).\n6. Log an info row with info type `WebsocketReconnect` and with a semicolon-separated `details` section as follows: \"success=`X`;attempts=`Y`;TimeSpent=`Z`\"\n    * `X`: True/false\n    * `Y`: An integer representing the number of re-connection attempts\n    * `Z`: The time spent re-connecting (ms)\n\n### Example\n\nSimple scheduler settings:\n\n```json\n\"scheduler\": {\n   \"type\": \"simple\",\n   \"settings\": {\n       \"executiontime\": 120,\n       \"iterations\": -1,\n       \"rampupdelay\": 7.0,\n       \"concurrentusers\": 10\n   },\n   \"iterationtimebuffer\" : {\n       \"mode\": \"onerror\",\n       \"duration\" : \"5s\"\n   },\n   \"instance\" : 2\n}\n```\n\nSimple scheduler set to attempt re-connection in case of an unexpected WebSocket disconnection: \n\n```json\n\"scheduler\": {\n   \"type\": \"simple\",\n   \"settings\": {\n       \"executiontime\": 120,\n       \"iterations\": -1,\n       \"rampupdelay\": 7.0,\n       \"concurrentusers\": 10\n   },\n   \"iterationtimebuffer\" : {\n       \"mode\": \"onerror\",\n       \"duration\" : \"5s\"\n   },\n    \"reconnectsettings\" : {\n      \"reconnect\" : true\n    }\n}\n```\n",
		},
	}

	Params = map[string][]string{}/* 183 elements not displayed */

	Config = map[string]common.DocEntry{
		"connectionSettings": {
			Description: "## Connection settings section\n\nThis section of the JSON file contains connection information.\n\nJSON Web Token (JWT), an open standard for creation of access tokens, or WebSocket can be used for authentication. When using JWT, the private key must be available in the path defined by `jwtsettings.keypath`.\n",
			Examples:    "### Examples\n\n#### JWT authentication\n\n```json\n\"connectionSettings\": {\n    \"server\": \"myserver.com\",\n    \"mode\": \"jwt\",\n    \"virtualproxy\": \"jwt\",\n    \"security\": true,\n    \"allowuntrusted\": false,\n    \"jwtsettings\": {\n        \"keypath\": \"mock.pem\",\n        \"claims\": \"{\\\"user\\\":\\\"{{.UserName}}\\\",\\\"directory\\\":\\\"{{.Directory}}\\\"}\"\n    }\n}\n```\n\n* `jwtsettings`:\n\nThe strings for `reqheader`, `jwtheader` and `claims` are processed as a GO template where the `User` struct can be used as data:\n```golang\nstruct {\n	UserName  string\n	Password  string\n	Directory string\n	}\n```\nThere is also support for the `time.Now` method using the function `now`.\n\n* `jwtheader`:\n\nThe entries for message authentication code algorithm, `alg`, and token type, `typ`, are added automatically to the header and should not be included.\n    \n**Example:** To add a key ID header, `kid`, add the following string:\n```json\n{\n	\"jwtheader\": \"{\\\"kid\\\":\\\"myKeyId\\\"}\"\n}\n```\n\n* `claims`:\n\n**Example:** For on-premise JWT authentication (with the user and directory set as keys in the QMC), add the following string:\n```json\n{\n	\"claims\": \"{\\\"user\\\": \\\"{{.UserName}}\\\",\\\"directory\\\": \\\"{{.Directory}}\\\"}\"\n}\n```\n**Example:** To add the time at which the JWT was issued, `iat` (\"issued at\"), add the following string:\n```json\n{\n	\"claims\": \"{\\\"iat\\\":{{now.Unix}}\"\n}\n```\n**Example:** To add the expiration time, `exp`, with 5 hours expiration (time.Now uses nanoseconds), add the following string:\n```json\n{\n	\"claims\": \"{\\\"exp\\\":{{(now.Add 18000000000000).Unix}}}\"\n}\n```\n\n#### Static header authentication\n\n```json\nconnectionSettings\": {\n	\"server\": \"myserver.com\",\n	\"mode\": \"ws\",\n	\"security\": true,\n	\"virtualproxy\" : \"header\",\n	\"headers\" : {\n		\"X-Sense-User\" : \"{{.UserName}}\"\n}\n```\n",
		},
		"hooks": {
			Description: "## Hooks section\n\nThis section contains the possibility to define hooks, which will send requests to a defined endpoint before and after a test execution.\n",
			Examples:    "### Example\n\n#### Send a request to slack that a test is starting.\n\n```json\n\"hooks\": {\n    \"preexecute\": {\n        \"url\": \"https://hooks.slack.com/services/XXXXXXXXX/YYYYYYYYYYY/ZZZZZZZZZZZZZZZZZZZZZZZZ\",\n        \"method\": \"POST\",\n        \"payload\": \"{ \\\"text\\\": \\\"Running test with {{ .Scheduler.ConcurrentUsers }} concurrent users and {{ .Scheduler.Iterations }} iterations towards {{ .ConnectionSettings.Server }}.\\\"}\",\n        \"contenttype\": \"application/json\"\n    },\n    \"postexecute\": {\n        \"url\": \"https://hooks.slack.com/services/XXXXXXXXX/YYYYYYYYYYY/ZZZZZZZZZZZZZZZZZZZZZZZZ\",\n        \"method\": \"POST\",\n        \"payload\": \"{ \\\"text\\\": \\\"Test finished with {{ .Counters.Errors }} errors and {{ .Counters.Warnings }} warnings. Total Sessions: {{ .Counters.Sessions }}\\\"}\"\n    }\n}\n```\n\nThis will send a message on test startup such as:\n\n```text\nRunning test with 10 concurrent users and 2 iterations towards MyServer.com.\n```\n\nAnd a message on test finished such as:\n\n```text\nTest finished with 4 errors and 12 warnings. Total Sessions: 20.\n```\n\n#### Ask an endpoint before execution if test is ok to run\n\n```json\n\"hooks\": {\n    \"preexecute\": {\n        \"url\": \"http://myserver:8080/oktoexecute\",\n        \"method\": \"POST\",\n        \"headers\": [\n            {\n                \"name\" : \"someheader\",\n                \"value\": \"headervalue\"\n            }\n        ],\n        \"payload\": \"{\\\"testID\\\": \\\"12345\\\",\\\"startAt\\\": \\\"{{now.Format \\\"2006-01-02T15:04:05Z07:00\\\"}}\\\"}\",\n        \"extractors\": [\n            {\n                \"name\": \"oktorun\",\n                \"path\" : \"/oktorun\",\n                \"faillevel\": \"error\",\n                \"validator\" : {\n                    \"type\": \"bool\",\n                    \"value\": \"true\"\n                }\n            }\n        ]\n    }\n}\n```\n\nThis will POST a request to `http://myserver:8080/oktoexecute` with the body:\n\n```json\n{\n    \"testID\": \"12345\",\n    \"startAt\": \"2021-05-06T08:00:00Z01:00\"\n}\n```\n\nFor a test started at `2021-05-06T08:00:00` in timezone UTC+1.\n\nLet's assume the response from this endpoint is:\n\n```json\n{\n    \"oktorun\": false\n}\n```\n\nThe validator with path `/oktorun` will extract the value `false` and compare to the value defined in the validator, in this case `true`. Since the they are not equal the test will stop with error before starting exection.\n",
		},
		"loginSettings": {
			Description: "## Login settings section\n\nThis section of the JSON file contains information on the login settings.\n",
			Examples:    "### Examples\n\n#### Prefix login request type\n\n```json\n\"loginSettings\": {\n   \"type\": \"prefix\",\n   \"settings\": {\n       \"directory\": \"anydir\",\n       \"prefix\": \"Nunit\"\n   }\n}\n```\n\n#### Userlist login request type\n\n```json\n\"loginSettings\": {\n  \"type\": \"userlist\",\n  \"settings\": {\n    \"userList\": [\n      {\n        \"username\": \"sim1@myhost.example\",\n        \"directory\": \"anydir1\",\n        \"password\": \"MyPassword1\"\n      },\n      {\n        \"username\": \"sim2@myhost.example\"\n      }\n    ],\n    \"directory\": \"anydir2\",\n    \"password\": \"MyPassword2\"\n  }\n}\n```\n\n#### Fromfile login request type\n\nReads a user list from file. 1 User per row of the and with the format `username;directory;password`. `directory` and `password` are optional, if none are defined for a user it will use the default values on settings (i.e. `defaultdir` and `defaultpassword`). If the used authentication type doesn't use `directory` or `password` these can be omitted.\n\nDefinition with default values:\n\n```json\n\"loginSettings\": {\n  \"type\": \"fromfile\",\n  \"settings\": {\n    \"filename\": \"./myusers.txt\",\n    \"directory\": \"defaultdir\",\n    \"password\": \"defaultpassword\"\n  }\n}\n```\n\nDefinition without default values:\n\n```json\n\"loginSettings\": {\n  \"type\": \"fromfile\",\n  \"settings\": {\n    \"filename\": \"./myusers.txt\"\n  }\n}\n```\n\nThis is a valid format of a file.\n\n```text\ntestuser1\ntestuser2;myspecialdirectory\ntestuser3;;somepassword\ntestuser4;specialdir;anotherpassword\ntestuser5;;A;d;v;a;n;c;e;d;;P;a;s;s;w;o;r;d;\n```\n\n*testuser1* will get default `directory` and `password`, *testuser3* and *testuser5* will get default `directory`.\n",
		},
		"main": {
			Description: "# Setting up load scenarios\n\nA load scenario is defined in a JSON file with a number of sections.\n",
			Examples:    "\n## Example\n\n* [Load scenario example](./examples/configuration_example.json)\n",
		},
		"scenario": {
			Description: "## Scenario section\n\nThis section of the JSON file contains the actions that are performed in the load scenario.\n\n### Structure of an action entry\n\nAll actions follow the same basic structure: \n",
			Examples:    "### Example\n\n```json\n{\n    \"action\": \"actioname\",\n    \"label\": \"custom label for analysis purposes\",\n    \"disabled\": false,\n    \"settings\": {\n        \n    }\n}\n```\n",
		},
		"scheduler": {
			Description: "## Scheduler section\n\nThis section of the JSON file contains scheduler settings for the users in the load scenario.\n",
			Examples:    "\n",
		},
		"settings": {
			Description: "## Settings section\n\nThis section of the JSON file contains timeout and logging settings for the load scenario.\n",
			Examples:    "### Examples\n\n```json\n\"settings\": {\n	\"timeout\": 300,\n	\"logs\": {\n		\"traffic\": false,\n		\"debug\": false,\n		\"filename\": \"logs/{{.ConfigFile}}-{{timestamp}}.log\"\n	}\n}\n```\n\n```json\n\"settings\": {\n	\"timeout\": 300,\n	\"logs\": {\n		\"filename\": \"logs/scenario.log\"\n	},\n	\"outputs\" : {\n	    \"dir\" : \"./outputs\"\n	}\n}\n```\n",
		},
	}

	Groups = []common.GroupsEntry{
		{
			Name:    "commonActions",
			Title:   "Common actions",
			Actions: []string{"applybookmark", "askhubadvisor", "changesheet", "clearall", "clearfield", "clickactionbutton", "containertab", "createbookmark", "createsheet", "deletebookmark", "deletesheet", "disconnectapp", "disconnectenvironment", "dosave", "duplicatesheet", "getscript", "iterated", "listboxselect", "objectsearch", "openapp", "productversion", "publishbookmark", "publishsheet", "randomaction", "reload", "select", "setscript", "setscriptvar", "setsensevariable", "sheetchanger", "smartsearch", "subscribeobjects", "thinktime", "unpublishbookmark", "unpublishsheet", "unsubscribeobjects", "stepdimension"},
			DocEntry: common.DocEntry{
				Description: "# Common actions\n\nThese actions are applicable for most types of Qlik Sense deployments.\n\n**Note:** It is recommended to prepend the actions listed here with an `openapp` action as most of them perform operations in an app context (such as making selections or changing sheets).\n",
				Examples:    "",
			},
		},
		{
			Name:    "qseowActions",
			Title:   "Qlik Sense Enterprise on Windows (QSEoW) actions",
			Actions: []string{"deleteodag", "generateodag", "openhub", "changestream"},
			DocEntry: common.DocEntry{
				Description: "## Qlik Sense Enterprise on Windows (QSEoW) actions\n\nThese actions are only applicable to Qlik Sense Enterprise on Windows (QSEoW) deployments.\n",
				Examples:    "",
			},
		},
	}

	Extra = map[string]common.DocEntry{
		"sessionvariables": {
			Description: "\n## Session variables\n\nThis section describes the session variables that can be used with some of the actions.\n\n<details>\n<summary><a name=\"session_variables\"></a>Session variables</summary>\n\nSome action parameters support session variables. A session variable is defined by putting the variable, prefixed by a dot, within double curly brackets, such as `{{.UserName}}`.\n\nThe following session variables are supported in actions:\n\n* `UserName`: The simulated username. This is not the same as the authenticated user, but rather how the username was defined by [Login settings](#login_settings).  \n* `Session`: The enumeration of the currently simulated session.\n* `Thread`: The enumeration of the currently simulated \"thread\" or \"concurrent user\".\n* `ScriptVars`: A map containing script variables added by the action `setscriptvar`.\n* `Artifacts`:\n  * `GetIDByTypeAndName`: A function that accepts the two string arguments,\n    `artifactType` and `artifactName`, and returns the resource id of the artifact.\n  * `GetNameByTypeAndID`: A function that accepts the two string arguments,\n    `artifactType` and `artifactID`, and returns the name of the artifact.\n\n\nThe following variable is supported in the filename of the log file:\n\n* `ConfigFile`: The filename of the config file, without file extension.\n\nThe following functions are supported:\n\n* `now`: Evaluates Golang [time.Now()](https://golang.org/pkg/time/). \n* `hostname`: Hostname of the local machine.\n* `timestamp`: Timestamp in `yyyyMMddhhmmss` format.\n* `uuid`: Generate an uuid.\n* `env`: Retrieve a specific environment variable. Takes one argument - the name of the environment variable to expand.\n* `add`: Adds two integer values together and outputs the sum. E.g. `{{ add 1 2 }}`.\n* `join`: Joins array elements together to a string separated by defined separator. E.g. `{{ join .ScriptVars.MyArray \\\",\\\" }}`.\n* `modulo`: Returns modulo of two integer values and output the result. E.g. `{{ modulo 10 4 }}` (will return 2)\n\n### Example\n\n```json\n{\n    \"label\" : \"Create bookmark\",\n    \"action\": \"createbookmark\",\n    \"settings\": {\n        \"title\": \"my bookmark {{.Thread}}-{{.Session}} ({{.UserName}})\",\n        \"description\": \"This bookmark contains some interesting selections\"\n    }\n},\n{\n    \"label\" : \"Publish created bookmark\",\n    \"action\": \"publishbookmark\",\n    \"disabled\" : false,\n    \"settings\" : {\n        \"title\": \"my bookmark {{.Thread}}-{{.Session}} ({{.UserName}})\",\n    }\n}\n\n```\n\n```json\n{\n  \"action\": \"createbookmark\",\n  \"settings\": {\n    \"title\": \"{{env \\\"TITLE\\\"}}\",\n    \"description\": \"This bookmark contains some interesting selections\"\n  }\n}\n```\n\n```json\n{\n    \"action\": \"setscriptvar\",\n    \"settings\": {\n        \"name\": \"BookmarkCounter\",\n        \"type\": \"int\",\n        \"value\": \"1\"\n    }\n},\n{\n  \"action\": \"createbookmark\",\n  \"settings\": {\n    \"title\": \"Bookmark no {{ add .ScriptVars.BookmarkCounter 1 }}\",\n    \"description\": \"This bookmark will have the title Bookmark no 2\"\n  }\n}\n```\n\n```json\n{\n  \"action\": \"setscriptvar\",\n  \"settings\": {\n    \"name\": \"MyAppId\",\n    \"type\": \"string\",\n    \"value\": \"{{.Artifacts.GetIDByTypeAndName \\\"app\\\" (print \\\"an-app-\\\" .Session)}}\"\n  }\n}\n```\n\nLet's assume the case there are 4 apps to be used in the test, all ending with number 0 to 3. The use of modulo in the example will cycle through the app suffix number in following order: 1, 2, 3, 0.\n\n```json\n{\n  \"action\": \"elastictriggersubscription\",\n  \"label\": \"trigger reporting task\",\n  \"settings\": {\n    \"subscriptiontype\": \"template-sharing\",\n    \"limitperpage\": 100,\n    \"appname\": \"PS-18566_Test_Levels_Pages- {{ modulo .Session 4}}\",\n    \"subscriptionmode\": \"random\",\n  }\n}\n```\n\nVery similar case as above but apps have number suffix from 1 to 4. This can be handled combining `modulo` and `add` functions. The cycle through the suffix number will be done in following order: 2, 3, 4, 1.\n```json\n{\n  \"action\": \"elastictriggersubscription\",\n  \"label\": \"trigger reporting task\",\n  \"settings\": {\n    \"subscriptiontype\": \"template-sharing\",\n    \"limitperpage\": 100,\n    \"appname\": \"PS-18566_Test_Levels_Pages- {{ modulo .Session 4 | add 1 }}\",\n    \"subscriptionmode\": \"random\",\n  }\n}\n```\n\n</details>\n",
			Examples:    "",
		},
	}
)

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL