A new documentation is available for Squash TM 2.0 and later versions, check it here
Prerequisite : Having created a Gherkin test case
Select the Gherkin test case you wish to edit. The consultation opens on the 'Script' tab
2. Click on one of the lines of the script for it to become editable. The background color turns white, the script become editable. Several buttons show up in addition to the [Help] button: [Save], [Cancel], [Insert] and [Check syntax]
3. Write a Gherkin script and then click on:
[Save] or use [Ctrl]+[Alt]+[S] to save the script
[Cancel] to go back to reading mode only, and delete the modifications made since the last back-up
Prerequisite: Having created a Gherkin test case
Select the Gherkin test you wish to edit
Switch onto editable mode by clicking on one of the line of the script
There exists two means of inserting snippets in the script:
By clicking on [Insert]
By using [Ctrl]+[Space]
A dropdown menu opens showing different types of snippets you may insert
Click on the snippet in the menu to insert in the script
Snippets are reusable coding templates you can insert in the script editor. The following snippets are available:
sc inserts a scenario with keywords Scenario, Given, When, Then
scout inserts a scenario outline with keywords Scenario Outline, Given, When, Then, Examples
param insert <> for the demarcation of the parameters
tab4*3, tab4*2, tab3*3, tab3*2 insert data tables. The number of columns and lines is given in their names. There comes a header additionally
FOCUS
It is possible to use the [tab] key to go from one insert point to the other when you are completing the snippets.
Prerequisite: Having created a Gherkin test case with a complete script
Select the Gherkin test case you want to check
Switch onto editable mode by clicking on the script to make buttons appear
Click on [Check syntax]. A pop-up window opens to indicate whether the script is valid or not
The language of the Gherkin script is defined by the language tag which is to see on the first line of the script. This is how it looks: # language:<local>
The two first letters identifying the language of the user come and replace <local>:
fr for French
en for English
es for Spanish
de for German
The second line contains the keyword Feature, translated in the language of the script and followed by the name of the test case.
FOCUS
For the language of the script to be taken into account, it is necessary to put the language tag first, and it is also necessary for it to conform with the specifications of Gherkin.
When you create a Gherkin test case, the language and title tags are created in the same language as the browser. However, it is possible to modify the scripts using another language than the one of the browser following these steps:
Prerequisite: Having created a Gherkin test case
Select the Gherkin test case you wish to edit
Switch onto editable mode by clicking on the script to modify it
Change the language by swapping the two letters that identify the first language with the ones that identify the second one
Translate the word Feature into the target language
Click on [Save] and reload the page
FOCUS
The syntax highlighting the scenario keywords takes the language indicated in the language into account.
If the editor is not able to identify the language, it switches automatically into English.
An assistance tool is available to write the Gherkin test cases.
Prerequisite: Having created a Gherkin test case
Select the Gherkin test case
Click on [Help]
A second editor is displayed on the right of the first one and which includes a Gherkin glossary as well as a Gherkin script with comments