tag:blogger.com,1999:blog-8068072736664339605.post5016827697272441506..comments2022-04-02T21:18:46.015-05:00Comments on Software Maven: Running tests from a Maven test-jar in your buildAnonymoushttp://www.blogger.com/profile/04826831792509834425noreply@blogger.comBlogger6125tag:blogger.com,1999:blog-8068072736664339605.post-24710960023111502212012-01-17T15:15:23.424-06:002012-01-17T15:15:23.424-06:00Hi Mike.
I'll see if I can dig up the code b...Hi Mike. <br /><br />I'll see if I can dig up the code but it's doubtful since I've let this blog turn into a swampland. This worked with Maven 2.0.6 if I remember. Things may have changed. <br /><br />If test classes are in the folder you've extracted the test-jar into and you've told surefire to execute them it should be doing it. If you could post your error I'd take a peek at it.Anonymoushttps://www.blogger.com/profile/04826831792509834425noreply@blogger.comtag:blogger.com,1999:blog-8068072736664339605.post-8930201379049249232012-01-17T14:53:10.928-06:002012-01-17T14:53:10.928-06:00I think is spot on. I have one situation where th...I think is spot on. I have one situation where the tests are configurable with XML, so I want the generic "skeleton" to be in one place, and then use it in other projects with a config file.Mikehttps://www.blogger.com/profile/14822193873789816549noreply@blogger.comtag:blogger.com,1999:blog-8068072736664339605.post-71282340290150187192012-01-17T14:51:52.796-06:002012-01-17T14:51:52.796-06:00I was not able to get this to work. I got it to e...I was not able to get this to work. I got it to extract the tests to folder in target/additionaltests, but I was not able to get the tests to run. It seems like Maven can't find them even though I did add the folder with the .class files to the classpath. I'm not sure if I did something wrong, and the link to the example is broken. could you post an updated link?Mikehttps://www.blogger.com/profile/14822193873789816549noreply@blogger.comtag:blogger.com,1999:blog-8068072736664339605.post-63472921814668852282011-06-18T13:49:37.142-05:002011-06-18T13:49:37.142-05:00This solution will not work, if the test.jar is no...This solution will not work, if the test.jar is not installed. Try to run maven with goal "test" from the top project and you will see that the unpack plugin will fail. (Sorry, i can not speak english)Torsten Liermannhttps://www.blogger.com/profile/13948768529052011338noreply@blogger.comtag:blogger.com,1999:blog-8068072736664339605.post-51329787151379327732010-11-09T13:26:17.762-06:002010-11-09T13:26:17.762-06:00if you have generic integration tests that you wan...if you have generic integration tests that you want to be able to execute across many projects, then it makes sense to package them into a single jar, instead of maintaining those exact same tests in multiple locations (all of the projects' test directories)Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8068072736664339605.post-63096206060388648442010-06-08T10:35:44.964-05:002010-06-08T10:35:44.964-05:00To my mind, there is a pretty good reason to execu...To my mind, there is a pretty good reason to execute tests contained in a test jar. It seems natural to write unit tests corresponding to a pure interface api in the test dir of this api. API Implementors should then execute unit tests contained in the test-jar to ensure that the original contracts are fullfiled.Anonymousnoreply@blogger.com