• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown
Bartenders:

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

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 51
5
Spring Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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