How to post your test data?

The following shows how to submit <post> data to your test <url>, which makes it possible for the automated testing tool to test data-driven websites.

<?xml version="1.0" encoding="UTF-8" ?>
<testsuite>
    <userstory title="Test that I can submit a 'Test Comment' using a HTTP POST">
        <scenario>
            <step>
                <url>http://automateyourtests.com/demo_application/wp-comments-post.php</url>
                <post><![CDATA[comment=Test+Comment&comment_post_ID=1]]></post>
            </step>
        </scenario>
    </userstory>
</testsuite>

Straight after you submitted your <post> test data, you typically would want to add an additional <step> straight after that that tests whether that submitted data subsequently appears correctly on other web pages within the application. Writing your tests in such a way is more meaningful than the above example.

Note: That obscure-looking <![CDATA[]]> syntax from above is how XML likes to escapes data. Simply use it around all of your <post> data and stop asking questions!


Warning: count(): Parameter must be an array or an object that implements Countable in /home/nemyoe7sj5jr/public_html/wp-includes/class-wp-comment-query.php on line 388