unit testing and integration testing of XForms

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

unit testing and integration testing of XForms

ilangostl
Hi
I have a requirement to conduct unit testing and integration testing of my XForms. How can this done. What can be the approaches to this?

Any suggestions on this are welcome

thanks
ilango

On Mon, Sep 22, 2008 at 2:50 PM, Hank Ratzesberger <[hidden email]> wrote:

Hi Frank,

What instance do you want to replace?  You should specify that as a
submission attribute, instance="my-instance" (even if it is the same
as the ref="" instance)

--Hank

On Sep 22, 2008, at 3:21 AM, yf508 wrote:

Hi all,

I'm new to xforms, just tried a simple xform and want to submit the data to
a jsp file. But when I click "Save" button, nothing happened. Can you help?
Thanks in advance. The xform is shown as follows:

----------------------------------------------------------------------------
-----
<?xml version="1.0"?>
<html xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
         xmlns:xs="http://www.w3.org/2001/XMLSchema"
         xmlns:xhtml="http://www.w3.org/1999/xhtml"
         xmlns:ev="http://www.w3.org/2001/xml-events"
         xmlns:xf="http://www.w3.org/2002/xforms"
         xmlns:widget="http://orbeon.org/oxf/xml/widget"
         xmlns="http://www.w3.org/1999/xhtml">

       <head>
               <title>XForms inputs with labels</title>
               <xf:model>
                       <xf:instance xmlns="" id="test-instance">
                               <data>
                                       <PersonGivenName/>
                                       <PersonSurName/>
                               </data>
                       </xf:instance>
               
                       <xf:submission method="post" id="save-submission"
                               ref="instance('test-instance')"
                               action="writexml2.jsp"
                               replace="instance">
                       </xf:submission>                        
               </xf:model>
       </head>
       <body>
               <p>Enter your first name, and last name.</p>
               <xf:input ref="PersonGivenName" incremental="true">
                       <xf:label>Input First name:</xf:label>
                       <xf:hint>Also known as given name.</xf:hint>
               </xf:input>
               <br/>
               <xf:input ref="PersonSurName" incremental="true">
                       <xf:label>Input Last Name:</xf:label>
                       <xf:hint>Also known as sur name or family
name.</xf:hint>
               </xf:input>
               <br/>
               <br/> Output First Name: <b>
                       <xf:output ref="PersonGivenName"/>
               </b>
               <br/> Output Sur Name: <b>
                       <xf:output ref="PersonSurName"/>
               </b>
               <xf:submit submission="save-submission">
                       <xf:label>Save</xf:label>
               </xf:submit>
       </body>
</html>
----------------------------------------------------------------------------
-----

Regards,

Frank


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws

Hank Ratzesberger
NEES@UCSB
Institute for Crustal Studies,
University of California, Santa Barbara
805-893-8042







--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: unit testing and integration testing of XForms

richhl
On Tue, 23 Sep 2008 10:23:41 -0400
ilango <[hidden email]> wrote:

> Hi
> I have a requirement to conduct unit testing and integration testing of my
> XForms. How can this done. What can be the approaches to this?
>
> Any suggestions on this are welcome
>
> thanks
> ilango

good question! I'm very interested in any answer to this......

thx

rich


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: unit testing and integration testing of XForms

Florent Georges-3
"Richard C. Hidalgo Lorite" wrote:

> On Tue, 23 Sep 2008 10:23:41 -0400 ilango wrote:

> > I have a requirement to conduct unit testing and integration
> > testing of my XForms. How can this done. What can be the
> > approaches to this?

> good question! I'm very interested in any answer to this......

  So do I!  (I don't want to make noise on the list, but I think this
is a really, really important question and I don't know anything
obvious in Orbeon)

  Regards,

--drkm























     


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: unit testing and integration testing of XForms

Jurģis Lukss
Hi,

In our projects, for XPL pipelines we usually write separate unit tests as another XPL pipelines, that are run by a test script in test environment. But that's only for XPL actions and models and not as easy as it could be.
For XForms web interface testing we use Selenium - http://selenium.openqa.org/. That could be used as integration testing.

Jurgis

Florent Georges wrote:
"Richard C. Hidalgo Lorite" wrote:

  
On Tue, 23 Sep 2008 10:23:41 -0400 ilango wrote:
    

  
I have a requirement to conduct unit testing and integration
testing of my XForms. How can this done. What can be the
approaches to this?
      

  
good question! I'm very interested in any answer to this......
    

  So do I!  (I don't want to make noise on the list, but I think this
is a really, really important question and I don't know anything
obvious in Orbeon)

  Regards,

--drkm























      
  



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: unit testing and integration testing of XForms

Chris Bailey-2
In reply to this post by Florent Georges-3
You can use the Selenium IDE (http://selenium-ide.openqa.org/) to create
functional (end-user) tests.

Due to the heavy use of JS in the pages, I'm not sure if there is any
other framework that you can use for functional testing - however with
the noscript command you could maybe use another form of functional
framework (like zope.testbrowser which doesn't support javascript)

Not sure about unit tests. While you can write unit tests for the Orbeon
Forms code itself, it is very difficult to write any form of unit test
for developers using Xforms (as nearly every aspect of the Xforms
application will be relying on the Xforms engine - this means you end up
writing integration tests instead). If you wanted to test specific
javascript code in isolation, you can use a framework such as JsUnit
(http://www.jsunit.net/)

I've written several Selenium tests before for my xforms application,
however they do all tend to break whenever you upgrade orbeon forms
(mostly because the Selenium IDE tends to use xpath or ID's to identify
elements and any small change to the output of the html produced by
orbeon forms tends to quickly break these identifiers).

Hope this helps.

Chris.

Florent Georges wrote:

> "Richard C. Hidalgo Lorite" wrote:
>
>> On Tue, 23 Sep 2008 10:23:41 -0400 ilango wrote:
>
>>> I have a requirement to conduct unit testing and integration
>>> testing of my XForms. How can this done. What can be the
>>> approaches to this?
>
>> good question! I'm very interested in any answer to this......
>
>   So do I!  (I don't want to make noise on the list, but I think this
> is a really, really important question and I don't know anything
> obvious in Orbeon)
>
>   Regards,
>
> --drkm
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>      
>


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: unit testing and integration testing of XForms

Einar Moos
Yes, it does help me understand a question I had a while ago, thank you,

-- einar

On Tue, Sep 23, 2008 at 5:56 PM, Chris Bailey <[hidden email]> wrote:

> You can use the Selenium IDE (http://selenium-ide.openqa.org/) to create
> functional (end-user) tests.
>
> Due to the heavy use of JS in the pages, I'm not sure if there is any other
> framework that you can use for functional testing - however with the
> noscript command you could maybe use another form of functional framework
> (like zope.testbrowser which doesn't support javascript)
>
> Not sure about unit tests. While you can write unit tests for the Orbeon
> Forms code itself, it is very difficult to write any form of unit test for
> developers using Xforms (as nearly every aspect of the Xforms application
> will be relying on the Xforms engine - this means you end up writing
> integration tests instead). If you wanted to test specific javascript code
> in isolation, you can use a framework such as JsUnit
> (http://www.jsunit.net/)
>
> I've written several Selenium tests before for my xforms application,
> however they do all tend to break whenever you upgrade orbeon forms (mostly
> because the Selenium IDE tends to use xpath or ID's to identify elements and
> any small change to the output of the html produced by orbeon forms tends to
> quickly break these identifiers).
>
> Hope this helps.
>
> Chris.
>
> Florent Georges wrote:
>>
>> "Richard C. Hidalgo Lorite" wrote:
>>
>>> On Tue, 23 Sep 2008 10:23:41 -0400 ilango wrote:
>>
>>>> I have a requirement to conduct unit testing and integration
>>>> testing of my XForms. How can this done. What can be the
>>>> approaches to this?
>>
>>> good question! I'm very interested in any answer to this......
>>
>>  So do I!  (I don't want to make noise on the list, but I think this
>> is a really, really important question and I don't know anything
>> obvious in Orbeon)
>>
>>  Regards,
>>
>> --drkm
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing
> list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>
>


--
-- Einar Moos
-- parisiana.com

Tel: 0676660080


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: unit testing and integration testing of XForms

ilangostl
In reply to this post by richhl
Thanks to everybody for their kind replies.

On Tue, Sep 23, 2008 at 10:42 AM, Richard C. Hidalgo Lorite <[hidden email]> wrote:
On Tue, 23 Sep 2008 10:23:41 -0400
ilango <[hidden email]> wrote:

> Hi
> I have a requirement to conduct unit testing and integration testing of my
> XForms. How can this done. What can be the approaches to this?
>
> Any suggestions on this are welcome
>
> thanks
> ilango

good question! I'm very interested in any answer to this......

thx

rich


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws