You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Robby Pelssers <ro...@ciber.nl> on 2008/10/31 09:28:28 UTC

Testdriven development (XSLT) for cocoon applications

Hi all,

 

Since a few months we have taken over support  of  5 Cocoon applications
which are actually fully depending on XSLT-transformations.... The
sitemap is nicely setup.

 

One main pipeline is started and delegates it's work further to other
pipelines which in its turn delegate the work again and so on.  However,
I'm worried about the fact that for this application no unit-tests are
available.  Cocoon being a framework specialized in XML-publishing, I
was wondering if the community has experience (best practices) with
this.

 

I already looked for unittesting XSLT, but would like to know the
experience from this community.   One requirement might be the
possibility to write tests for xslt2.0.

 

Cheers,

Robby Pelssers

 

http://www.jenitennison.com/xslt/utilities/unit-testing/

 

http://juxy.tigris.org/

 

https://utf-x.dev.java.net/

 

http://www.idealliance.org/proceedings/xml05/ship/2/gcapaper.HTML

 

http://xsltunit.org/

 

 


Re: Testdriven development (XSLT) for cocoon applications

Posted by Vyacheslav Sedov <vy...@gmail.com>.
xslt-based web-crawler with schematron rules can help if pages not
xhtml at all then you should did it as second stage of TQM
implementation  - standard conforming

On 11/16/08, Robby Pelssers <ro...@ciber.nl> wrote:
> Hi Alexander,
>
> I did not manage to use it already... but I did take a look at it and it
> looks promising.  I just finished writing a presentation on Apache
> Cocoon being used at one of our clients.  And I will also write an
> article (Apache Cocoon related)...  After that I will dive into CoUnit
> and present my findings.
>
> Thx for your mail,
> Robby
>
> -----Original Message-----
> From: Alexander Daniel [mailto:alexander.daniel@gmx.at]
> Sent: zaterdag 15 november 2008 23:18
> To: users@cocoon.apache.org
> Subject: Re: Testdriven development (XSLT) for cocoon applications
>
> On 31.10.2008, at 09:28, Robby Pelssers wrote:
>> I already looked for unittesting XSLT, but would like to know the
>> experience from this community.   One requirement might be the
>> possibility to write tests for xslt2.0.
>
> I am using UTF-X for XSLT unit testing. You can use the XSLT processor
> of your choice with UTF-X and therefore it also works with XSLT 2.0.
>
> You can also use UTF-X for integration tests. The version in the trunk
> supports a href attributes on utfx:source and utfx:expected, e.g.
>
> 	<utfx:assert-equal>
>              <utfx:source href="http://localhost:8888/welcome"/>
>              <utfx:expected>
> 		<welcome>welcome message</welcome>
>              </utfx:expected>
>          </utfx:assert-equal>
>
>
> In the last two weeks I started to use the Cocoon integration test
> framework [1] which uses Maven plugins and HtmlUnit to automate the
> tests. Examples can be found in the Cocoon webapp [2] [3]. It plays
> nicely with the RCL which gives you TDD for integration tests.
>
>
>> Thx for the info.  I will most definitely be spending time on Co-Unit
>> the next few weeks.  Sounds like the answer I was looking for.
>
> How is your experience with CoUnit so far?
>
> Alex
>
> [1] http://svn.apache.org/repos/asf/cocoon/trunk/tools/cocoon-it-fw/
> [2] http://svn.apache.org/repos/asf/cocoon/trunk/core/cocoon-webapp/
> [3]
> http://svn.apache.org/repos/asf/cocoon/trunk/core/cocoon-webapp/src/test
> /java/org/apache/cocoon/it/sitemap/RedirectTest.java
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


RE: Testdriven development (XSLT) for cocoon applications

Posted by Robby Pelssers <ro...@ciber.nl>.
Hi Alexander,

I did not manage to use it already... but I did take a look at it and it
looks promising.  I just finished writing a presentation on Apache
Cocoon being used at one of our clients.  And I will also write an
article (Apache Cocoon related)...  After that I will dive into CoUnit
and present my findings.

Thx for your mail,
Robby

-----Original Message-----
From: Alexander Daniel [mailto:alexander.daniel@gmx.at] 
Sent: zaterdag 15 november 2008 23:18
To: users@cocoon.apache.org
Subject: Re: Testdriven development (XSLT) for cocoon applications

On 31.10.2008, at 09:28, Robby Pelssers wrote:
> I already looked for unittesting XSLT, but would like to know the  
> experience from this community.   One requirement might be the  
> possibility to write tests for xslt2.0.

I am using UTF-X for XSLT unit testing. You can use the XSLT processor  
of your choice with UTF-X and therefore it also works with XSLT 2.0.

You can also use UTF-X for integration tests. The version in the trunk  
supports a href attributes on utfx:source and utfx:expected, e.g.

	<utfx:assert-equal>
             <utfx:source href="http://localhost:8888/welcome"/>
             <utfx:expected>
		<welcome>welcome message</welcome>
             </utfx:expected>
         </utfx:assert-equal>


In the last two weeks I started to use the Cocoon integration test  
framework [1] which uses Maven plugins and HtmlUnit to automate the  
tests. Examples can be found in the Cocoon webapp [2] [3]. It plays  
nicely with the RCL which gives you TDD for integration tests.


> Thx for the info.  I will most definitely be spending time on Co-Unit
> the next few weeks.  Sounds like the answer I was looking for.

How is your experience with CoUnit so far?

Alex

[1] http://svn.apache.org/repos/asf/cocoon/trunk/tools/cocoon-it-fw/
[2] http://svn.apache.org/repos/asf/cocoon/trunk/core/cocoon-webapp/
[3]
http://svn.apache.org/repos/asf/cocoon/trunk/core/cocoon-webapp/src/test
/java/org/apache/cocoon/it/sitemap/RedirectTest.java

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Testdriven development (XSLT) for cocoon applications

Posted by Alexander Daniel <al...@gmx.at>.
On 31.10.2008, at 09:28, Robby Pelssers wrote:
> I already looked for unittesting XSLT, but would like to know the  
> experience from this community.   One requirement might be the  
> possibility to write tests for xslt2.0.

I am using UTF-X for XSLT unit testing. You can use the XSLT processor  
of your choice with UTF-X and therefore it also works with XSLT 2.0.

You can also use UTF-X for integration tests. The version in the trunk  
supports a href attributes on utfx:source and utfx:expected, e.g.

	<utfx:assert-equal>
             <utfx:source href="http://localhost:8888/welcome"/>
             <utfx:expected>
		<welcome>welcome message</welcome>
             </utfx:expected>
         </utfx:assert-equal>


In the last two weeks I started to use the Cocoon integration test  
framework [1] which uses Maven plugins and HtmlUnit to automate the  
tests. Examples can be found in the Cocoon webapp [2] [3]. It plays  
nicely with the RCL which gives you TDD for integration tests.


> Thx for the info.  I will most definitely be spending time on Co-Unit
> the next few weeks.  Sounds like the answer I was looking for.

How is your experience with CoUnit so far?

Alex

[1] http://svn.apache.org/repos/asf/cocoon/trunk/tools/cocoon-it-fw/
[2] http://svn.apache.org/repos/asf/cocoon/trunk/core/cocoon-webapp/
[3] http://svn.apache.org/repos/asf/cocoon/trunk/core/cocoon-webapp/src/test/java/org/apache/cocoon/it/sitemap/RedirectTest.java

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Testdriven development (XSLT) for cocoon applications

Posted by Bertrand Delacretaz <bd...@apache.org>.
Hi,

On Fri, Oct 31, 2008 at 9:28 AM, Robby Pelssers <ro...@ciber.nl> wrote:
> ...I already looked for unittesting XSLT, but would like to know the experience
> from this community....

Nico Verwer did an interesting presentation on CoUnit a while ago, see [1].
-Bertrand

[1] http://cocoondev.org/main/117-cd/104-cd.html and
http://code.google.com/p/counit/ - not sure which one is more current.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


RE: Re: Testdriven development (XSLT) for cocoon applications

Posted by Robby Pelssers <ro...@ciber.nl>.
Bertrand en Hubert...

Thx for the info.  I will most definitely be spending time on Co-Unit
the next few weeks.  Sounds like the answer I was looking for.

Cheers,
Robby

-----Original Message-----
From: news [mailto:news@ger.gmane.org] On Behalf Of Hubert Klein Ikkink
Sent: zondag 2 november 2008 13:21
To: users@cocoon.apache.org
Subject: Re: Testdriven development (XSLT) for cocoon applications

Hi,

I've used CoUnit on a previous project and 
it was easy to setup a test for XSLT 2.0 with Saxon. 
CoUnit still requires the Cocoon app to be running, 
because it uses HTTP to invoke the tests. 
So for real unit testing I might not be the best solution, 
but for integration testing it is very useful.

Kind regards and good luck.

Hubert Klein Ikkink


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Testdriven development (XSLT) for cocoon applications

Posted by Hubert Klein Ikkink <mr...@planet.nl>.
Hi,

I've used CoUnit on a previous project and 
it was easy to setup a test for XSLT 2.0 with Saxon. 
CoUnit still requires the Cocoon app to be running, 
because it uses HTTP to invoke the tests. 
So for real unit testing I might not be the best solution, 
but for integration testing it is very useful.

Kind regards and good luck.

Hubert Klein Ikkink


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org