Thanks a lot Andy ! I will go thro the documentation. And yes, I got the error which I was getting previously. By mistake,in Project.xml <unit test> tag did not have a package name which was giving me error. I corrected that...
Thanks a lot again ! -----Original Message----- From: Andy Jefferson [mailto:[EMAIL PROTECTED] Sent: Friday, 26 September 2003 4:35 PM To: Maven Users List Subject: Re: Regarding Unit testing in Maven On Friday 26 Sep 2003 07:24, Joshi, Yogesh (Cognizant) wrote: > I am using Maven for the first time for 'Unit Testing'. I am not very clear > about how it exactly works. As far as I know, Maven has a in built plugin > for JUnit and we need to provide the <unitTestSourceDirectory> in > Project.xml. However if for,e.g., SampleTest.java is expected to test > SampleMaven.java, then how the individual methods are going to be tested ? > How are we going to pass the parameters ? shall we call every method > individually ? I'd suggest that you familiarise yourself with JUnit. ... www.junit.org. What you basically need is to define your test files to contain methods called testXYZ(). The name XYZ has does not need to have any relation to the class(es) you are testing ... it is a name only. Any method called that will be called by JUnit. You can include methods setUp() and tearDown() in the Test class as well to set up things that you need in your testXYZ() methods. It is customary to terminate each testXYZ method with an assert(status) to return to Junit what the result of the test is. -- Andy --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. Any unauthorised review, use, disclosure, dissemination, forwarding, printing or copying of this email or any action taken in reliance on this e-mail is strictly prohibited and may be unlawful. Visit us at http://www.cognizant.com
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
