You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: documentation/Functions.md
+44-13Lines changed: 44 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -158,14 +158,36 @@ Note: No background scripts are running and Katacoda user don't have to manually
158
158
***
159
159
160
160
### executeCommand <aname="executeCommand"></a>
161
+
This function is used when you want to use a bash (or powershell/cmd on windows) command.
162
+
161
163
#### parameter
162
-
1. The command that will be executed on Windows
163
-
2. The command that will be executed on Linux
164
-
3. Json-object with optional fields
165
-
* (Optional) Directory where the command will be executed, if not in current directory (relative to workspace){"dir": string}
166
-
* (Optional) Synchronous or asynchronous process. Use asynchronous when starting a server. Default is synchronous. {"asynchronous": boolean}
167
-
* (Optional) Array of arguments {"args": string[]}
168
-
4. Assert information needed if you start a server to check server availability. Only required when you start a asynchronous server.
164
+
This function consists of four parameters.
165
+
166
+
1. First parameter:
167
+
-**Required**
168
+
-**Type**- String
169
+
-**Description**-It contains the input which is a command. The command that will be executed on Windows.
170
+
171
+
2. Second parameter:
172
+
-**Required**
173
+
-**Type**- String
174
+
-**Description**-It contains the input which is a command. The command that will be executed on Linux.
175
+
176
+
3. Third parameter:
177
+
-**Required**
178
+
-**Type**- JSON object
179
+
-**Description**- JSON object with optional fields
180
+
***First attribute**: (Optional) Directory where the command will be executed, if not in current directory (relative to workspace)
181
+
Example: {"dir": string}
182
+
***Second attribute**: (Optional) Synchronous or asynchronous process. Use asynchronous when starting a server. Default is synchronous.
183
+
Example: {"asynchronous": boolean}
184
+
***Third attribute**: (Optional) Array of arguments
185
+
Example: {"args": string[]}
186
+
187
+
4. Fourth parameter:
188
+
-**Required**
189
+
-**Type**- JSON object
190
+
-**Description**-Assertion information needed if you start a server to check server availability. Only required when you start a asynchronous server. This parameter is only needed when the command is an asynchronous command.
169
191
170
192
#### Commands
171
193
It is needed to pass a command for Windows and also for Linux-based systems because both systems will always be tested.
@@ -182,17 +204,25 @@ interval: The availability of the server is checked in the given interval
Will create a command to execute the script in the directory with the parameter --params 5 and in the current command prompt. The command prompt will be blocked until you stop the script.
Starting a server in a new terminal. You have to specify the port for testing, the other parameters are optional. The startupTime can specify how long the runner will wait for a response from the server process and with interval you can set the frequenzy for the server testing. The path is the subpath from your server that should be reached.
193
215
194
216
***
195
217
218
+
Note:
219
+
220
+
1. The command for execution will be generated by Katacoda runner, so user will have to execute this command manually.
221
+
222
+
2. This command uses '/bin/sh' on Unix and the shell specified in %COMSPEC% on Windows.(Mostly cmd.exe, if you want to execute it on powershell add powershell.exe at the start of the command)
223
+
224
+
***
225
+
196
226
### installCobiGen <aname="installGobiGen"></a>
197
227
#### parameter
198
228
* No parameters
@@ -456,11 +486,12 @@ In second parameter, you can add 3 attributes.
456
486
-**Third attribute**: It is optional and it is the array of npm arguments.
0 commit comments