Re: links between Junit tests and source code!!
Adam Sroka <[email protected]>
| Newsgroups | gmane.comp.programming.refactoring |
|---|---|
| Message-ID | <[email protected]> |
You can read the unit test, and it should tell you. If you have an IDE or a smart editor you should be able to link from the class/method names in the test back to the SUT. If you wanted a report that says, "This test exercises this part of the system..." you could create such a thing. I am not aware of any tool that does precisely this. Right now you can get a JUnit report that says what tests passed or failed and what messages were produced when they failed. You can also get a coverage report if you run Cobertura ( http://cobertura.sourceforge.net/sample/) which annotates the class to say what parts are covered by tests (But it doesn't tell you which test tests what.) On Thu, Nov 26, 2009 at 3:13 AM, ABDULLAH KASSEF <[email protected]>wrote: > > > I mean that how I can create automated traceability links between junit > tests and code, in other words, how I can know that UT1 tests Class1 and > Class2.(not necessary by naming convention) > > --- On Wed, 11/25/09, Kaleb Pederson <[email protected]<kaleb.pederson%40gmail.com>> > wrote: > > From: Kaleb Pederson <[email protected]<kaleb.pederson%40gmail.com> > > > Subject: Re: [refactoring] links between Junit tests and source code!! > To: [email protected] <refactoring%40yahoogroups.com> > Date: Wednesday, November 25, 2009, 10:48 AM > > > > > On Wed, Nov 25, 2009 at 10:39 AM, ABDULLAH KASSEF > <abboud2000_99@ yahoo.com> wrote: > > How I can create a links between Junit tests and its related tested > code?? > > What do you mean "links?" > > Eclipse allows you to specify in the new test class wizard that the > test is for such-and-such class. In a way, this links the test class > to a "normal" class. I'm not sure how Eclipse would handle things if > I created two different projects -- one for the test code and one for > the regular code. > > -- > Kaleb Pederson > > Blog - http://kalebpederso n.com > > Twitter - http://twitter. com/kalebpederso n > > [Non-text portions of this message have been removed] > > > [Non-text portions of this message have been removed] ------------------------------------ Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/refactoring/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/refactoring/join (Yahoo! ID required) <*> To change settings via email: [email protected] [email protected] <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/