How to write Integration Test with the usage of Bearer Token in Spring Boot (throw An Authentication

I have a problem to write Integration Test in my Spring Boot example. In my UserController class, every methods are defined with PreAuthorize with roles. Here is the link : https://stackoverflow.com/questions/76172699/how-to-write-integration-test-with-the-usage-of-bearer-token-in-spring-boot-thr
Stack Overflow
How to write Integration Test with the usage of Bearer Token in Spr...
I have a problem to write Integration Test in my Spring Boot example. In my UserController class, every methods are defined with @PreAuthorize with roles. Here is my code snippets shown below Here ...
3 Replies
JavaBot
JavaBot2y ago
This post has been reserved for your question.
Hey @direct_x_34! Please use /close or the Close Post button above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
Crain
Crain2y ago
Are you using Mock MVC? And do you need to go through your authentication path in the Test?
JavaBot
JavaBot2y ago
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived. If your question was not answered yet, feel free to re-open this post or create a new one.
Want results from more Discord servers?
Add your server