Wetator XML

The Wetator XML format (file extension .wet or .xml) is an XML-based test definition format. It uses XML namespaces to distinguish the base test case structure from command sets, making it easy to validate files against the provided XSD schemas and to use XML editors with auto-completion.

A simple test script might look like this

<?xml version='1.0' encoding='UTF-8'?>
<test-case
    xmlns='http://www.wetator.org/xsd/test-case'
    xmlns:d='http://www.wetator.org/xsd/default-command-set'
    xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
    xsi:schemaLocation='http://www.wetator.org/xsd/test-case test-case-1.0.0.xsd
                        http://www.wetator.org/xsd/default-command-set default-command-set-1.0.0.xsd'
    version='1.0.0'>
    <command><d:open-url><d:url>https://www.wetator.org/testform</d:url></d:open-url></command>

    <command><d:assert-title><d:title>WETATOR / Test Form</d:title></d:assert-title></command>
    <command><d:assert-content><d:content>The form below is only for testing purpose</d:content></d:assert-content></command>

    <command><d:set><d:wpath>Project name</d:wpath><d:value>My Fancy Web App Under Test</d:value></d:set></command>
    <command><d:select><d:wpath>JAVA</d:wpath></d:select></command>

    <command><d:click-on><d:wpath>Submit My Truth</d:wpath></d:click-on></command>
    <command><d:assert-content><d:content>Thank you for submitting your truth about WETATOR</d:content></d:assert-content></command>
</test-case>

Comments

Use the <comment> element to add a comment to your test output. The text content of the comment element is treated as Markdown (same as the describe command).

    <comment>This is a plain comment</comment>
    <comment># Fill the form
Use the fields below to fill the registration form.</comment>

Disabled commands

A command can be disabled (skipped during test execution) by adding the disabled="true" attribute.

    <command disabled="true"><d:click-on><d:wpath>Not yet implemented</d:wpath></d:click-on></command>

Encoding

Wetator always assumes UTF-8 encoding for .wet files. Declare this in the XML header:

<?xml version='1.0' encoding='UTF-8'?>