<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://microformats.org/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=AcelmOnouc</id>
	<title>Microformats Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://microformats.org/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=AcelmOnouc"/>
	<link rel="alternate" type="text/html" href="https://microformats.org/wiki/Special:Contributions/AcelmOnouc"/>
	<updated>2026-05-26T05:26:17Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.38.4</generator>
	<entry>
		<id>https://microformats.org/wiki/index.php?title=requirements-testing-examples&amp;diff=35967</id>
		<title>requirements-testing-examples</title>
		<link rel="alternate" type="text/html" href="https://microformats.org/wiki/index.php?title=requirements-testing-examples&amp;diff=35967"/>
		<updated>2008-12-20T03:30:11Z</updated>

		<summary type="html">&lt;p&gt;AcelmOnouc: cocoricdr&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;cnasitpasro&lt;br /&gt;
== Requirements Testing Examples ==&lt;br /&gt;
&lt;br /&gt;
The XUnit framework approach to writing test cases is still the most common way of implementing automated tests, but there are already a number of examples of mini languages and formats for web testing:&lt;br /&gt;
&lt;br /&gt;
=== Feed Parser Test Suite ===&lt;br /&gt;
&lt;br /&gt;
The XML files from the [http://feedparser.org/tests/ Feed Parser Test Suite] created by Mark Pilgrim are prefixed with a comment containing a description and expectation, decoupling the test assertions from imperative code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
Description: Atom namespace (official)&lt;br /&gt;
Expect:      bozo and feed['title'] == u'Example Atom'&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
Description: entry contributor homepage&lt;br /&gt;
Expect:      bozo and entries[0]['contributors'][0]['url'] == u'http://example.com/'&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Canoo WebTest ===&lt;br /&gt;
&lt;br /&gt;
[http://webtest.canoo.com/manual/WebTestHome.html Canoo WebTest] runs test steps defined in the Ant XML format:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 &amp;lt;target name=&amp;quot;login&amp;quot; &amp;gt; &lt;br /&gt;
  &amp;lt;webtest name=&amp;quot;normal&amp;quot; &amp;gt;&lt;br /&gt;
    &amp;amp;config;&lt;br /&gt;
    &amp;lt;steps&amp;gt;&lt;br /&gt;
      &amp;lt;invoke        description=&amp;quot;get Login Page&amp;quot;&lt;br /&gt;
        url=&amp;quot;login.jsp&amp;quot;   /&amp;gt;&lt;br /&gt;
      &amp;lt;verifyTitle   description=&amp;quot;we should see the login title&amp;quot; &lt;br /&gt;
        text=&amp;quot;Login Page&amp;quot; /&amp;gt;&lt;br /&gt;
      &amp;lt;setInputField description=&amp;quot;set user name&amp;quot; &lt;br /&gt;
        name=&amp;quot;username&amp;quot;&lt;br /&gt;
        value=&amp;quot;scott&amp;quot;     /&amp;gt;&lt;br /&gt;
      &amp;lt;setInputField description=&amp;quot;set password&amp;quot; &lt;br /&gt;
        name=&amp;quot;password&amp;quot;&lt;br /&gt;
        value=&amp;quot;tiger&amp;quot;     /&amp;gt;&lt;br /&gt;
      &amp;lt;clickButton   description=&amp;quot;Click the submit button&amp;quot; &lt;br /&gt;
        label=&amp;quot;let me in&amp;quot; /&amp;gt;&lt;br /&gt;
      &amp;lt;verifyTitle   description=&amp;quot;Home Page follows if login ok&amp;quot;&lt;br /&gt;
        text=&amp;quot;Home Page&amp;quot;  /&amp;gt;&lt;br /&gt;
    &amp;lt;/steps&amp;gt;&lt;br /&gt;
  &amp;lt;/webtest&amp;gt;&lt;br /&gt;
&amp;lt;/target&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Selenium ===&lt;br /&gt;
&lt;br /&gt;
[http://selenium.thoughtworks.com/ Selenium] is a Javascript based testing agent that runs a set of commands on a target website using a mini language for binding actions and assertions to page elements and DOM selections. Basic commands include:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
open&lt;br /&gt;
click&lt;br /&gt;
clickAndWait&lt;br /&gt;
verifyTitle&lt;br /&gt;
verifyValue&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Selenium test commands are defined using arbitrary HTML tables. This example is from the basic tests shipped with the framework, and shows how to specifiy assertions against an HTML select element:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 &amp;lt;table cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;1&amp;quot; border=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;tbody&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;td rowspan=&amp;quot;1&amp;quot; colspan=&amp;quot;3&amp;quot;&amp;gt;Test Select&amp;lt;br&amp;gt;&lt;br /&gt;
      &amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;open&amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;./tests/html/test_select.html&amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;select&amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;theSelect&amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;index=4&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
    &amp;lt;tr&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;verifySelected&amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;theSelect&amp;lt;/td&amp;gt;&lt;br /&gt;
      &amp;lt;td&amp;gt;Fifth Option&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;/tr&amp;gt;&lt;br /&gt;
  &amp;lt;/tbody&amp;gt;&lt;br /&gt;
 &amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are no specific semantic attributes used - the test tool simply extracts commands from the columns of the table.&lt;br /&gt;
&lt;br /&gt;
=== Watir ===&lt;br /&gt;
&lt;br /&gt;
[http://wtr.rubyforge.org Watir] is a testing tool, written in Ruby that implements a domain specific language for driving web tests with Internet Explorer.&lt;br /&gt;
&lt;br /&gt;
Example (using the browser):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 ie = IE.new&lt;br /&gt;
 ie.goto(&amp;quot;http://microformats.org&amp;quot;)&lt;br /&gt;
 ie.contains_text(&amp;quot;Designed for humans first&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example (clicking a link):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 ie.link(:text, &amp;quot;Microformats&amp;quot;).click&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Would click the hyperlink:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 &amp;lt;a href=&amp;quot;http://microformats.org&amp;quot;&amp;gt;Microformats&amp;lt;/a&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>AcelmOnouc</name></author>
	</entry>
</feed>