I see you opened https://github.com/robwhitby/xray/issues/42 — that's probably a better way to go, so I'll ask a few questions there.
-- Mike > On 20 Feb 2015, at 07:43 , Hasegawa, Margarete <[email protected]> > wrote: > > Hello, > > I've recently started working with the Xray test framework and when using > xray:assert-exists() to test the return HTML value of a function, I'm given a > 'not a node' error that stops the test suite from running. I'm thinking > there's something going on with the xray:assert-response() function, but I'm > not sure why that would be the case. Is there a solution for this? > > Thanks, > Maggie > > Here's the error message: > > Not a node > > XDMP-NOTANODE: (err:XPTY0019) > $test/descendant-or-self::node()/descendant-or-self::assert[@result = > "failed"] -- "FAILED: Expected div with @id = 'facets'" is not a node > > > <error:error xsi:schemaLocation="http://marklogic.com/xdmp/error error.xsd" > xmlns="http://github.com/robwhitby/xray" > xmlns:error="http://marklogic.com/xdmp/error" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> > > <error:code>XDMP-NOTANODE</error:code> > > <error:name>err:XPTY0019</error:name> > > <error:xquery-version>1.0-ml</error:xquery-version> > > <error:message>Not a node</error:message> > > <error:format-string>XDMP-NOTANODE: (err:XPTY0019) > $test/descendant-or-self::node()/descendant-or-self::assert[@result = > "failed"] -- "FAILED: Expected div with @id = 'facets'" is not a > node</error:format-string> > > <error:retryable>false</error:retryable> > > > <error:expr>$test/descendant-or-self::node()/descendant-or-self::assert[@result > = "failed"]</error:expr> > > <error:data> > > <error:datum>"FAILED: Expected div with @id = 'facets'"</error:datum> > > </error:data> > > <error:stack> > > <error:frame> > > <error:uri>/xray/src/xray.xqy</error:uri> > > <error:line>67</error:line> > > <error:column>15</error:column> > > <error:operation>run-test(should-get-results-searching-all-text#0, > "/xray/test/results-tests.xqy")</error:operation> > > <error:variables> > > <error:variable> > > <error:name>fn</error:name> > > <error:value>should-get-results-searching-all-text#0</error:value> > > </error:variable> > > <error:variable> > > <error:name>path</error:name> > > <error:value>"/xray/test/results-tests.xqy"</error:value> > > </error:variable> > > <error:variable> > > <error:name>ignore</error:name> > > <error:value>fn:false()</error:value> > > </error:variable> > > <error:variable> > > <error:name>map</error:name> > > <error:value>map:map(<map:map xmlns:xs="http://www.w3.org/2001/XMLSchema" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xmlns:map="http://marklogic.com/xdmp/map"><map:entry > key="results"><map:value > xsi:type="xs:string">FAILED:...</map:map>)</error:value> > > </error:variable> > > <error:variable> > > <error:name>test</error:name> > > <error:value>"FAILED: Expected div with @id = 'facets'"</error:value> > > </error:variable> > > <error:variable> > > <error:name>time</error:name> > > <error:value>xs:dayTimeDuration("PT1.435S")</error:value> > > </error:variable> > > </error:variables> > > <error:xquery-version>1.0-ml</error:xquery-version> > > </error:frame> > > <error:frame> > > <error:uri>/xray/src/xray.xqy</error:uri> > > <error:line>171</error:line> > > <error:column>4</error:column> > > <error:operation>xray:run-module-tests("/xray/test/results-tests.xqy", > "should-get-results-searching-all-text")</error:operation> > > <error:variables> > > <error:variable> > > <error:name>path</error:name> > > <error:value>"/xray/test/results-tests.xqy"</error:value> > > </error:variable> > > <error:variable> > > <error:name>test-pattern</error:name> > > <error:value>"should-get-results-searching-all-text"</error:value> > > </error:variable> > > <error:variable> > > <error:name>fns</error:name> > > <error:value>should-get-results-searching-all-text#0</error:value> > > </error:variable> > > </error:variables> > > <error:xquery-version>1.0-ml</error:xquery-version> > > </error:frame> > > <error:frame> > > <error:line>7</error:line> > > <error:column>6</error:column> > > <error:operation>xdmp:eval("&#10; xquery version > &quot;1.0-ml&quot;;&#10; import m...", > (fn:QName("http://github.com/robwhitby/xray", "path"), > "/xray/test/results-tests.xqy", fn:QName("http://github.com/robwhitby/xray", > "test-pattern"), ...))</error:operation> > > <error:xquery-version>1.0-ml</error:xquery-version> > > </error:frame> > > <error:frame> > > <error:uri>/xray/src/xray.xqy</error:uri> > > <error:line>136</error:line> > > <error:column>4</error:column> > > <error:operation>run-module("/xray/test/results-tests.xqy", > "should-get-results-searching-all-text")</error:operation> > > <error:variables> > > <error:variable> > > <error:name>path</error:name> > > <error:value>"/xray/test/results-tests.xqy"</error:value> > > </error:variable> > > <error:variable> > > <error:name>test-pattern</error:name> > > <error:value>"should-get-results-searching-all-text"</error:value> > > </error:variable> > > </error:variables> > > <error:xquery-version>1.0-ml</error:xquery-version> > > </error:frame> > > <error:frame> > > <error:uri>/xray/src/xray.xqy</error:uri> > > <error:line>25</error:line> > > <error:column>22</error:column> > > <error:operation>xray:run-tests("xray", "/xray/test/results-tests.xqy", > "should-get-results-searching-all-text", "html")</error:operation> > > <error:variables> > > <error:variable> > > <error:name>test-dir</error:name> > > <error:value>"xray"</error:value> > > </error:variable> > > <error:variable> > > <error:name>module-pattern</error:name> > > <error:value>"/xray/test/results-tests.xqy"</error:value> > > </error:variable> > > <error:variable> > > <error:name>test-pattern</error:name> > > <error:value>"should-get-results-searching-all-text"</error:value> > > </error:variable> > > <error:variable> > > <error:name>format</error:name> > > <error:value>"html"</error:value> > > </error:variable> > > <error:variable> > > <error:name>modules</error:name> > > <error:value>"/xray/test/results-tests.xqy"</error:value> > > </error:variable> > > <error:variable> > > <error:name>module</error:name> > > <error:value>"/xray/test/results-tests.xqy"</error:value> > > </error:variable> > > </error:variables> > > <error:xquery-version>1.0-ml</error:xquery-version> > > </error:frame> > > <error:frame> > > <error:uri>/xray/</error:uri> > > <error:line>18</error:line> > > <error:column>0</error:column> > > <error:xquery-version>1.0-ml</error:xquery-version> > > </error:frame> > > </error:stack> > > </error:error> > > > > _______________________________________________ > General mailing list > [email protected] > http://developer.marklogic.com/mailman/listinfo/general _______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
