Wednesday, February 20, 2019

How to upload Selenium project to GitHub?

GitHub is a distributed versioning system for the software development teams for managing their working copies.

GitHub is a central repository or Source Code Management, developers use this tool to pull the latest updates to their local machine or to push their latest changes/enhancements to it frequently.


Uploading Project to GitHub:

Step 1: Create a new repository in your GitHub account. Click on "New Repository".


Step 2: Enter "Repository name" and "Description", then click on "Create Repository" button.


Step 3: You should see "selenium-project" repository being created.


Step 4: Launch eclipse, and create a Selenium project using maven. If you need any help in creating selenium project please look at this blog post.

In this post we are going to use below Selenium project.


Step 5: EGit plugin should be installed in eclipse, if not installed Go to Help --> Eclipse marketplace, search for Egit and click on "Install".


As shown in the above image Egit plugin-should be installed.

Step 6: We have to open Git Repository perspective, Search for it in "Quick Access" and select "Git repositories".


Step 7: Git Repository perspective should be opened as shown below.


Step 8: Now we have to configure the GitHub repository in "Step 2" to eclipse for that, click on "clone a Git repository". Then we will get Clone Git Repository window.


Step 9: Copy the Git repository url..

Step 10: Enter copied url in the URL field, then host and Repository path get populated automatically.


Enter username and password, click "Next".

Step 11: Then it will display Local destination window, where your project will be stored. Click "Finish".


Step 12: We can see GitHub repository being configured in the local location in Git Repository perspective.


Till now we have integrated local git repository with GitHub repository only, we are yet to upload our project with GitHub.

Step 13: To upload the project to GitHub repository via local repository, Right click on the project --> Team --> Share Project. Then below window will be shown up.


Step 14: Select repository that we created in "Step 12" and click on "Finish".


Step 15: Our project will be added to the local Git repository under Working Tree folder.


But we can't see the project in the GitHub repository yet.

Step 16: Right click on the project --> Team --> Commit. Then Git Staging window will be opened.


step 17: In Git Staging, Unstaged Changes contains the latest updated file. Select all unstated files and drag them to Staged Changes as shown below


Step 18: Enter "Commit Message" and then click on "Commit and Push" button.


Step 19: Check whether correct remote repository selected or not. then click "Next".



Step 20: Click "Finish"


Step 21: Click "Close"


Step 22: Go to GitHub repository and refresh, then we should see the project in the repository as shown below.


This is how we can upload a Selenium project to GitHub. Thanks for reading, if you find this tutorial helpful, please share with your friends. Thanks!!

#HappyLearning #HappyTesting

2 comments:

  1. Good Post! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge as updated one, keep blogging.
    Selenium Training in Electronic City

    ReplyDelete

Java Program 5: How to reverse given string and each word of it?

Let us understand the problem with an example, suppose "Learn Core Java" is the given string then the expected output should be &...