Synchronize
Synchronize your kotlin scenario with a server🔗
Create your Kotlin scenario locally🔗
Follow this documentation to write your first Kotlin scenario.
Create your scenario on chutney server🔗
To create your scenario on a Chutney server from your IDE,
- Annotate with @Scenario In order to be included in the synchronization, a scenario must be annotated with @Scenario.
-
Configure your server info
- Proxy connection configuration is not mandatory.
It can be also set with corresponding Java System properties.
[ http | https ].[ proxyHost | proxyPort | proxyUser | proxyPassword ]
- Proxy connection configuration is not mandatory.
-
Execute a main to call synchronise function on your scenario
- See logs generated by synchronize function in your console to get more details of what it did.
This will create a new scenario on the given chutney server.
Then it will create a json file that contains the json representation of the scenario.json file name
The json file name format is :
{ID}
-
{scenario title}
.chutney.json
In our example it will be something like:123456-Search documents.chutney.json
synchronise function parameters
name type Required default description serverInfo
ChutneyServerInfo
null
holds needed information to connect to chutney server. updateRemote
Boolean
false
if true, the given scenario will be created if it doesn't exist and updated if it does. path
String
src/main/chutney/generated
path where to generate scenarios json files. block
SynchronizeScenariosBuilder.() -> Unit
all scenario annotated with @Scenario
Define which scenarios will be synchronized. -
Refer the generated ID in your scenario constructor:
where to find the generated ID ?
As explained above, the generated ID is in the created json file's name (123456-Search documents.chutney.json).
Now your scenario is created on the server !
Update your scenario on chutney server🔗
After editing your scenario kotlin code, jut call synchronize function again.
Don't forget !
Don't forget to call synchronize with updateRemote = true
Now your scenario is updated on Chutney server !
Synchronize from your integration server
- Push Kotlin scenarios source code to a centralized repository hosted on your SCM server (github, gitlab, bitbucket...).
- Call synchronize main from an integration server(jenkins, gitlab CI, github actions...) to update scenarios on your remote Chutney instance.
- Synchronize call can be scheduled just before running your test campaigns to have up-to-date scenarios.
Configure your environment on the server🔗
Now, the last step before running your scenario from the server is to setup environments and targets.
Create an environment
To manage environments on a server, you can :
- Use the UI forms to create or import environments.
- Copy an existing environment file into the server configuration folder (default is
.chutney/conf/environment
)