top of page

Welcome
to NumpyNinja Blogs

NumpyNinja: Blogs. Demystifying Tech,

One Blog at a Time.
Millions of views. 

Automating Cucumber Test Projects with GitHub and Jenkins via IntelliJ

In the previous part, we saw how to create a Cucumber project from scratch. In this post, we’ll see how to integrate that existing project with GitHub.

Before starting the integration, make sure Jenkins, Maven, and Git are already installed on your local system. You should also have a GitHub account.

Step 1:

If you selected "Create Git Repository" when creating the project in IntelliJ, you can share the project directly to GitHub by following these steps:

  1. Go to the top menu bar in IntelliJ where you see options like File, Edit, View, etc.

  2. Look for the Git tab in this menu.

  3. Click on Git → then go to GitHub → and select Share Project on GitHub.

    Please refer the following screenshots.

ree

Step 2:

Once we click on "Share Project on GitHub" in the screen above, another window will appear, as shown in the following screenshot. In this step, we need to provide a repository name (by default, it will be the same as the project name). The description field is optional. The remote name will be set to origin by default. Then click "Add Account" and log in via GitHub.

ree

Step 3:

After clicking that, your default browser will open, as shown in the screenshot below. There, click on "Authorize in GitHub". You will then need to enter your GitHub credentials to continue. Once authenticated, you will see a success message on the JetBrains website. Please refer the following screenshots.

ree
ree

Success Message
Success Message

Step 4:

After closing the browser, you will get the following window (your Github account added). Then click share button.

ree

Step 5:

Then you will see a pop-up window where you can select the files you want to share in the GitHub repository. Write a commit message, then click Add. You have now successfully created a repository on GitHub from IntelliJ and pushed your project code to the repository’s master branch.

ree

Step 6:

Now you can go to your GitHub and verify in the GitHub in the repository that our project is successfully pushed into repository.

ree

Step 7:

After committing the initial commit, if you add or modify files, you’ll need to commit and push the changes to the master branch again. To do this, follow the steps below:

  • Go to the master branch from the top panel, then click Commit.

  • You will see the changed files listed. Select all the files, write a commit message, and click Commit and Push.

  • If there are any warnings in your files, a confirmation dialog will appear asking if you want to Commit and Push Anyway — click that, then click Push.

  • Your changes will be pushed to your GitHub repository.

Now Its' time to Build our project from GitHub to Jenkins

Step 8: Follow this link to install Jenkins

  1. Launch your browser and open your Jenkins (http://localhost:8080/login?from=%2F)

  2. Login with your credentials

  3. Install Plugins

    For installing plugins, we can directly download from the Available section of the Manage Plugin.

    Navigate to the left side menu > choose Manage Jenkins > click Manage Plugins.

  4. Now under the Available plugins section, enter the name of the plugin in the search bar and click on ‘Install without Restart’. Here I have installed all Maven, Git, Cucumber, Allure related plugins.

ree

  1. Then we have to set up our Global Tool Configuration. For that go to Manage Jenkins > Under the System Configuration, click Tools

ree

  1. Then scroll down a bit Click the JDK installations dropdown. Give name for JDK and and JDK path.

ree

  1. Go to Maven> Add Maven > provide Name and path and click Save.

ree
  1. Go to Allure Command line check install automatically and click save.

ree
  1. Now Dashboard--> Manage Jenkins , If you scroll down a bit you can see Security Section, from there click Credentials.

ree
  1. Under credentials click global link (Domain)

ree
  1. Click "+ Add Credentials".

    ree
  2. Select Kind as Username with password, scope leave that as it is. For the username--> Give your Github Username. For the password, We need to Generate the Personal Access Token from GitHub and have to give the PAT here as a Password. Then Click Create. After then your GitHub will connect with the Jenkins.


Now we are going to see how to run test cases using Jenkins.

  1. Go to Dashboard > click New item

  2. Enter the name of the item and select maven project and click ok. Here I have mentioned as “Cucumber_Ds_Algo_”


ree
  1. Then we will directed to configure page in General type the description or you can skip. Then Go to Source Code management or Scroll down little.


ree
  1. In the Source Code Management, Select Git and give your Git Repository URL and select the credentials which we created earlier.

ree
  1. In Triggers, check the first one, In Environment check the First one, In post steps click "Run regardless of build result"

ree
ree
ree
  1. In post Build Actions section, Click Add post-build action and select Allure report.

ree
  1. Check the allure-results path in the IntelliJ Project folder and give according to that, For me its under the project so I gave allure-results alone. and click save.

ree
  1. Now to go to Dashboard click on the project and select Build now. or Click the project, There will be a Build Now in the Left column. Click that. Once we click on the Build Now the build will start and we can able to see the Console Output.


ree
  1. In the status window we can see the Allure history trend and Allure report link.

ree
  1. Click on the Allure report to see complete report.


Allure Report
Allure Report

That's all !!!


We have successfully Build the test cases through Jenkins and generated Allure report.

I hope this guide gave you a clear path to automate your Cucumber test projects seamlessly with GitHub and Jenkins right from IntelliJ.

Thanks for reading!

Happy testing — and may your builds always be green! 🚀

+1 (302) 200-8320

NumPy_Ninja_Logo (1).png

Numpy Ninja Inc. 8 The Grn Ste A Dover, DE 19901

© Copyright 2025 by Numpy Ninja Inc.

  • Twitter
  • LinkedIn
bottom of page