Last Updated On

Spring Boot makes it easy to create stand-alone, production-grade Spring based Applications that you can “just run”. We take an opinionated view of the Spring platform and third-party libraries, so you can get started with minimum fuss. Most Spring Boot applications need minimal Spring configuration.
SpringBoot Testing with JUnit
SpringBoot with TestNG
| Chapter 1 Testing of SpringBoot Application with TestNG | |
| Chapter 2 Integration Testing of Springboot with Cucumber and TestNG |
SpringBoot with Gradle
| Chapter 1 Testing of Gradle SpringBoot Application with Serenity, Cucumber and JUnit4 | |
| Chapter 2 Testing of Gradle SpringBoot Application with Serenity and JUnit5 |
CI/CD
| Chapter 1 How to run SpringBoot tests with GitHub Actions | |
| Chapter 2 How to run SpringBoot project in GitLab CI/CD |
MCQ
| Chapter 1 SpringBoot – Multiple Choice Questions and Answers – MCQ1 – NEW |
| Chapter 2 SpringBoot – Multiple Choice Questions and Answers – MCQ2 – Coming Soon |
Excellent explaination.
LikeLike
I appreciate you found this helpful
LikeLike
Very detailed testing approach of spring boot
LikeLike
Hi Vibha,
Hope you are doing amazing. I actually have a query regarding Spring Boot and it had been bothering me for a while. I was trying to optimize the existing framework for automation and then came across your post of Microservices unit testing and Rest API testing integration testing using Spring Boot. Two Questions , Firstly, How is utilizing Spring Boot as an automation framework beneficial for me compared to using the standard Selenium,TestNG ,BDD model. Secondly, Can I use this framework for any type of project or can i use it for only those applications which are created with Spring Boot Java configuration. The reason i am asking these questions is to have clarity regarding the purpose of this framework implementation.
LikeLike
My personal opinion is I will not use SpringBoot Test framework for Web Application. Because even you want to use Spring Boot, we need Selenium or Cypress or any other tool along with SpringBoot for UI testing. You can integrate SpringBoot with Rest Assured for the API Testing. The framework shown in these tutorials are applicable for only REST API Testing.
LikeLike
Thanks for the swift response! Hmm,So you mean to say that Spring Framework will not provide any additional benefit when it comes to framework optimization unless integrated with Selenium for UI and Rest Assured for API.I just tried to develop this framework as I felt It might add to the portfolio of Tech Stack (might help in employability aspects) that I worked on. So,I guess I will pause this project as it might not add any extra value and I believe ( I hope you confirm this ) learning Selenium,Cucumber is sufficient.I just had one more query and it was regarding selenium grid with Docker.Just wanted to ask how is Selenium grid with docker different from Gitlab and can both be integrated.Thanks for Bearing my queries
LikeLike
Selenium Grid with docker and GitLab are 2 different things used for different purpose. Selenium Grid is used for mostly parallel testing and cross browser testing to reduce the execution time. GitLab is used for CI/CD. Yes you can integrate Selenium Grid with Gitlab.
LikeLike
Hi Vibha, Again,Thanks a ton for the clarification.I have tried to setup the Selenium grid using 1.docker-compose.yaml file which takes years to run and does n’t execute any cases. 2. Setup Selenium grid manually on 4444 by having a Hub and browser based nodes attached to the hub,here as well there seems to be browser start up failure while executing parallely. 3.Setup selenoid as it was touted to be a better alternative to the dockerized selenium grid as every session has it’s own container,however,I faced startup failures here as well none of the execution status was stable.So ,I decided to do move to GCP but there as well there was a billing issue so could not proceed further.Can you please provide a worthwhile solution to integrate seamless parallel execution with CI/CD just so the overall framework might attain completion as this seems to be an endless pursuit.
LikeLike
Hi, I have not created any tutorial on Selenium Grid integration with GitLab till now. But, you can refer to this for some ideas – https://gitlab.com/shameekagarwal/end-to-end-test-framework/-/blob/main/.gitlab-ci.yml.
LikeLike
Hey,Sorry for the delayed response.Will definitely have a look but looks like it might take ages for me materialize this. Also, thought of asking 1. if you’ve made and technical documentation on deploying selenium grid on Kubernetes and what could be the benefits compared to just using a dockerised selenium grid. 2.Is there a way to integrate Appium with gitlab and run with AWS device farms.Please do reply once you are free🙂
LikeLike
Hi, I have created a tutorial of running cross browser tests of Selenium Grid 4 in GitLab pipeline – https://qaautomation.expert/2023/08/21/run-cross-browser-tests-in-gitlab-ci-cd/. Hope it helps you.
LikeLike