Difference between revisions of "Testscripts"

From Amahi Wiki
Jump to: navigation, search
Line 1: Line 1:
Testsscripts look like:
+
Testscripts look like:
  
 
   app << { ... test ... }
 
   app << { ... test ... }
Line 12: Line 12:
  
 
     :page => ['Title', 'some string']
 
     :page => ['Title', 'some string']
 +
 +
= Submitting a Form =
 +
 +
    :form => [['field-name', 'keystrokes'], ... , 'form-name']
 +
 +
= Clicking on a Link =
 +
 +
    :click => 'Sign out'
 +
 +
The testing engine will look for a <code><nowiki><a ...>Sign out</a></nowiki></code>

Revision as of 01:46, 7 July 2010

Testscripts look like:

 app << { ... test ... }

There are three types of tests:

  • checking a page test
  • submitting a form
  • clicking on a link

Checking a page

   :page => ['Title', 'some string']

Submitting a Form

   :form => [['field-name', 'keystrokes'], ... , 'form-name']

Clicking on a Link

   :click => 'Sign out'

The testing engine will look for a <a ...>Sign out</a>