XQUnit Test

Friday, 17 May 2019 · 8 messages · last reply 20 May 2019
MS
Markus Schmid17 May 2019 08:57 #
Hi is it possible to run multiple testsuites with one TEST command call from the basex console? Or is there always only one <testsuite> element in the <testsuites> result? Markus
CG
Christian Grün17 May 2019 09:16 #
Hi Markus, Yes, that’s possible: If you specify a directory as argument, all XQuery modules in that directory will be parsed, and a testsuite element will be created for each module that contains tests. See [1] for more information. Best, Christian [1] http://docs.basex.org/wiki/Commands#TEST
Quoted text · Markus Schmid · 10 lines
On Fri, May 17, 2019 at 8:57 AM Markus Schmid <schmid45 at t-online.de> wrote: > > Hi > > is it possible to run multiple testsuites with one TEST command call from the basex console? Or is there always only one <testsuite> element in the <testsuites> result? > > Markus > > __________________________________________ >
MS
Markus Schmid17 May 2019 10:45 #
I see. Thank you for the quick response. If there are multiple XQuery Moduls (testsuites) with references to a module variable X in a helper xqy File, will the variable X be created for each XQuery Modul or only once when it is used the first time in any of the XQuery modules? Thank you. Markus
Quoted text · Christian Grün · 26 lines
> Am 17.05.2019 um 09:16 schrieb Christian Grün <christian.gruen at gmail.com>: > > Hi Markus, > > Yes, that’s possible: If you specify a directory as argument, all > XQuery modules in that directory will be parsed, and a testsuite > element will be created for each module that contains tests. See [1] > for more information. > > Best, > Christian > > [1] http://docs.basex.org/wiki/Commands#TEST > > > >> On Fri, May 17, 2019 at 8:57 AM Markus Schmid <schmid45 at t-online.de> wrote: >> >> Hi >> >> is it possible to run multiple testsuites with one TEST command call from the basex console? Or is there always only one <testsuite> element in the <testsuites> result? >> >> Markus >> >> __________________________________________ >>
CG
Christian Grün17 May 2019 11:58 #
Quoted text · Markus Schmid · 1 line
> If there are multiple XQuery Moduls (testsuites) with references to a module variable X in a helper xqy File, will the variable X be created for each XQuery Modul or only once when it is used the first time in any of the XQuery modules?
If several of your modules import the same library module that contains a variable declaration, the library module will be parsed and compiled multiple times. Does this answer your question?
Quoted text · Markus Schmid · 37 lines
On Fri, May 17, 2019 at 10:45 AM Markus Schmid <schmid45 at t-online.de> wrote: > > I see. Thank you for the quick response. > > If there are multiple XQuery Moduls (testsuites) with references to a module variable X in a helper xqy File, will the variable X be created for each XQuery Modul or only once when it is used the first time in any of the XQuery modules? > > Thank you. > > Markus > > > Am 17.05.2019 um 09:16 schrieb Christian Grün <christian.gruen at gmail.com>: > > > > Hi Markus, > > > > Yes, that’s possible: If you specify a directory as argument, all > > XQuery modules in that directory will be parsed, and a testsuite > > element will be created for each module that contains tests. See [1] > > for more information. > > > > Best, > > Christian > > > > [1] http://docs.basex.org/wiki/Commands#TEST > > > > > > > >> On Fri, May 17, 2019 at 8:57 AM Markus Schmid <schmid45 at t-online.de> wrote: > >> > >> Hi > >> > >> is it possible to run multiple testsuites with one TEST command call from the basex console? Or is there always only one <testsuite> element in the <testsuites> result? > >> > >> Markus > >> > >> __________________________________________ > >> >
MS
Markus Schmid17 May 2019 12:30 #
Hi Christian my question was not about compile time but rather run time. It is about if calculation of X take place multiple times if X is accessed from multiple XQuery modules during the test run. Kind Regards Markus
Quoted text · Christian Grün · 44 lines
Am 17.05.2019 um 11:58 schrieb Christian Grün <christian.gruen at gmail.com>: >> If there are multiple XQuery Moduls (testsuites) with references to a module variable X in a helper xqy File, will the variable X be created for each XQuery Modul or only once when it is used the first time in any of the XQuery modules? > > If several of your modules import the same library module that > contains a variable declaration, the library module will be parsed and > compiled multiple times. Does this answer your question? > > >> On Fri, May 17, 2019 at 10:45 AM Markus Schmid <schmid45 at t-online.de> wrote: >> >> I see. Thank you for the quick response. >> >> If there are multiple XQuery Moduls (testsuites) with references to a module variable X in a helper xqy File, will the variable X be created for each XQuery Modul or only once when it is used the first time in any of the XQuery modules? >> >> Thank you. >> >> Markus >> >>> Am 17.05.2019 um 09:16 schrieb Christian Grün <christian.gruen at gmail.com>: >>> >>> Hi Markus, >>> >>> Yes, that’s possible: If you specify a directory as argument, all >>> XQuery modules in that directory will be parsed, and a testsuite >>> element will be created for each module that contains tests. See [1] >>> for more information. >>> >>> Best, >>> Christian >>> >>> [1] http://docs.basex.org/wiki/Commands#TEST >>> >>> >>> >>>> On Fri, May 17, 2019 at 8:57 AM Markus Schmid <schmid45 at t-online.de> wrote: >>>> >>>> Hi >>>> >>>> is it possible to run multiple testsuites with one TEST command call from the basex console? Or is there always only one <testsuite> element in the <testsuites> result? >>>> >>>> Markus >>>> >>>> __________________________________________ >>
CG
Christian Grün17 May 2019 12:32 #
Quoted text · Markus Schmid · 1 line
> my question was not about compile time but rather run time. It is about if calculation of X take place multiple times if X is accessed from multiple XQuery modules during the test run.
Maybe you could start with some first tests, then we’ll see which operations might need to be optimized.
Quoted text · Markus Schmid · 46 lines
> Am 17.05.2019 um 11:58 schrieb Christian Grün <christian.gruen at gmail.com>: > > >> If there are multiple XQuery Moduls (testsuites) with references to a module variable X in a helper xqy File, will the variable X be created for each XQuery Modul or only once when it is used the first time in any of the XQuery modules? > > > > If several of your modules import the same library module that > > contains a variable declaration, the library module will be parsed and > > compiled multiple times. Does this answer your question? > > > > > >> On Fri, May 17, 2019 at 10:45 AM Markus Schmid <schmid45 at t-online.de> wrote: > >> > >> I see. Thank you for the quick response. > >> > >> If there are multiple XQuery Moduls (testsuites) with references to a module variable X in a helper xqy File, will the variable X be created for each XQuery Modul or only once when it is used the first time in any of the XQuery modules? > >> > >> Thank you. > >> > >> Markus > >> > >>> Am 17.05.2019 um 09:16 schrieb Christian Grün <christian.gruen at gmail.com>: > >>> > >>> Hi Markus, > >>> > >>> Yes, that’s possible: If you specify a directory as argument, all > >>> XQuery modules in that directory will be parsed, and a testsuite > >>> element will be created for each module that contains tests. See [1] > >>> for more information. > >>> > >>> Best, > >>> Christian > >>> > >>> [1] http://docs.basex.org/wiki/Commands#TEST > >>> > >>> > >>> > >>>> On Fri, May 17, 2019 at 8:57 AM Markus Schmid <schmid45 at t-online.de> wrote: > >>>> > >>>> Hi > >>>> > >>>> is it possible to run multiple testsuites with one TEST command call from the basex console? Or is there always only one <testsuite> element in the <testsuites> result? > >>>> > >>>> Markus > >>>> > >>>> __________________________________________ > >> >
MS
Markus Schmid17 May 2019 15:29 #
Freundliche Grüße Markus Schmid
Quoted text · Christian Grün · 6 lines
Am 17.05.2019 um 12:32 schrieb Christian Grün <christian.gruen at gmail.com>: >> my question was not about compile time but rather run time. It is about if calculation of X take place multiple times if X is accessed from multiple XQuery modules during the test run. > > Maybe you could start with some first tests, then we’ll see which > operations might need to be optimized. >
Yes. I’ve started yesterday. I’m using v9.2.2 beta. It works fine. I only asked in order to optimize in advance.
Quoted text · Christian Grün · 48 lines
> > >> Am 17.05.2019 um 11:58 schrieb Christian Grün <christian.gruen at gmail.com>: >> >>>> If there are multiple XQuery Moduls (testsuites) with references to a module variable X in a helper xqy File, will the variable X be created for each XQuery Modul or only once when it is used the first time in any of the XQuery modules? >>> >>> If several of your modules import the same library module that >>> contains a variable declaration, the library module will be parsed and >>> compiled multiple times. Does this answer your question? >>> >>> >>>> On Fri, May 17, 2019 at 10:45 AM Markus Schmid <schmid45 at t-online.de> wrote: >>>> >>>> I see. Thank you for the quick response. >>>> >>>> If there are multiple XQuery Moduls (testsuites) with references to a module variable X in a helper xqy File, will the variable X be created for each XQuery Modul or only once when it is used the first time in any of the XQuery modules? >>>> >>>> Thank you. >>>> >>>> Markus >>>> >>>>> Am 17.05.2019 um 09:16 schrieb Christian Grün <christian.gruen at gmail.com>: >>>>> >>>>> Hi Markus, >>>>> >>>>> Yes, that’s possible: If you specify a directory as argument, all >>>>> XQuery modules in that directory will be parsed, and a testsuite >>>>> element will be created for each module that contains tests. See [1] >>>>> for more information. >>>>> >>>>> Best, >>>>> Christian >>>>> >>>>> [1] http://docs.basex.org/wiki/Commands#TEST >>>>> >>>>> >>>>> >>>>>> On Fri, May 17, 2019 at 8:57 AM Markus Schmid <schmid45 at t-online.de> wrote: >>>>>> >>>>>> Hi >>>>>> >>>>>> is it possible to run multiple testsuites with one TEST command call from the basex console? Or is there always only one <testsuite> element in the <testsuites> result? >>>>>> >>>>>> Markus >>>>>> >>>>>> __________________________________________ >>>> >>
MS
Markus Schmidin reply to Christian Grün, 17 May 2019, 12:3220 May 2019 08:50 #
Hi I‘ve some more test runs. It seems there is no difference wether running the tests from two modules separately or from one module. (All modules are accessing a module variable with large data set which is defined and initialized in helper.xqy):
Quoted text · Christian Grün · 1 line
> test C:/Users/MS/Documents/SPDU/AllTests
<testsuites time="PT1.814S">
  <testsuite name="file:///C:/Users/MS/Documents/SPDU/AllTests/TestsuiteAll.xqm" time="PT1.812S" tests="8" failures="0" errors="0" skipped="0">
    <testcase name="A_Compare_NumberOf_PDUs_ASAR_FBX" time="PT0.036S"/>
    <testcase name="A_Compare_Same_PDUs_ASAR_FBX" time="PT0.037S"/>
    <testcase name="A_Compare_NumberOf_PDUs_ASAR_FBX" time="PT0.412S"/>
    <testcase name="A_Compare_Same_PDUs_ASAR_FBX" time="PT0.411S"/>
    <testcase name="B_Compare_NumberOf_PDUs_ASAR_FBX_02" time="PT0.035S"/>
    <testcase name="B_Compare_Same_PDUs_ASAR_FBX_02" time="PT0.035S"/>
    <testcase name="B_Compare_NumberOf_PDUs_ASAR_FBX_02" time="PT0.411S"/>
    <testcase name="B_Compare_Same_PDUs_ASAR_FBX_02" time="PT0.41S"/>
  </testsuite>
</testsuites>
Quoted text · Christian Grün · 1 line
> test C:/Users/MS/Documents/SPDU/Tests
<testsuites time="PT1.794S">
  <testsuite name="file:///C:/Users/MS/Documents/SPDU/Tests/Testsuite01.xqm" time="PT0.9S" tests="4" failures="0" errors="0" skipped="0">
    <testcase name="A_Compare_NumberOf_PDUs_Asar_FBX" time="PT0.034S"/>
    <testcase name="A_Compare_Same_PDUs_Asar_FBX" time="PT0.034S"/>
    <testcase name="A_Compare_NumberOf_PDUs_Asar_FBX" time="PT0.412S"/>
    <testcase name="A_Compare_Same_PDUs_Asar_FBX" time="PT0.405S"/>
  </testsuite>
  <testsuite name="file:///C:/Users/MS/Documents/SPDU/Tests/Testsuite02.xqm" time="PT0.893S" tests="4" failures="0" errors="0" skipped="0">
    <testcase name="B_Compare_NumberOf_PDUs_Asar_FBX_02" time="PT0.033S"/>
    <testcase name="B_Compare_Same_PDUs_Asar_FBX_02" time="PT0.036S"/>
    <testcase name="B_Compare_NumberOf_PDUs_Asar_FBX_02" time="PT0.404S"/>
    <testcase name="B_Compare_Same_PDUs_Asar_FBX_02" time="PT0.406S"/>
  </testsuite>
</testsuites>
Regards Markus
Quoted text · Christian Grün · 5 lines
Am 17.05.2019 um 12:32 schrieb Christian Grün <christian.gruen at gmail.com>: >> my question was not about compile time but rather run time. It is about if calculation of X take place multiple times if X is accessed from multiple XQuery modules during the test run. > > Maybe you could start with some first tests, then we’ll see which > operations might need to be optimized.
Yes. I’ve started yesterday. I’m using v9.2.2 beta. It works fine. I only asked in order to optimize in advance.
Quoted text · Christian Grün · 47 lines
> > >> Am 17.05.2019 um 11:58 schrieb Christian Grün <christian.gruen at gmail.com>: >> >>>> If there are multiple XQuery Moduls (testsuites) with references to a module variable X in a helper xqy File, will the variable X be created for each XQuery Modul or only once when it is used the first time in any of the XQuery modules? >>> >>> If several of your modules import the same library module that >>> contains a variable declaration, the library module will be parsed and >>> compiled multiple times. Does this answer your question? >>> >>> >>>> On Fri, May 17, 2019 at 10:45 AM Markus Schmid <schmid45 at t-online.de> wrote: >>>> >>>> I see. Thank you for the quick response. >>>> >>>> If there are multiple XQuery Moduls (testsuites) with references to a module variable X in a helper xqy File, will the variable X be created for each XQuery Modul or only once when it is used the first time in any of the XQuery modules? >>>> >>>> Thank you. >>>> >>>> Markus >>>> >>>>> Am 17.05.2019 um 09:16 schrieb Christian Grün <christian.gruen at gmail.com>: >>>>> >>>>> Hi Markus, >>>>> >>>>> Yes, that’s possible: If you specify a directory as argument, all >>>>> XQuery modules in that directory will be parsed, and a testsuite >>>>> element will be created for each module that contains tests. See [1] >>>>> for more information. >>>>> >>>>> Best, >>>>> Christian >>>>> >>>>> [1] http://docs.basex.org/wiki/Commands#TEST >>>>> >>>>> >>>>> >>>>>> On Fri, May 17, 2019 at 8:57 AM Markus Schmid <schmid45 at t-online.de> wrote: >>>>>> >>>>>> Hi >>>>>> >>>>>> is it possible to run multiple testsuites with one TEST command call from the basex console? Or is there always only one <testsuite> element in the <testsuites> result? >>>>>> >>>>>> Markus >>>>>> >>>>>> __________________________________________ >>

⚡Generated with XQuery