Bitbucket Tutorial for Automation Engineers/Developers – Part II

Welcome to part II of this Bitbucket Tutorial series on using BitBucket. This post continues where the first post ended and looks at Bitbucket pull requests.

Create Bitbucket pull request, Add reviewer to review code and merge pull request:

select pull requests option from left side panel to create pull request. PR is used to merge code from source branch (develop/feature) to destination branch (master).

Bitbucket

Click on Create pull request button.

Fill the details like Title, Description, Attachments and Reviewers.  You can add multiple reviewers to review your code and if there are any comments provided by reviewer then make sure that you resolve those comments on priority basis so that code merge will not get delayed.

Created pull request has details like Reviewers, Builds, etc.

Reviewer need to click on created pull request in order to approve and merge.

Resolve merge conflicts in pull request:

Now days developers get scared once they see the merge conflicts but resolving merge conflicts is not the big task if you follow proper steps.

When 2 developers working on the project and 1st developer pushed his code to develop branch. Pull request is created between develop and master branch and code is merged.

Now 2nd Developer pushed his code to his Develop branch without taking pull either from master or 1st developers develop branch. Pull request is created between 2nd develop branch and master branch but error message get displayed saying “This pull request can’t be merged. You will need to resolve merge conflicts to be able to merge.”

We can resolve this merge conflict using IDE (Integrated Development Environment) or GIT commands.

Let’s see how to resolve by using IDE. Merge conflict resolution using IDE is easier as compared to GIT commands because its all about UI and no commands to remember.

Step 1: Goto IntelliJ Menu VCS >> Git >> Resolve Conflicts

Step 2: Files Merged with Conflicts popup will be displayed where affected files are present.

Step 3: Once User select affected file then popup will be displayed where user need to accept left and right based on the their and yours code strategy.

 

 

Step 4: Repeat the above for next conflicting commit.

 

Read Part III here.

Check out all the software testing webinars and eBooks here on EuroSTARHuddle.com

Feature Image Copyright Bitbucket

About the Author

Yogesh Kolhe

Hi there, My name is Yogesh Kolhe, I am subject matter expert in Automation Testing as well as DevOps. Being Technical Leader/ Senior SQE I did ⦁ Initial framework setup and delivery first tests ⦁ On boarded new SQE’s and provided support to deliver test automation ⦁ Provided coaching/training to SQE’s and provided support to squad members ⦁ Played Individual role whenever required ⦁ Motivated team members to start API automation, UI Automation, Mobile app automation. ⦁ Implemented CI/CD pipeline in project to cater automated regression and sanity pack. I have written blogs on Automation testing and other technologies and busy with research on artificial intelligence and machine learning for Automation Testing.
Find out more about @yoyoyogesh

Related Content