Difference between revisions of "OtfExecution"
Line 1: | Line 1: | ||
{{DISPLAYTITLE:Open Test Framework - Execution of Procedures}}[[Category:OTF]] | {{DISPLAYTITLE:Open Test Framework - Execution of Procedures}}[[Category:OTF]] | ||
== Introduction == | == Introduction == | ||
− | The OTF does not only support design time activities but it also supports | + | The OTF does not only support design time activities but it also supports run time very well. It supports to execute a procedure in Dotnet platform or Java platform. Also, there are many ways to execute a procedure such as using command buttons in the [[OtfMenuBar|Ribbon menu]], using shortcut keys or using [[OtfSolutionExplorer#Procedures|context menu]]. Similar to some other IDEs, users can execute a test sequence in the OTF with or without debugging. |
+ | |||
+ | When a procedure is executed, the OTF first builds the [https://en.wikipedia.org/wiki/Dynamic-link_library DLL] (running with Dotnet platform) or the [https://en.wikipedia.org/wiki/JAR_(file_format) JAR] (running with Java platform), then it use the [https://en.wikipedia.org/wiki/Dynamic-link_library DLL] or the [https://en.wikipedia.org/wiki/JAR_(file_format) JAR] to run the current test sequence. | ||
+ | |||
+ | A procedure may call other procedures in another document in the same or different projects. As a result, when users execute a procedure, it shall happen as follows: | ||
+ | |||
+ | # All the changes in the related projects{{TooltipIcon|the current project and its referred projects}} shall be automatically saved. | ||
+ | # All the related projects{{TooltipIcon|the current project and its referred projects}} shall be validated and built. | ||
+ | # The current procedure and all the called procedures, if any, shall be executed. | ||
+ | |||
+ | After the validation, if there are critical errors in a test sequence, the related project shall not be built and the execution shall be cancelled. All the related errors and warnings of the validation can be found in the [[OtfErrorList|Error List tool window]]. You can skip the validation before the execution by checking the "'''No Validation before execution'''" check-box in the [[OtfSettings#"Expert" settings tab|"Expert" settings tab]] of the [[OtfSettings|OTF Settings]]. However, turning off the validation may result in undefined behaviors of the execution; normally, it skips the node with errors. If there is any problems when building the projects, the execution is also cancelled. | ||
+ | |||
+ | :[[File:Exclamation.png]] NOTE: | ||
+ | * The OTF only allows to execute one test sequence at a time. You can not execute a procedure when another procedure is being executed. The current execution has to be finished or stopped before a new execution is started. | ||
+ | * All the related test sequences shall be saved in the cache before the test execution so any changes during the execution shall not affect the behavior of the saved test sequences e.g. a node which is deleted after the execution is started is still executed. Only the changes with the variables in the [[OtfWatchWindow|Watch tool window]] during debugging execution shall affect the behavior of the test sequences (see Debugging mode below for more information). | ||
+ | |||
Line 9: | Line 24: | ||
+ | {{Anchor|ExcScope|}} | ||
=== Scopes of Execution === | === Scopes of Execution === | ||
− | + | Executing a procedure [[#ExcBySKey_CButton| ''with shortcut keys'' ]] or [[#ExcBySKey_CButton| ''with command buttons'' ]] depends on which scope selected in the "'''Execute Of'''" combo-box in the [[OtfMenuBar#"Runtime Environment" tab|"'''Runtime Environment'''"]] tab of the [[OtfMenuBar|Ribbon Menu]]. | |
− | Executing a procedure [[# | ||
There are 4 scopes of execution: | There are 4 scopes of execution: | ||
Line 40: | Line 55: | ||
== Ways of Executing a Procedure == | == Ways of Executing a Procedure == | ||
− | There are 3 ways to execute a procedure: | + | There are 3 ways to execute a procedure: using command buttons in the [[OtfMenuBar|Ribbon menu]], using shortcut keys or using [[OtfSolutionExplorer#Procedures|context menu]]. |
+ | |||
+ | :[[File:Exclamation.png]] NOTE: The OTF only allows to execute one test sequence a time. You can not execute a procedure when another procedure is being executed. The current execution has to be finished or stopped before a new execution is started. | ||
− | {{Anchor| | + | {{Anchor|ExcBySKey_CButton|}} |
− | === Using Shortcut Keys | + | === Using Command Buttons and Shortcut Keys === |
Below are the Shortcut Keys with their function descriptions: | Below are the Shortcut Keys with their function descriptions: | ||
Line 50: | Line 67: | ||
{|{{TableHeader}} | {|{{TableHeader}} | ||
|- style="background: gray; color: white; vertical-align:top;'''" | |- style="background: gray; color: white; vertical-align:top;'''" | ||
− | | '''Command Button''' || '''Shortcut Key''' || '''Function''' | + | | '''Command Button''' || '''Shortcut Key''' || '''Mode''' || '''Function''' |
|-{{TableRow2}} | |-{{TableRow2}} | ||
− | | Start || CTRL+F5 || Executes the procedure (see [[#ExcScope|execution scopes]]) without debbuging. | + | | Start || CTRL+F5 || Normal || Executes the procedure (see [[#ExcScope|execution scopes]]) without debbuging. |
|-{{TableRow1}} | |-{{TableRow1}} | ||
− | | Debug || F5 || Debugs the procedure (see [[#ExcScope|execution scopes]]). Executes from the beginning/current node and suspends the execution ''at the following node with breakpoint'' in the test sequence waiting until a debug command/key is clicked/pressed. | + | | Debug || F5 || Debug || Debugs the procedure (see [[#ExcScope|execution scopes]]). Executes from the beginning/current node and suspends the execution ''at the following node with breakpoint'' in the test sequence waiting until a debug command/key is clicked/pressed. |
|-{{TableRow2}} | |-{{TableRow2}} | ||
− | | Step Over | + | | Step Over || F10 || Debug || Debugs the procedure (see [[#ExcScope|execution scopes]]). Executes from the beginning/current node (it does not step into called procedures) and suspends the execution ''at the adjacent node followed the current node'' waiting until a debug command/key is clicked/pressed. If there is a breakpoint inside the called procedure, it steps into the called procedure and suspends the execution at the node having breakpoint. |
|-{{TableRow1}} | |-{{TableRow1}} | ||
− | | Step To | + | | Step To || CTRL+F10 || Debug || Debugs the procedure (see [[#ExcScope|execution scopes]]). Executes from the beginning/current node and suspends the execution ''at the next selected node'' waiting until a debug command/key is clicked/pressed. If there is a breakpoint between the current point and the selected node, it suspends the execution at the node having breakpoint. If the selected node precedes the current point, it works the same as Debug button (F5) from the current point. |
|-{{TableRow2}} | |-{{TableRow2}} | ||
− | | Step In | + | | Step In || F11 || Debug || Debugs the procedure (see [[#ExcScope|execution scopes]]). Executes from the beginning/current node and suspends the execution ''at the adjacent node followed the current node'' waiting until a debug command/key is clicked/pressed. If the current point is a [[Core.Actions.ProcedureCall|ProcedureCall]], it steps into the called procedure and suspends the execution at the beginning node. |
|-{{TableRow1}} | |-{{TableRow1}} | ||
− | | Step Out | + | | Step Out || SHIFT+F11 || Debug || Debugs the procedure (see [[#ExcScope|execution scopes]]). ''Steps out (executes all remaining nodes of) the called procedure'' from the current point and suspends ''at the corresponding [[Core.Actions.ProcedureCall|ProcedureCall]]'' waiting until a debug command/key is clicked/pressed. It is only active if the execution is being suspended at a node in a called procedure. |
|} | |} | ||
+ | |||
+ | {{Note|The debug command buttons and the debug shortcut keys only work if there is no execution is in progress or if a procedure is being executed with debugging and the execution is being suspended at a certain node.}} | ||
Line 70: | Line 89: | ||
Executing a procedure with the [[OtfSolutionExplorer#Procedures|context menu]] is not affected by the execution scopes. To execute a certain procedure with [[OtfSolutionExplorer#Procedures|context menu]], you just need to right click on that procedure node in the [[OtfSolutionExplorer|Solution Explorer]] and select menu "'''Execute Workflow'''". The procedure shall be executed without debugging. | Executing a procedure with the [[OtfSolutionExplorer#Procedures|context menu]] is not affected by the execution scopes. To execute a certain procedure with [[OtfSolutionExplorer#Procedures|context menu]], you just need to right click on that procedure node in the [[OtfSolutionExplorer|Solution Explorer]] and select menu "'''Execute Workflow'''". The procedure shall be executed without debugging. | ||
− | |||
− | |||
− | There are 2 modes of execution: the execution with debugging and the normal execution (without debugging). Using an execution mode depends on the shortcut key or the command button which is used. | + | == Modes of Execution == |
+ | |||
+ | There are 2 modes of execution: the execution with debugging and the normal execution (without debugging). Using an execution mode depends on the [[#ExcBySKey_CButton|shortcut key]] or the [[#ExcBySKey_CButton|command button]] which is used. | ||
==== Execution with Debbuging ==== | ==== Execution with Debbuging ==== | ||
− | This mode allows you to observe the runtime behavior of your test sequence and locate logic errors. With this mode, you can | + | This mode allows you to observe the runtime behavior of your test sequence and locate logic errors. With this mode, you can suspend the execution at a certain node to examine your test sequences, evaluate and edit variables used in your test sequence. |
==== Normal Execution without Debugging ==== | ==== Normal Execution without Debugging ==== | ||
− | + | <!-- | |
To execute a procedure without debugging, you shall use the following shortcut keys and command buttons: | To execute a procedure without debugging, you shall use the following shortcut keys and command buttons: | ||
Revision as of 04:47, 29 August 2018
Contents
Introduction
The OTF does not only support design time activities but it also supports run time very well. It supports to execute a procedure in Dotnet platform or Java platform. Also, there are many ways to execute a procedure such as using command buttons in the Ribbon menu, using shortcut keys or using context menu. Similar to some other IDEs, users can execute a test sequence in the OTF with or without debugging.
When a procedure is executed, the OTF first builds the DLL (running with Dotnet platform) or the JAR (running with Java platform), then it use the DLL or the JAR to run the current test sequence.
A procedure may call other procedures in another document in the same or different projects. As a result, when users execute a procedure, it shall happen as follows:
- All the changes in the related projects
shall be automatically saved.
- All the related projects
shall be validated and built.
- The current procedure and all the called procedures, if any, shall be executed.
After the validation, if there are critical errors in a test sequence, the related project shall not be built and the execution shall be cancelled. All the related errors and warnings of the validation can be found in the Error List tool window. You can skip the validation before the execution by checking the "No Validation before execution" check-box in the "Expert" settings tab of the OTF Settings. However, turning off the validation may result in undefined behaviors of the execution; normally, it skips the node with errors. If there is any problems when building the projects, the execution is also cancelled.
- The OTF only allows to execute one test sequence at a time. You can not execute a procedure when another procedure is being executed. The current execution has to be finished or stopped before a new execution is started.
- All the related test sequences shall be saved in the cache before the test execution so any changes during the execution shall not affect the behavior of the saved test sequences e.g. a node which is deleted after the execution is started is still executed. Only the changes with the variables in the Watch tool window during debugging execution shall affect the behavior of the test sequences (see Debugging mode below for more information).
Setting Up before Execution
Setting up before execution relates to the scopes to be executed and the platforms to execute .
Scopes of Execution
Executing a procedure with shortcut keys or with command buttons depends on which scope selected in the "Execute Of" combo-box in the "Runtime Environment" tab of the Ribbon Menu.
There are 4 scopes of execution:
Scope | Description |
Solution | It shall execute the procedure main of the Startup Document in the Startup Project of the Solution. |
Current Project | It shall execute the procedure main of the Startup Document in the current Project (of the current opened procedure tab or OTL tab). |
Current Document | It shall execute the procedure main of the current Document (of the current opened procedure tab or OTL tab). |
Current Procedure | It shall execute the current opened procedure. This scope has no effect when an OTL tab is currently opened. |
Platforms to Execute
The OTF runtime supports to execute with Dotnet platform or Java platform. There are many ways to change the execution platform:
- Use the "Target Platform" combo-box in the "Status Bar"
- Use the "Target Platform" combo-box in the "Runtime Environment" tab of the Ribbon Menu
- Use the "Target Platform" combo-box in the "Runtime Environment" settings page of the OTF Settings
Ways of Executing a Procedure
There are 3 ways to execute a procedure: using command buttons in the Ribbon menu, using shortcut keys or using context menu.
NOTE: The OTF only allows to execute one test sequence a time. You can not execute a procedure when another procedure is being executed. The current execution has to be finished or stopped before a new execution is started.
Using Command Buttons and Shortcut Keys
Below are the Shortcut Keys with their function descriptions:
Command Button | Shortcut Key | Mode | Function |
Start | CTRL+F5 | Normal | Executes the procedure (see execution scopes) without debbuging. |
Debug | F5 | Debug | Debugs the procedure (see execution scopes). Executes from the beginning/current node and suspends the execution at the following node with breakpoint in the test sequence waiting until a debug command/key is clicked/pressed. |
Step Over | F10 | Debug | Debugs the procedure (see execution scopes). Executes from the beginning/current node (it does not step into called procedures) and suspends the execution at the adjacent node followed the current node waiting until a debug command/key is clicked/pressed. If there is a breakpoint inside the called procedure, it steps into the called procedure and suspends the execution at the node having breakpoint. |
Step To | CTRL+F10 | Debug | Debugs the procedure (see execution scopes). Executes from the beginning/current node and suspends the execution at the next selected node waiting until a debug command/key is clicked/pressed. If there is a breakpoint between the current point and the selected node, it suspends the execution at the node having breakpoint. If the selected node precedes the current point, it works the same as Debug button (F5) from the current point. |
Step In | F11 | Debug | Debugs the procedure (see execution scopes). Executes from the beginning/current node and suspends the execution at the adjacent node followed the current node waiting until a debug command/key is clicked/pressed. If the current point is a ProcedureCall, it steps into the called procedure and suspends the execution at the beginning node. |
Step Out | SHIFT+F11 | Debug | Debugs the procedure (see execution scopes). Steps out (executes all remaining nodes of) the called procedure from the current point and suspends at the corresponding ProcedureCall waiting until a debug command/key is clicked/pressed. It is only active if the execution is being suspended at a node in a called procedure. |
Using Context Menu
Executing a procedure with the context menu is not affected by the execution scopes. To execute a certain procedure with context menu, you just need to right click on that procedure node in the Solution Explorer and select menu "Execute Workflow". The procedure shall be executed without debugging.
Modes of Execution
There are 2 modes of execution: the execution with debugging and the normal execution (without debugging). Using an execution mode depends on the shortcut key or the command button which is used.
Execution with Debbuging
This mode allows you to observe the runtime behavior of your test sequence and locate logic errors. With this mode, you can suspend the execution at a certain node to examine your test sequences, evaluate and edit variables used in your test sequence.