Web console

Check intermediary XML in the chain of transformations
Click on radio-button "Stop at" in the form of selected data view. This will stop execution at specified processor (for each XML event).
Notice:This option can be used with each option below.

Check generated XML
Click on button "Get data" in the form of selected data view.
Check the XML generated for specified XML events
Set specified XML events by setting XPath expression, then click on button "Breakpoint". This will interrupt execution at specified XML event. Resume execution by clicking on "Resume Breakpoint" in menu "Environment".
Check structure of generated XML
Click on button "Skeleton".
Other tools in web console
Web console menu:
  • Home: list of user data views
  • Monitoring: monitor data views
  • Configuration: see configuration of data views
  • Environment: information about execution environment
  • Documentation: links to documentation

Command line interfaces

Checking configuration file
Run this command:
lavoisier-parse-config

Checking pre-processing of your configuration file
Run this command:
lavoisier-process-config

Testing execution of a data view
Run this command:
lavoisier-standalone-execute <view>/<path>

Adaptors

Test a XPath expression
Create an adaptor "StringConnector" with parameter "content" evaluating the XPath expression to test.
<connector type="StringConnector">
    <parameter name="content" eval="<xpath_expression>"></parameter>
</connector><serializer type="EncapsulateSerializer"></serializer>

Log value of a view argument
Add adaptor "LogProcessor" at the beginning of your processors chain.
<processor type="LogProcessor" match="/*">
    <parameter name="message" eval="$<argument_name>"></parameter>
</processor>

Dump content of a view without interrupting data flow
Add adaptor "XmlDumpProcessor" in your processors chain.
<processor type="XmlDumpProcessor" match="/*">
    <parameter name="file">debugging.xml</parameter>
</processor>

Save time when debugging a big data view
Add adaptor "SelectWindowProcessor" at the beginning of your processors chain, in order to select part of retrieved XML document.
<processor type="SelectWindowProcessor" match="/*/*" disabled="not(property('debug')='true')">
    <parameter name="length">10</parameter>
</processor>
In order to activate this processor, set property 'debug' to value 'true' in configuration file etc/lavoisier-config.properties (or remove attribute @disabled).

Others tips

Temporarily replace a connector with static XML content
In order to temporarily replace a connector with static XML content, just create an XML file with following naming convention into a directory "stubs", which is relative to current directory:
$PWD/stubs/<view_name>.xml
Notice:You can modify this behavior by editing file lavoisier-config.xsl

Non-regression testing of data views configuration
Add view-template "NonRegressionTemplate.xsl":
<view-template name="test" stylesheet="template/NonRegressionTemplate.xsl">
    <parameter name="test-suite">test/test-suite.xml</parameter>
    <parameter name="expected">test/expected.xml</parameter>
</view-template>
Generate the list of data views to be tested:
curl http://localhost:8080/lavoisier/test_generate_suite?accept=xml > test/test-suite.xml
You may add by hand data views that have parameters:
<test-suite>
    <entries view="<view_name>">
        <entry key="<argument_name>">argument_value</entry>
    </entries>
</test-suite>
Generate expected XML skeletons by running the following command line:
curl http://localhost:8080/lavoisier/test_generate_expected?accept=xml > test/expected.xml
Verify generated XML skeletons by hand:
cat test/expected.xml
Launch test(s) by executing appropriate data view:
  • test/myView: runs test for data view 'myView'
  • test_all: runs test for all the data views included in the test-suite