IntelliJ Idea with Bitbucket Configuration

     By the end of this article, you will be able to create a Bitbucket repository and Integrate it with IntelliJ IDE. We’ll see the first time set up process and latter processes. So let’s dive into it.

What is a Repository?

In software development, a repository is a central file storage location. It is used by version control systems to store multiple versions of files. This may include multiple source code files, as well as other resources used by the program. Branches are used to store new versions of the program.

What is GIT?

Git is a free and open-source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. I have created a git repository and explained step by step in detail in my last post, you can check it out here — link

What is Bitbucket?

Bitbucket belongs to “Code Collaboration and Version Control” category, while Git can be primarily classified under “Version Control System”.

Bitbucket is a Git repository management solution designed for professional teams. It gives you a central place to manage git repositories, collaborate on your source code, and guide you through the development flow. It provides awesome features that include: Access control to restrict access to your source code.

Is Bitbucket free?

Yes! Bitbucket is free for individuals and small teams with up to 5 users, with unlimited public and private repositories. You also get 1 GB file storage for LFS and 50 build minutes to get started with Pipelines. You share build minutes and storage with all users in your workspace.

How to create a Bitbucket Repository?

Create a bitbucket repo. Go to https://bitbucket.org/ and create a repository by clicking on + symbol in the left pane of the Bitbucket home page.


Select the Repository under CREATE options.



Fill out the below details like Workspace, Project name, Repository Name, Access level, Description, Language, and then click on Create Repository.



You have created a bitbucket repository. Now copy the git clone URL and start putting your local code inside our new repository.


Here I’m assuming that you have your local code which you want to push on bitbucket so that others can also contribute to that code. I have written an article, where I have created the Rest assured framework in Eclipse from scratch and pushed it to GIT. You can copy that same framework if you don’t have a local code handy.

Here is that article: rest-assured-framework-from-scratch-including-git-repository-integration-for-continous-integration

Here is the repository: https://github.com/yourname/rest_AssuredFramework

In this article, I’m gonna be using IntelliJ for IDE. IntelliJ IDEA is a cross-platform IDE that provides consistent experience on the Windows, macOS, and Linux operating systems. IntelliJ IDEA is available in the following editions: Community Edition is free and open-source, licensed under Apache 2.0.

Eclipse falls short in providing good assistance for code completion despite supporting many plugins. The default code compilation in IntelliJ is much faster and better, especially if you’re a newbie programmer — IntelliJ can help you improve your code.

Open IntelliJ and import your local project from File->Open.

Once you have imported the project in local IDE, let’s enable version control Integration so that we will be able to Push and Pull changes seamlessly in that project.

Go to VCS -> Enable Version Control Integration


Select Git and click OK.


What is API Documentation and how to setup in Swagger - an open source tool to automate the API document

We’re in the multi-platform economy, and APIs are the glue of the digital landscape. Any product can become a platform by providing methods for users to add services and functionalities on top of it. 

Catering to the developer is tricky. They’re analytical, precise, and are trying to solve important problems with your API. They want to understand how to use your API effectively, which is where API documentation comes into the picture. 

We will explore what it means to document your API, and why it’s important to have good API documentation.       

API documentation is a technical content deliverable, containing instructions about how to effectively use and integrate with an API. It’s a concise reference manual containing all the information required to work with the API, with details about the functions, classes, return types, arguments and more, supported by tutorials and examples.

Your API is a means to an end for the technical user, and they want to integrate as quickly as possible to move forward in their software development, meaning they should immediately understand the value and usage of your API.

1. Improved User Adoption

2. Increased Awareness

3. Saves Support Time and Costs

4. Easier Maintenance

Using Inspector, developers can easily call any API end-point, and see if the response is what was expected.

 Inspector’s simple UI is built to allow developers to test as quickly as possible without any learning curve or process change.

Swagger Tool – Automate the API document

Developers are constantly required to double check always

- If their APIs and end points work as intended during the development process itself. 

- They require a simple way to validate their work without breaking their existing development processes and frameworks

 Swagger Tools have helped automate the documentation process, which makes it easier for you, or your team, to maintain and update your documentation.

Why Swagger Tool ?

- This tool is a free, cloud based API testing and documentation generation tool.

- Swagger Inspector allows you to take any API and generate OpenAPI documentation automatically

- Swagger UI allows anyone — be it your development team or your end consumers — to visualize and interact with the API’s resources without having any of the implementation logic in place

- It’s automatically generated with the visual documentation making it easy for back end implementation and client side consumption.


How to Install Swagger Locally?

In this section, you will learn how to install Swagger Editor and Swagger UI in your operating system step by step.

Step 1: Download and Install NodeJs

Swagger Editor and Swagger are coded in Javascript language, therefore, to build and run it you have to use NodeJs. Go to the NodeJs official site and download the LTS (Stable) version according to your operating system. Install it in your operating system.

Step 2: Download the Swagger Editor and UI

You can directly install the Swagger using the npm command but after installing it requires some other commands that you don’t remember. Therefore the best way is to install it using the source code. Go to the official Swagger GitHub page. There you will find the swagger-UI and swagger-editor links. Click on them and download the latest releases.

Swagger tool - API document
Official github Swagger 


Swagger Github Clone

TestNG Top 10 Interview Questions and Answers

TestNG Top 10 Interview Questions with Answers


 1. What is the sequence of execution of the annotations in TestNG?

Ans : annotations in order from

Before Suite method

Before Test method

Before Class method

Before Method

After Method

After Class method

After Test method

2. Can you arrange the below <testng.xml> tags from parent to child?

<test>

<suite>

<class>

<methods>

<classes>

Ans : Correct order

<suite>

<test>

<classes>

<class>

<methods>


3. How to run test cases in parallel using TestNG?

Ans : parallel = tests/methods/classes


4. In TestNG I have some test’s Test1-Test2-Test3-Test4- Test5. I want to run my execution order is Test5-Test1-Test3-Test2-Test4. How do you set the execution order?

Ans : By priority

@Test (priority=1) in Test5 

@Test (priority=2) in Test1 and continues...


5. If a test method failed, then its dependent method will

Ans : Never execute