How to test that a web page contains the words “Hello World”?

The following Hello World test example is the most simple use of our automated website application testing tool.

The test suite configuration below tests whether the specified <url> from below returns HTML that <contains> the words “Hello World”.

If the HTML does contain “Hello World” at runtime, then your test assertion is fulfilled and this gets logged as a PASS. If not, it gets logged as a FAILURE.

<?xml version="1.0" encoding="UTF-8" ?>
    <userstory title="Test that 'Hello World' appears on the web page">
                <contains>Hello World</contains>

You run this test suite, simply by typing php run.php testsuite=”Examples/1_hello_world.xml”

And this is what you see when it completes:


Hey, but so far this test suite is not manual, it’s not automated either, it’s sort of half-way in between! This is how you fully automate the website tests on your system.

Leave a Reply

Notify of