Squish tip of the week: Code Folding – Expand and Collapse Code in Squish

Squish tip of the week: Code Folding – Expand and Collapse Code in Squish

What is Code Folding

Code folding is the ability to expand and collapse certain code in programming constructs. This improves readability when a test script contains numerous functions or other blocks of code and comments that you want to hide when you are not currently working with that part of the file.

How to Expand and Collapse Code in Squish

You can collapse and expand code fragments in Squish so that you can view different sections of your test script without having to use the scrollbar.

To expand or collapse code, click the plus or minus sign that appears to the left in the test script editor.

To expand or collapse all of the code, place your cursor anywhere within the test script, right-click, and then select “Expand All” or “Collapse All“.

 
Code Folding - Expand and Collapse Code in Squish
Example of expanding and collapsing Code in Squish (click to enlarge)

View Folded Code in a Tooltip

You can view code that is currently folded by positioning the mouse pointer over the plus sign or functions name. The code appears in a tooltip as you can see below.

 
Squish GUI Tester - View Folded Code in a Tooltip
Tooltip example to view folded code (click to enlarge)

Related