Hello,

First, XForms unit testing requires extra actions to interact with controls 
just as users would do: click somewhere, select an item in a drop-down list, 
press a key,…

Then, for checking the form rendering, accessing the DOM sounds the best 
approach. I have already tested this with Fleur as a substitute for XQIB 
because it allows, using the b:dom() function, to evaluate XPath expressions 
directly on the current page content.

Yet, it might be tricky to write XPath expressions dealing with extra HTML 
elements added for XForms controls and getting properties from an XForms 
control with XPath is to be specified too…

Implementing extra actions for assertions sounds great!

All this would be a wonderful task for the XForms Users Group, especially 
regarding to the new Test Suite to be written for XForms 2.0!

What do you think?

--Alain

De : Tim Thompson
Envoyé le :jeudi 20 juillet 2017 16:02
À : xsltforms-support@lists.sourceforge.net
Objet :[Xsltforms-support] XForms unit testing

Hello,
Michael's recent question spurred me to ask a lingering one that I have had: 
namely, has anyone developed an approach to unit testing XForms applications, 
specifically in XSLTForms?
I know of Eric van der Vlist's XForms Unit project (http://xformsunit.org/), 
which I believe uses the Orbeon Form Runner as its testing environment, but the 
project doesn't seem to be under active development.
I'm interested in finding a simple approach to testing in XSLTForms. Perhaps 
some custom actions could be defined to implement standard testing functions 
such as assert, assert-equals, etc.?
Best regards,
Tim



--
Tim A. Thompson
Discovery Metadata Librarian
Yale University Library

On Wed, Jul 19, 2017 at 9:21 AM, Alain Couthures 
<alain.couthu...@agencexml.com> wrote:
The path for itemset has to be written relative to the one of the select: in 
your test case, just add "../../" at the beginning if you want to keep it 
relative.
--Alain

De : C. M. Sperberg-McQueen
Envoyé : ‎18/‎07/‎2017 20:51
À : xsltforms-support@lists.sourceforge.net
Cc : C. M. Sperberg-McQueen
Objet : [Xsltforms-support] select1, itemset,value (what is this form doing 
wrong?)
Trying to implement a new functionality I thought would be simple,
I am running into unexpected difficulties with the xf:select widget.

I have put a sample form at

http://www.blackmesatech.com/2017/07/testcase/index.xml

Several problems are arising:

- First and foremost, the menu displayed by the following widget
appears to be empty of text, although xf:output statements inserted
for diagnostic purposes appear to show that the XPath expressions
used are correct.

    <xf:select ref="p[@id='select']/@items">
      <xf:itemset nodeset="list/item">
<xf:label ref="."/>
<xf:value ref="@id"/>
      </xf:itemset>
    </xf:select>

- Second, when I try to use xf:output in the xf:label element, 
I get an error; ditto when I try to use a constant but remove the @ref
binding attribute.  Are both the value and the label of an itemset
required to use @ref?

Anyone who can shed any light on this would receive a large shipment
of gratitude (and a beer if we’re ever in the same bar).

best,

Michael Sperberg-McQueen


********************************************
C. M. Sperberg-McQueen
Black Mesa Technologies LLC
cms...@blackmesatech.com
http://www.blackmesatech.com
********************************************


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Xsltforms-support mailing list
Xsltforms-support@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xsltforms-support

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Xsltforms-support mailing list
Xsltforms-support@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xsltforms-support


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Xsltforms-support mailing list
Xsltforms-support@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xsltforms-support

Reply via email to