You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Dennis Lundberg <de...@apache.org> on 2006/05/17 23:09:04 UTC

How to write a test case for the maven-site-plugin?

Hello developers

I'm trying to figure out how to write a test case for the Maven 2 
site-plugin. But I can't seem to figure out how the existing tests work.

Under src/test there is a "projects" folder which contain a bunch of 
folders, one for each test. Every one of those contains what seems to be 
bogus java and TestCase classes. But there is also a pom.xml and various 
apt, xdoc and site.xml files.

I want to showcase a shortcoming in the generated html site. Is it 
enough to create a new test folder and include files that can be used to 
renders the site, to show how it shouldn't look? Or is there some way to 
actually unit test that?

Thanks for your time.

-- 
Dennis Lundberg

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: How to write a test case for the maven-site-plugin?

Posted by Vincent Siveton <vi...@gmail.com>.
Hi Dennis,

Each project [1] is a standalone test project. You should call: mvn
site for each of them. Their pom.xml contain an issue id or a
description.

You could create another test project to showcase a bug.

FYI, the next way to test plugins should be to use the
maven-plugin-testing-harness [2].

Cheers,

Vincent

[1] http://svn.apache.org/viewvc/maven/plugins/trunk/maven-site-plugin/src/test/projects/
[2] http://svn.apache.org/viewvc/maven/shared/trunk/maven-plugin-testing-harness/
2006/5/17, Dennis Lundberg <de...@apache.org>:
> Hello developers
>
> I'm trying to figure out how to write a test case for the Maven 2
> site-plugin. But I can't seem to figure out how the existing tests work.
>
> Under src/test there is a "projects" folder which contain a bunch of
> folders, one for each test. Every one of those contains what seems to be
> bogus java and TestCase classes. But there is also a pom.xml and various
> apt, xdoc and site.xml files.
>
> I want to showcase a shortcoming in the generated html site. Is it
> enough to create a new test folder and include files that can be used to
> renders the site, to show how it shouldn't look? Or is there some way to
> actually unit test that?
>
> Thanks for your time.
>
> --
> Dennis Lundberg
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org