How to use Comments in Cycle

How to use Comments in Cycle

Including comments within a Feature File can greatly increase the readability of the Feature. Comments can be used to convey many different types of information, including the purpose of a Feature or Scenario, explanations of why a script was written a certain way, or special instructions for the users.

For information on how to format a comment at the beginning of a Feature view this article:

Make Cycle Features easier for others to understand

Any line in a script that begins with the hash character is considered a comment. All text on a line that begins with a # is ignored when the Feature or Scenario is executed. The figure below shows a comment positioned at the start of a Feature.

CommentExample.png

 How to Comment

Commenting can be done by starting or adding the hash symbol to the beginning of a line.

 Cycle includes a Toggle Comment button in the Edit menu, which is also bound to the Ctrl+/ keyboard shortcut, this adds the hash symbol in front of the line that is currently selected.  This can be used for single line commenting or for multi-line commenting.

 To comment out multiple lines, highlight the desired lines and click the Toggle Comment button, or use the Ctrl+/ keyboard shortcut.  If multiple commented out lines are highlighted, the shortcut will remove the hash symbol and uncomment those lines.

togglecomment.png

    • Related Articles

    • How To Access the Cycle E-Learning Platform (Cycle University)

      The Cycle User Portal was retired with the release of Cycle 2.9.2. The former Cycle E-Learning platform was retired along with the Cycle User Portal. Training materials can be found in the new Cycle University platform. Cycle Labs - Cycle University ...
    • Educate your team: Training your Cycle Users

      Cycle training is an important first step to get your Cycle users up to speed on how to create your Cycle tests. Access to Cycle University is available through the Cycle Labs website. Cycle Labs - Cycle University Please use your Cycle Cloud ...
    • Getting Started with Cycle 2

      Log In to Cycle Cloud In order to get started with Cycle 2, you will need to sign up for a Cycle Cloud account, and then download Cycle 2 from Cycle Cloud. The sign up process requires you to verify your email address. Please note, the email address ...
    • How to use Cycle with a Shared Repository.

      Problem With multiple developers and testers working on the same Cycle project, it's a struggle to keep everyone up to date with the latest Features and Settings. Solution Using a shared repository such as Git or Subversion when developing features ...
    • Make Cycle Features easier for others to understand.

      Problem Even well written Cycle Features can sometimes seem unclear to a new user. Solution By including comments at the beginning of your Feature and within Scenarios, you can lay out all pertinent details for a reader without needing to use Cycle ...