Re: Regarding junit test
this should a properties file, which is available in your test classpath. your can retrieve it in your testcase, like: File testFile = new File(target/test-classes/test.properties); Note that all files under src/test/resources will be moved to target/test-classes/ when you run mvn test On Sat, Mar 7, 2009 at 7:22 AM, nani2ratna nani2ra...@gmail.com wrote: Hi, Thanks for your reply. Now i understood that these tests run every time when ever we run the mvn test. There is a file called test.properties in the folder src/test/resources. Can you tell me how can we use that. Thanks and Regards Ratna VanIngen, Erik (ESTG) wrote: Maven follows the convention over configuration principal. This means that by convention, all your tests within {your project}/src/test/java will be run automatically. Another convention is that Maven follows always this lifecycle: http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.htm l Running the tests is part of the Maven lifecycle. Surefire is the xml representation of the report of the build you run by Maven. You can find this xml in the {your project}//target/surefire-reports This xml can be used to make nice reports of the build. -Original Message- From: nani2ratna [mailto:nani2ra...@gmail.com] Sent: Friday, March 06, 2009 8:36 AM To: users@maven.apache.org Subject: Regarding junit test Hi, How does maven calls junit test cases when we run command mvn test. and what is the surefire, how it runs, can any body send me the link of this documentation Thanks and regards ratna -- View this message in context: http://www.nabble.com/Regarding-junit-test-tp22367494p22367494.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- View this message in context: http://www.nabble.com/Regarding-junit-test-tp22367494p22382323.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- - juven
Re: Regarding junit test
2009/3/7 Juven Xu ju...@sonatype.com this should a properties file, which is available in your test classpath. your can retrieve it in your testcase, like: File testFile = new File(target/test-classes/test.properties); n access it as a resource from the classpath Note that all files under src/test/resources will be moved to target/test-classes/ when you run mvn test - Show quoted text - On Sat, Mar 7, 2009 at 7:22 AM, nani2ratna nani2ra...@gmail.com wrote: Hi, Thanks for your reply. Now i understood that these tests run every time when ever we run the mvn test. There is a file called test.properties in the folder src/test/resources. Can you tell me how can we use that. Thanks and Regards Ratna VanIngen, Erik (ESTG) wrote: Maven follows the convention over configuration principal. This means that by convention, all your tests within {your project}/src/test/java will be run automatically. Another convention is that Maven follows always this lifecycle: http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.htm l Running the tests is part of the Maven lifecycle. Surefire is the xml representation of the report of the build you run by Maven. You can find this xml in the {your project}//target/surefire-reports This xml can be used to make nice reports of the build. -Original Message- From: nani2ratna [mailto:nani2ra...@gmail.com] Sent: Friday, March 06, 2009 8:36 AM To: users@maven.apache.org Subject: Regarding junit test Hi, How does maven calls junit test cases when we run command mvn test. and what is the surefire, how it runs, can any body send me the link of this documentation Thanks and regards ratna -- View this message in context: http://www.nabble.com/Regarding-junit-test-tp22367494p22367494.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- View this message in context: http://www.nabble.com/Regarding-junit-test-tp22367494p22382323.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- - juven
Re: Regarding junit test
http://maven.apache.org/plugins/maven-surefire-plugin/ On Fri, Mar 6, 2009 at 3:36 PM, nani2ratna nani2ra...@gmail.com wrote: Hi, How does maven calls junit test cases when we run command mvn test. and what is the surefire, how it runs, can any body send me the link of this documentation Thanks and regards ratna -- View this message in context: http://www.nabble.com/Regarding-junit-test-tp22367494p22367494.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- - juven
RE: Regarding junit test
Maven follows the convention over configuration principal. This means that by convention, all your tests within {your project}/src/test/java will be run automatically. Another convention is that Maven follows always this lifecycle: http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.htm l Running the tests is part of the Maven lifecycle. Surefire is the xml representation of the report of the build you run by Maven. You can find this xml in the {your project}//target/surefire-reports This xml can be used to make nice reports of the build. -Original Message- From: nani2ratna [mailto:nani2ra...@gmail.com] Sent: Friday, March 06, 2009 8:36 AM To: users@maven.apache.org Subject: Regarding junit test Hi, How does maven calls junit test cases when we run command mvn test. and what is the surefire, how it runs, can any body send me the link of this documentation Thanks and regards ratna -- View this message in context: http://www.nabble.com/Regarding-junit-test-tp22367494p22367494.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
RE: Regarding junit test
Hi, Thanks for your reply. Now i understood that these tests run every time when ever we run the mvn test. There is a file called test.properties in the folder src/test/resources. Can you tell me how can we use that. Thanks and Regards Ratna VanIngen, Erik (ESTG) wrote: Maven follows the convention over configuration principal. This means that by convention, all your tests within {your project}/src/test/java will be run automatically. Another convention is that Maven follows always this lifecycle: http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.htm l Running the tests is part of the Maven lifecycle. Surefire is the xml representation of the report of the build you run by Maven. You can find this xml in the {your project}//target/surefire-reports This xml can be used to make nice reports of the build. -Original Message- From: nani2ratna [mailto:nani2ra...@gmail.com] Sent: Friday, March 06, 2009 8:36 AM To: users@maven.apache.org Subject: Regarding junit test Hi, How does maven calls junit test cases when we run command mvn test. and what is the surefire, how it runs, can any body send me the link of this documentation Thanks and regards ratna -- View this message in context: http://www.nabble.com/Regarding-junit-test-tp22367494p22367494.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- View this message in context: http://www.nabble.com/Regarding-junit-test-tp22367494p22382323.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Regarding junit test
Hi, How does maven calls junit test cases when we run command mvn test. and what is the surefire, how it runs, can any body send me the link of this documentation Thanks and regards ratna -- View this message in context: http://www.nabble.com/Regarding-junit-test-tp22367494p22367494.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Problem Regarding junit test classes load , taking wrong classpath
Hi , I have some junit testcase but i guess maven is considering the wrong class path for file and is trying to load classes with name *test.java.x.y.z *However* *my classes are in package *x.y.z **hence I am getting java.lang.ClassNotFoundException*java.lang.ClassNotFoundException: * * Can anybody please help . -- Successful people make more mistakes because they do more Thanks Saurabh Agarwal
Re: Problem Regarding junit test classes load , taking wrong classpath
Please provide more details about how your project is laid out etc. By default, Maven expects that your Java files go in src/main/java and the Java test files are in src/test/java. If you have configured things differently in the pom.xml, then this may not be accurate. What classes exactly are causing the CNFE? Are they classes from your project, or from a dependency, or what? Wayne On 5/29/08, Saurabh Agarwal [EMAIL PROTECTED] wrote: Hi , I have some junit testcase but i guess maven is considering the wrong class path for file and is trying to load classes with name *test.java.x.y.z *However* *my classes are in package *x.y.z **hence I am getting java.lang.ClassNotFoundException*java.lang.ClassNotFoundException: * * Can anybody please help . -- Successful people make more mistakes because they do more Thanks Saurabh Agarwal - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]