Reputation: 5633
First, I'm working as a Java programmer, and my first taks is to test the DAO and Services layers for a module from a project, but I didn't receive so many details about this thing.
Any info for doing this? I know i need to use mock testing.
P.S. This is my first job and I have 2 weeks as a worker :D, so I know very little about testing.
Upvotes: 0
Views: 248
Reputation: 528
Take a look at this link, I only glossed over it, but it looks like it covers much of the basics. There are many ways to test and there is no good way to answer this question without more detail. In general, it is good to test the DAO layer without actually going to the database... this article should get you started. You might also search google with keywords like java mock test or java test ioc -- IOC is inversion of control which is useful for this sort of thing b/c it allows the container to decide what implementation to use, which allow you to do things like replace database calls with simple value returns. Take a look at this link for more info on IOC. Hope that helps.
Upvotes: 1