• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Bear Bibeault
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • salvin francis
  • Stephan van Hulst
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Jj Roberts

Can we use embedded mongo DB for testing service class in spring boot ?

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to perform an integration test using embedded MongoDB. I used @DataMongoTest annotation for that. I can test the repository alone. But when autowire with service, test case execution throwing no bean dependency found.
 
Author
Posts: 24
5
Spring Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Nandakumar. Thanks for your question. I'm not sure what you're doing there, so can't really answer your question. Normally you can do integration tests with embedded mongo, but you might have some config problems in your code.
 
Nandakumar Kadavannoore
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks @Laurentiu Spilca. Correct, I faced config problem while integrating embedded MongoDB. Now I resolved that by removing @DataMongoTest annotation and by adding separate profile for test., So that  embedded MongoDB will setup for test profile. Thanks for reply.
 
reply
    Bookmark Topic Watch Topic
  • New Topic