Pass Configuration Parameters to intaQt Client
The -c
parameter allows you to pass configuration parameters, such as Context Objects to intaQt Client.
Feature File with Context Object Example
| Feature: PassingContextObjectFromTerminal
Scenario: ConfigSwitch
Then verify myParameter==1
|
1. Passing Configuration Parameters to intaQt Client
Run the following from the command line in order to execute the Feature File above:
| ./intaQt test HowTo-IntaQtClient -c ContextObjects.myParameter=1
|
Note |
Everything following the -c switch will be interpreted as an intaQt configuration file. |
Run the following from the command line:
| ./intaqt test HowTo-IntaQtClient -c "ContextObjects {myParameter1=1, myParameter2="someValue", myParameter3=false}"
|
Which will execute this Feature File:
| Feature: PassingContextObjectFromTerminal
Scenario: ConfigSwitch
Then verify myParameter1==1
Then verify myParameter2=="someValue"
Then verify myParameter3==false
|
Note |
Although the above example is possible, it lacks reusability and is error prone due to special characters entered on the command line. If parameters should be passed to intaQt Client, it is better to use an XML Configuration. |
The following tutorial, XML Configuration demonstrates the more efficient way of passing configuration parameters to intaQt Client.