GitHub Integration Manual V5.4.1

  • 1. Overview, Installation, and Configuration

    • 1.1. GitHub Server Configuration

    • 1.2. GitHub Initialization

      • Scenario 1:

      • Scenario 2:

  • 2. Git Operations

    • 1.1. Git Status

    • 1.2. Commit

    • 1.3. Push

    • 1.4. Pull

    • 1.5. Fetch

    • 1.6. Merge

    • 1.7. Copy

    • 1.8. Clone

    • 1.9. Delete

    • 1.10. History

1. Overview, Installation, and Configuration

ZebraTester's “Git Integration” allows you to use Git, a popular open-sourced distributed version control system. The GitHub icon is present in the Project Navigator Window and has been supported since ZebraTester version 5.4-E.

1.1. GitHub Server Configuration

There are several ways to clone repositories available but ZebraTester GitHub-integration supports HTTPS and SSH-based connection, and both public and private repositories can be configured to be used with the GitHub integration.

For HTTPS connections, you need an HTTPS clone URL with a username and password. For GitHub specifically, it's very easy to acquire the clone URL.

Under the green Code button on the GitHub repository main page, press the copy icon in the Clone tool to copy that URL.

Copy the URL by clicking the button on the right side of the Url, and then fill out the Git integration form accordingly.

Clone URL Dialog

Screenshot

HTTP Connection Details need what URL you copied from the dialog plus the username and password you want to use.

For SSH, which is a secure protocol, you need to clone the SSH URL in a similar way, but you must generate an SSH key pair. You can use any existing one if you already have, but GitHub does not allow using any SSH key twice.

To generate an SSH key and add it to your account, we recommend following the manual provided by GitHub at Connecting to GitHub with SSH

Place these values in your Apica Git Integration - Git Server Configuration

  • Upon completion, press the Apply Configuration Button >>> Continue, and the settings will be saved and you will be forwarded to Step two of the configuration.

1.2. GitHub Initialization

There are two scenarios when starting GitHub integration:

Scenario 1:

Having fresh ZebraTester installation, nothing important in My Tests Folder, and you’re not required to save any data from My Tests Folder.

Scenario 2:

The My Tests folder that you have is established with prior work saved in it and it’s important to save that data.

When you are in the GitHub Integration window for the first time, you will be asked if you are planning to save the existing data. Please check the option Save Existing Work. this will save the existing Data as a local Branch, that you can later push to the GitHub Server.

If you need to rename the Backup Branch you can give it any name of your choice. And then Click Apply Configuration >>> Continue.

If you chose to save the existing data you will get this as a branch in the next window, otherwise, you need to clone the remote branch to start working,

2. Git Operations

If you don't understand what Git is and the fundamentals of how it works, see their online documentation for basic knowledge, quick references, and cheat sheets.

Operation

Screenshot

In the middle of the window, there are buttons to perform Git related Operations

1.1. Git Status

This button is equivalent to Git command git status and if there will be any files changed since the last commit will be displayed on the left side of the window. Else it will write “nothing to commit, working directory clean”.

If there are changed files, you can add them by choosing a few of them or All Files.

After Adding the selected file, the file will become Staged and will be part of your next commit.

1.2. Commit

After the files are staged, the next step will be to commit them. After pressing the Commit Button, you will be asked to provide Commit Message.

A commit message will be added to the commit. It’s OK to leave the box empty, and in this case, the default msg will be added as a commit-msg, which includes the current time and the branch name.

e.g.

„commit msg @ 12_36_53... in refs/heads/my-saved-work-10_23_2015 “.

1.3. Push

The next step will be to push the commits to the Git Server. Simply clicking the Push Local Commits Button will push the commits to Server, and if the local branch has no HEAD on the server, a new branch will be created.

The log screen will display the progress of every operation.

1.4. Pull

A git pull is what you would do to bring a local branch up-to-date with its remote version and automatically merges the commits without letting you review them first. If you don’t closely manage your branches, you may run into frequent conflicts.

1.5. Fetch

Fetch gathers any commits from the target branch, that do not exist in your current branch and stores them in your local repository. However, it does not merge them with your current branch. This is particularly useful if you need to keep your repository up to date, but are working on something that might break if you update your files. To integrate the commits into your master branch, you use merge.

1.6. Merge

After you have finished implementing a new feature on a branch, you want to bring that new feature into the main branch, so that everyone can use it. This is achieved by merging the branch. Upon clicking Merge Button you will be asked to choose the branch to merge and the branch to which it will be merged.

A conflict might arise after the merge, and the file that has conflict will be shown in the list of changed files

And when you open that file using editor, you will see the conflict.

The solution is to change the file as you actually want it to be, Add to staged, and commit.

1.7. Copy

If you need an exact copy of the branch you are working on, then use this option, it will ask for the name of the new Branch.

If the parent branch has remote Tracking on the server, the child branch will also take it, and both will point to the same HEAD branch.

1.8. Clone

Before you can start working locally on a remote branch, you need to have its copy as a local branch, After pressing this button you will be provided with the list of all remote branches, you can choose, and give it some name, or if you already have a copy, and wants to have a new copy with a different name, you are allowed to give any name.

1.9. Delete

This will delete the current branch. You have to type the branch name, and for that, you need to have at least one more branch.

1.10. History

This Utility's function is to display the commit history of the current branch.

Was this helpful?