Working with Suites Under Source Control Management

When you place Eggplant Functional suites in a source control management (SCM) repository, multiple users can access and work on the same suites. As you work on scripts and other resources, you can manage updates and changes in the repository through the Suite window interface, pushing your changes and pulling changes made by others.

Before you can work with suites under SCM, you need to check out the repository where you have your Eggplant Functional suites. After the repository is checked out, you can open and work from the local copy of any suite you have stored there.

Note: Each user needs to check out the repository on their local machine. When you work with source control, you will always work on a local copy, then commit or push changes to the repository.

You can store multiple Eggplant Functional suites in a single repository, or you can connect to multiple repositories for different suites. To open a suite from the local copy, go to File > Open Suite on the Eggplant Functional main menu, then navigate to the suite you want to open.

The Suite Window with SCM

When you are working in Eggplant Functional with suites and suite resources that are under SCM, you have all the same functionality as with suites that are not under SCM. However, you will see some differences in the Suite window interface that show you are connected to the repository.

The status bar at the bottom of the Suite window displays messages that indicate if there are changes in your local copy.

The status for individual files or resources is shown in the sidebar to the right of the file name. Statuses are shown for Scripts, Images, Tables, Features, and Resources.

Note: The Results and Schedules sections do not display inline statuses. Eggplant Functional does not track SCM changes for Results.

The statuses you can encounter include:

  • M: The local file has been modified and has uncommitted changes. Typically, you need to save the file before this status appears.
  • ?: The file has been added locally, but is not recognized by source control until you commit/push it to the remote repository. This status corresponds to Untracked in the Commit dialog box.
    Note: If you rename an existing file, it receives this indicator.
  • A: The resource has been added to the local repository by means of an external tool, such as the command line or a repository browser, but has not been committed.
  • C: You might see this status after an SVN update or Git pull. This status indicates that your local file is in conflict with the version that you just got from the remote repository.
  • !: The file is missing (SVN only).

These status icons are visual cues to you as you work. They do not otherwise affect the file.

Saving Changes to the Repository

When you are ready to save the changes to the files you have been working on in your local copy back to the repository, you commit or push your changes from Eggplant Functional to the repository, depending on whether you're using Git or SVN.

Both methods bring up the Commit dialog box:

The Commit changes dialog box in Eggplant Functional

It's a best practice to add a Commit Message every time you commit or push changes to a repository. Information you add here can be helpful for tracking progress or for troubleshooting if errors make their way into the repository. Although you cannot view the commit message in Eggplant Functional, the information is saved as part of the file history in the repository.

Push Changes in Git

  • Go to File > Commit All to commit your changes to the local version of the repository. You can select the Push to origin/master checkbox in the Commit Changes window to push those changes to the remote repository, as well.
  • If you've already your committed changes locally, you can select File > Push to send those changes to the repository.

Commit Changes in SVN

  • Go to File > Commit All to commit your changes to the repository. SVN saves changes locally and also pushes those changes to the remote repository.
    Note: Be sure to save any outstanding changes before you select Commit All. This operation can commit only what is saved, so any unsaved changes will not be committed.

Updating and Reverting

In addition to committing changes, there are several other SCM tasks that you can select from either the main menu or the right-click menu on items in the sidebar.

Update

Updating refreshes your local copy of the repository with any recent changes in the repository. If another user commits changes to the repository, pull those changes into your local copy of the suite using Pull/Update.

  • To update all changes from the repository into your local copy, select File > Pull/Update.
  • To update an individual file, right-click the file in the Suite window sidebar, then select Update.

Your local copy is updated and replaced with a fresh copy from the repository.

Discard Changes

You can Discard All Changes to revert changes back to the last version that has been committed to the repository.

  • To revert all local changes in the suite back to the repository version, select File > Discard All Changes from the main menu.
  • To revert changes to an individual file, right-click the file in the Suite window sidebar, then select Discard Changes.

You can use this option even if you have saved the file or files in your local working copy. Discard All Changes pulls the last committed version from the repository and replaces your local copy.

Other SCM Actions

Certain SCM actions can't be managed using Eggplant Functional.

Branching

In Eggplant Functional 18.2 and later, you cannot create or switch branches from the Eggplant Functional UI. If you need to work with branches, you'll need to use a separate program. You also can manage branches from the command line.

Conflict Resolution

Because SCM allows multiple users to work on the same suites, you might encounter conflicts when you attempt to Commit or Pull/Update files. Conflicts can occur when you and another user make changes to the same file.

When a conflict occurs, the operation you are attempting aborts, and you will see a status message that explains the condition. Resolve the conflict outside of Eggplant Functional by using a tool such as the command line or a repository file browser.

 

This topic was last updated on August 19, 2021, at 03:30:51 PM.

Eggplant icon Eggplantsoftware.com | Documentation Home | User Forums | Support | Copyright © 2022 Eggplant