Search the web
Sign In
New User? Sign Up
junit · JUnit, the Java unit testing framework written by Kent Beck and Erich Gamma.

Group Information

  • Members: 19232
  • Category: Java
  • Founded: Nov 6, 2000
  • Language: English
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Messages

  Messages Help
Advanced
Unit Testing with Spring   Message List  
Reply Message #23340 of 23813 |
I'm working with a client who're using Spring extensively. When I look at
their Unit Test code I realize that I'm looking at a heap
of integration tests and not real Unit Tests. In part it seems to come from
the autowiring of Spring. In addition I've been told that creating new
contexts on the fly in Spring can (in their case) really slow the running of
the unit tests.

I realize that we can bypass Spring completely but the point was made that
in that case we're testing without the Spring Security Context and other
rules, which means we're not really testing how the code behaves in real
life.

I'm wondering if any one has good writing on Unit Testing with Spring so I
can get my head wrapped around what it looks when its done well?

Cheers
Mark Levison

[image: Mark] <http://www.flickr.com/photos/36331075@N00/3833840021/>*Mark
Levison* | Agile Pain Relief Consulting <http://agilepainrelief.com/> |
Certified Scrum Trainer
Agile Editor @ InfoQ <http://www.infoq.com/about.jsp> |
Blog<http://www.notesfromatooluser.com/>|
Twitter <http://twitter.com/mlevison> | Office: (613) 862-2538
Recent Entries: Story Slicing How Small is Small
Enough<http://agilepainrelief.com/notesfromatooluser/2010/09/story-slicing-how-s\
mall-is-enough.html
>,
Why use an Agile
Coach<http://www.notesfromatooluser.com/2009/11/why-use-an-agile-coach.html>


[Non-text portions of this message have been removed]




Fri Mar 18, 2011 3:25 pm

marklevison
Offline Offline
Send Email Send Email

Message #23340 of 23813 |
Expand Messages Author Sort by Date

I'm working with a client who're using Spring extensively. When I look at their Unit Test code I realize that I'm looking at a heap of integration tests and...
Mark Levison
marklevison Offline Send Email
Mar 18, 2011
3:27 pm

Yes it's ironic that testing spring stuff is so painful given that testability is one of the selling points (but it seems that applies to the parts, not the...
Joakim Ohlrogge
j0hlrogge Offline Send Email
Mar 18, 2011
4:11 pm

Joakim - thanks for the reply you confirm what I was thinking. As long as they test within a single context its all good. Basically that means that Mocking...
Mark Levison
marklevison Offline Send Email
Mar 18, 2011
6:54 pm

In one project we were using lots of batches from oracle to MySQL. By the nature of batching there were some DB-specific SQL going on, especially when it comes...
Joakim Ohlrogge
j0hlrogge Offline Send Email
Mar 18, 2011
8:52 pm
Advanced

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help