7.11.2012

Executing JUnit Runners Outside Of JUnit

I received a comment on one of my previous posts asking how to run a test class using SpringJUnit4ClassRunner from normal application code (i.e. within a main method). I'll admit, I didn't know how to do this, but my interest was piqued, and so I ran off to an existing test class I had laying around. Within a few minutes, I had a working prototype. Here it is: