Make Cycle Features easier for others to understand.

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 Steps.

Feature File Header

Every Feature File should start with the Cycle version number included as a comment

  • Cycle version number
  • Application version number
  • Purpose of the Feature File
  • Names of Scenarios or Feature Files that will be imported
  • Names of any resources that will be needed to execute the Feature File
  • Assumptions and usage instructions

Example

# Cycle Version 1.7.0.12
# WMS Version: 2009_1
# Desc: The Feature File is to wave an order via wave operations GUI screen
# Import Feature/Scenarios:
#     JDA_WM_Utilities.feature
#     Wave_Ops.feature
# Resources:
#     Gui_Login-Login.png
#     Wave_Operations-Wave_Operations_Title.png

Within-Scenario comments

Comments can also be added for the sake of clarity before a Step, set of Steps, or Scenario. This is particularly helpful to add descriptive information related to loops, conditionals, and breaks.

    • Related Articles

    • How to make better Cycle tests with Backgrounds and After Scenarios.

      Problem Cycle Features can often require set-ups before a system is in the correct state to begin the test or cleanup after having run to return everything to a clean state. Solution Cycle includes the ability to use two special types of Scenarios ...
    • 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 ...
    • How to make better xpaths for web tests.

      Problem My web-based steps in Cycle are not finding the elements I want them to, or finding the wrong elements and giving me false-positives. Solution When possible, it is best to define elements to interact with on a web page by a static value that ...
    • How to create methods in Groovy and call from Cycle

      Cycle includes a step to execute Groovy scripts.  I execute Groovy script "<GROOVY_SCRIPT_FILE>" Groovy scripts can be constructed to perform multiple functions in a single file by creating user defined methods.  Cycle variables can be used to ...
    • Can I use Cycle to run MSQL scripts?

      Problem More complex scripts can be long and hard to read or understand for less technical users. Breaking the overall flow and SOP use case of a Cycle Feature. Solution Short MOCA commands and local syntax statements can be built in-line with the “I ...