Cycle includes the ability to save Connections and Credentials for your systems under test. Using named Connections and Credentials streamlines and simplifies declaring system access, makes Features look cleaner and promotes reusability of “set it and forget it” parameters.
Connections are the strings, IPs, URLs used to access specific systems/machines under test. Connections are stored in the .cycproj file as they tend to be global for the project. This allows the file to be stored in a repository or shared among all project team members. It is strongly recommended to commit this file to your repository or at least create a back up in the event any files become corrupted and to avoid having to reenter all of your saved connections.
Credentials are the logins and passwords for the Connections. Credentials are stored in the .cycuser file so that they are more securely stored at the local level for the specific user. It is strongly recommended to create a local back up in the event any files become corrupted and to avoid having to reenter all of your saved credentials. We do not recommend this file be stored in a repository due to user specific logins.
Connections and Credentials work in concert either through direct step access or through Scenario Outline declaration.
Direct Step access:
MOCA specific:
Then I connect to MOCA "<CONNECTION>" logged in as "<CREDENTIALS>"
All other databases:
Then I connect to database "<CONNECTION>" logged in as "<CREDENTIALS>"
Scenario Outline declaration:
Scenario Outline: SQL Test
SQL Examples:scripts\wh.sql connected to <DATABASE_CONNECTION> logged in as <DATABASE_CREDENTIALS>
Creating new Connection
1. Open Project Settings by selecting the Gear icon (highlighted) from the side panel.
2. In Project Settings select Connections
3. In Connections select the + (plus) button to add a connection
4. Enter a name for your Connection. This name will be used is Scenario Outline and Step Connections
5. Select the connection Type from the drop down. Currently the available types are shown below. Future updates will include more. Please use the Help Center to submit a Connection Type request if yours is unavailable.
6. Once you have the Type selected, the required Address entry field is enabled. Enter the address/url/string for your Connection and Save Connection
NOTE: When using direct database connections that may require a specific database name, such as DB2, Oracle, SQLServer, MySQL, H2, it is recommended to add the database name directly into the Connection.
Using SQLServer as an example the database specific connection string would be: HOST:PORT;DatabaseName=DATABASE
Example connection strings for the various databases can be found in the Cycle User Manual by clicking this link.
7. Highlighting an available connection and selecting the - (minus) button will remove the connection
Creating a new Credential
1. Open Project Settings by selecting the Gear icon (highlighted) from the side panel.
2. In Project Settings select Credentials
3. In Credentials select the + (plus) button to add a credential
4. Enter a name for your Credential. This name will be used is Scenario Outline and Step Connections
5. Enter Username, Password and Confirm Password (they must match). Then Save Credential.
6. Highlighting an available credential and selecting the - (minus) button will remove the credential
Related Articles
Can I use Cycle's Data Store reporting even if I don't have a database available?
Problem In-depth reporting and analysis of Cycle tests often requires the use of a database to log all of the details of your Cycle executions, but not all users have a readily available database to use for this. Solution Cycle comes pre-packaged ...
How to use a SQL query as a Scenario Outline data source
With the enhancements to Scenario Outlines, it is now possible to use multiple sources for test parameter data. Previously, parameters were set in the Feature in an Examples section specified and maintained by the user. The addition of Example Row, ...
How to use MOCA Examples as a Scenario Outline data source
With the enhancements to Scenario Outlines, it is now possible to use multiple sources for test parameter data. Previously, parameters were set in the Feature in an Examples section specified and maintained by the user. The addition of Example Row, ...
Can Cycle execute MOCA and Local Syntax?
Problem Cycle Features built to interact with and test the JDA WMS need to run queries, execute statements and perform validations directly against the database. Solution JDA WMS provides a framework to ease database interaction called MOCA. Cycle ...
Using Cycle's Data Extract Tool
The Data Extract tool allows you to easily create CSV files from an existing database. The Extract Data window can be accessed via the "Tools > Extract Data..." menu item in Cycle. It can also be accessed from the Inspector panel with the ...