How to store Connections and Credentials in Cycle

How to store Connections and Credentials in Cycle

Cycle 2.5 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.

 mceclip2.png

 

2. In Project Settings select Connections

mceclip3.png

3. In Connections select the + (plus) button to add a connection

mceclip4.png

4. Enter a name for your Connection. This name will be used is Scenario Outline and Step Connections

 mceclip5.png

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.

mceclip6.png

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

mceclip7.png

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

7. Highlighting an available connection and selecting the - (minus) button will remove the connection

mceclip2.png

Creating a new Credential

1. Open Project Settings by selecting the Gear icon (highlighted) from the side panel.

 mceclip2.png

2. In Project Settings select Credentials

mceclip0.png

3. In Credentials select the + (plus) button to add a credential

mceclip1.png

4. Enter a name for your Credential. This name will be used is Scenario Outline and Step Connections

mceclip3.png

5. Enter Username, Password and Confirm Password (they must match). Then Save Credential.

mceclip4.png

6. Highlighting an available credential and selecting the - (minus) button will remove the credential

mceclip5.png