I'm working on a Spring Boot application that utilizes SAML for authentication with Single Sign-On (SSO) using Microsoft Entra ID. I'm looking to write integration tests for this application to ensure the proper functioning of SAML authentication.
I've already set up SAML configuration in my application, and authentication works correctly when tested manually. However, I'd like to automate these tests by writing integration tests.
I'm wondering how I could go about writing integration tests for this SAML functionality. Specifically, I'm interested in best practices for simulating SAML responses, managing user sessions, and verifying that SAML authentication works as expected in a testing environment. Any help or advice would be greatly appreciated. Thank you!