Introduction to GitHub


Hello! My name is James Koch, Solutions Architect for Quilmont, an Automation firm based out of Myrtle Beach, South Carolina and Atlanta, Georgia. We have recently started using GitHub to manage our Mobile Application Development for Xcode and Android Studios, Continuous Integration processes using Jenkins, and Automated Testing practices using Appium and the Selenium Grid. I find GitHub to be an excellent tool to share and work on projects with your team or other stakeholders. With a familiarity to SVN I have drawn some comparisons but have explored limitations for both platforms. While SVN is more straight forward, GitHub’s plugin-ability makes it the top tool for team collaboration when it comes to managing a development project. In this tutorial I will demonstrate a few basic steps and rules to implement a GitHub strategy with your team. Through this approach we take test-driven development to the next level!

Prerequisites

Eclipse or whichever IDE you wish to use, and a GitHub Account.

Let’s Get Started….

Say you are creating a Maven Project with a Page Object Model structure used to test your application. You are in charge of pages 1-5 while Malcolm-from-the-cubical-down is responsible for pages 6-10, and it’s Debby’s job to run the suite for assurance. With GitHub, no problem!

GitHub

Begin by creating a new Repository in GitHub:

GitHub

Name it, and click create (no need to add anything else unless you wish to add something project specific.) Now we are ready to commit your project to the repo you created.

  • From Terminal, change the current working directory to your local project.
  • Initialize the local directory as a Git repository with the command:

git init

 This stages them for the first commit by adding the files in your new local repository:

git add .

  • Commit the files that you’ve staged in your local repository and pass it a string value as a comment:

git commit -m “First commit”

  • Back in GitHub copy the path to your repo, then in Terminal, add the URL for the remote repository where your local repository will be pushed.

2

git remote add origin https://github.com/*/*

git remote -v

  • Lastly, push the changes in your local repository to GitHub:

git push origin master

When you go back into Github you should be able to see the new commit and your files appear. Now you and Malcolm-from-the-cubical-down can work with this project dynamically and make changes in the same file thus being able to collaborate in the same project. Here’s how…

Eclipse

We are assuming you are holding the master copy of this file and managing it as an eclipse project. The first thing we must do if not already installed is make sure you have the EGit Plugin. If you do not, download it through the Eclipse Market Place.

3

After Eclipse restarts you are ready to import the project down from Github:

4

  • File-> Import-> Git->Projects From Git-> Next-> Clone URI
  • Paste the path to your repo as earlier
  • Handle any Authentications
  • Select the Branch
  • Follow the screen prompts to your configuration and press Finish!

Committing and Pushing Code to GitHub

GitHub gives you the ability to commit code to your local repo as well as Commit and Push to the server. This is very important to know when we are working with our team on code, as this is how we are going to make sure our project stays in-tact when we merge.

  • In the file in your already pulled down project, make an update.

5

  •  Right click your project-> Team-> Commit

6

  • Add a comment and select “Commit and Push” if you wish to Commit those changes to the GitHub Repo or just “Commit” to your local.

Work Flow

In order to not create conflict with your team, here are a few tips and scenarios to avoid running into issues merging your projects. I will be demonstrating two users working in the same repo; one on Mac, one on PC. In this scenario, you commit your code to the repo for Debby to run the suite of automated tests before communicating with Malcolm the changes you made to the one of the Java files in your project.

7

5 minutes later Malcolm is ready to commit hit changes but hits a non-fast-forward error because you have already committed your changes:

8

His first step is to do a local commit of his changes by going through the commit process but just selecting “Commit” not “Commit and Push.” This will commit his changes to his local repository.

9

10

Because he was second to commit his work, he must “Pull” your changes into his copy before he “Commits and Pushes” the new code to GitHub.

11

12

Now on the Repo both team member’s changes should be ready for Debby to “Pull” down the working project and execute her tests. But let’s see one more possible error in team collaboration. Say Debby “Pulls” the changes into her existing project that she’s been using as a playground or she tries to pull both developers changes but they have a merge conflict. Things have moved and when she goes to pull in any new changes she sees a merge error:

<<<<<<<HEAD:
This is JK’s Line
=======
This is MC’s Line
>>>>>>

13

Debby’s next step would be to manually adjust the merged changes and do a Team–> Add to Index

Now that the changes are made she must “Commit and Push” the updated merged changes to GitHub creating the updated master copy of their test suite.

Conclusion

GitHub is a very useful tool when it comes to code sharing and collaborating with teammates. My biggest advice is to communicate with stakeholders a solid workflow so everyone’s changes are easily combined with yours and others. GitHub makes a great one-stop-shop to which your code can be submitted. It eliminates the dangling preposition. Through GitHub’s plugin-ability we are able to work with our code and development practices in ways that were not always available. GitHub provides a professional repo to share your code with customers, and strives on security and ease of use. Again, communication is key when collaborating on projects in this fashion. These are three scenarios one might run into while setting GitHub up for the first time with your team. By following these steps and processes you and your team should be able to nail down the workflow that works best for you. Cheers, and Happy Collaborating!

Visit Quilmont Website

qm logo7_email

Quilmont was established in 2007 by our owner and CEO Patrick Quilter. Patrick has over 15 years of experience in software development life cycle & test automation architecture. Quilmont owns a patented product called Test Case Manager, an automation framework that allows firms to get more out of their scripting tools. Quilmont was founded in Washington D.C., being so, we are still connected with several prime government contractors in the area that reach out to us when they need help; we are currently registered in the SAM database. Our partnerships include Polarion, HP, and Keynote Studios. We provide organizations with a comprehensive testing practice by fully utilizing industry leading software testing tools.

Quilmont has had projects of all different kinds and scope; from working with startups, government contracts, and even large fortune 500 companies like Berkshire Hathaway/Geico. Unlike the other products and consulting services on the market, Quilmont provides its clients with the most cost effective and best personalized solution to fit its automation needs. We provide customer service and support, and offer training. At Quilmont it is our mission to form strategic relationships with other enthusiastic automated testing organizations. We utilize next generation technologies to virtually distribute our solutions globally while providing our workforce with opportunities to enhance their IT skills.

Visit Quilmont Website

javafx

Database Operations in JavaFX

By Onur Baskirt / Apr 1, 2016 / 56 Comments
Before started this section, please check the first article and learn How to Start JAVAFX! http://www.swtestacademy.com/getting-started-with-javafx/ At first, part of JavaFX tutorial series, we created a sample JavaFX project, designed the draft version of the UI and set up an...
rest assured

REST API Testing with Rest Assured

By Onur Baskirt / Mar 8, 2016 / 32 Comments
Outline In this post, I will explain what is API and API testing, what is the difference between SOAP and REST services, and how to test REST APIs with Rest Assured Library. What is API? API stands for Application Programming...
extentreports

How to Write Effective CSS Locators

By Onur Baskirt / Oct 1, 2017 / 0 Comments
Hi all, in this tutorial, I will describe you how to write effective CSS locators to interrogate web elements for your automation projects. As a rule of thumb, your interrogation strategy should be in below order: First try to use...
extentreports

Selenium-11: Execute JavaScript with JavascriptExecutor

By Onur Baskirt / Jan 27, 2016 / 15 Comments
Outline Sometimes we cannot handle some conditions or problems with Webdriver, web controls don't react well against selenium commands. In this kind of situations, we use Javascript. It is useful for custom synchronizations, hide or show the web elements, change...
javafx

Getting Started with JavaFX

By Onur Baskirt / Mar 25, 2016 / 0 Comments
When I started to work in my current position, one of my task is to do manual operations for campaign products  every week. After the second week, I thought that I have to automate this task using a GUI based...
extentreports

How to Write Smart XPath Locators

By Onur Baskirt / Sep 24, 2017 / 4 Comments
Hi all, in this tutorial, I will describe you how to write smart and non-brittle XPath locators. When we write our test scripts, we generally prefer to use id, name, class, etc. these kinds of locators. However, sometimes we could not...
extentreports

Selenium-1: Quick Start to Automation with Selenium WebDriver & JAVA & JUnit & Maven & IntelliJ

By Onur Baskirt / Sep 8, 2015 / 26 Comments
Outline Selenium Webdriver is the most popular open source web test automation framework across wide range of browsers and platforms. In this tutorial you will learn how to do web test automation with Selenium Webdriver and the related tools. Audience...
page object model

Page Object Model with C#

By Ege Aksoz / Jun 18, 2017 / 8 Comments
In the previous tutorial, we’ve taken the initial steps and entered the world of automated testing. We also wrote our first automated test. From this point on, since we are not just going to write one test, we need to...
extentreports

How to Select a Date From DatePicker Using Selenium

By Onur Baskirt / Aug 13, 2016 / 6 Comments
When you need to automate a airway, hotel, or similar websites you need to deal with Datepickers and some times it is a little bit cumbersome to select a specific date on the Datepicker or calendar.  In this post, I...
extentreports

Selenium Webdriver Performance testing with Jmeter and Selenium Grid

By Ozgur Kaya / Aug 9, 2016 / 2 Comments
In this post, we will complete Selenium Webdriver Performance testing scenario using Jmeter and Selenium Grid. 1- Install Java 7 or later If necessary https://java.com/tr/download/ 2- Download latest Jmeter version 3.0 or higher. http://jmeter.apache.org/download_jmeter.cgi 3- Download Jmeter PluginsManager JAR file and...
By | 2017-01-13T21:33:42+00:00 June 19th, 2016|Git|0 Comments

About the Author:

James Koch
Hello! My name is James Koch, CTFL, Solutions Architect for Quilmont, an advanced automation firm based out of Myrtle Beach, South Carolina. I currently work remotely, in charge of our Atlanta territory as our company is growing all across the south east U.S. I am a certified software tester through the International Software Test Qualification Board(ISTQB) and am an active member of the ASTQB. I started as a software test engineer with Sirius XM Satellite Radio and worked on everything from their mobile application, to regression testing on CE and OEM devices. That is where my passion for testing software and QA began. With a high focus in Automated Testing, Total Quality Management, and Software Quality Assurance, I strive to understand, diagnose, and correct behaviors by formulating solutions in software and other day-to-day business operations to reach optimal performance. I apply my operations background to software development and work well with Agile and DevOps practices. I understand philosophies for automating testing by being well versed in the most popular frameworks, the latest being Appium. I apply automation frameworks to develop, execute, organize, and maintain test plans to better assist clients getting through testing in an effective efficient manner. I've developed Web Services for clients to easily interact with their in-house systems. I possess the ability to coordinate multi-organizational structures such as OEM Applications Engineering, Contract Manufacturing and Test Validation Sites. I posses analytic skills in planning, process, and creating efficiency. I have knowledge of Hardware circuitry design in the areas of power supplies and microprocessors. My hobbies include lacrosse, fishing, hiking and camping with my dog and wonderful fiancé. My relationship with Software Test Academy was reciprocated in February 2016 and it is a pleasure to contribute. For Quilmont and myself, it is our mission to form strategic relationships with other enthusiastic automated testing organizations. We utilize next generation technologies to virtually distribute our solutions globally while providing our workforce with opportunities to enhance their IT skills.

Leave A Comment