W3C

Guidelines for writing device independent tests

Editors:
Carmelo Montanez, National Institue of Standards and Technology

Abstract

This is a supporting document for authors of tests in the Mobile Web Test Suites Working Group. It defines the key properties for Mobile web tests. It proposes various guidelines for tests authors to follow when writing tests.

Status of this document

These guidelines were produced by members of the Mobile Web Test Suite working group which is part of the Mobile Web Initiative (see About).

Comments on, and discussions of this document can be sent on the (archived) public mailing list public-mwts@w3.org (see instructions). W3C Members can also send comments directly to the Mobile Web Test Suites working group.

These guidelines represent the current thinking of the working group and as such may be updated, replaced or rendered obsolete by other W3C documents at any time. Its publication does not imply endorsement by the W3C membership or the Mobile Web Test Working Group.

Patent disclosures relevant to the Mobile Web Test Suites Working Group may be found on the Working Group's public patent disclosure page.

Table of contents

1.0 Overview

This document provide a set of guidelines for writing effective and comprehensive tests for Mobile devices. They should be followed as much as possible. These guidelines may also apply to specifications for tests other than mobile devices tests.

2.0 Guideleines

2.1 Simplicity

Tests should be simple and evaluate a specific feature of the specifications.

2.2 Device Independent

Tests should be in conformance to the specifications it is targeting. No test should be dependent on any device and/or browser in particular.

2.3 Self Explanatory

Test users sould be able to run the tests without having a deep understanding of the specifications.

2.4 Expected Results

The tests should be self explantory of what the expected results should be. Whenever alternate expected results are possible, it should also be self explanatory.

2.5 Short

Test should contain the minimun number of lines necessary to evaluate the feature.

2.6 Scrolling and Pagination

Scrolling and pagination should be keep to a minimun unless the test is specifically addressing those features.

2.7 Validity

Tests should be positive, that is conformant to the addressed specifications, unless they are specifically designed to catch negative/error conditions.

2.8 Error Conditions

Whenever a test is addressing an error condition, it should clearly indicate so.

2.9 Link to Specifications

Whenever possible a test should contain a link back to the specific area of the specifications it is evaluating.

2.10 Background Coloring

Whenever possible tests should not contain background colors as part of the test as some colors (such as red and green) are usually used to indicate pass/failure.

2.11 Green Coloring as Part of Execution Results

Whenever possible execution results should use green coloring to indicate succes.

2.12 Red Coloring as Part of Execution Results

Whenever possible execution results should use red coloring to indicate failure.

2.13 Yellow Coloring as Part of Execution Results

Whenever possible execution results should use yellow coloring to indicate uncertain results.

2.14 Encoding

Tests should use UTF-8 or UTF-16 encoding as much as possible unless the feature under test is encoding.

2.15 Special Fonts

Tests should be written as to avoid any special fonts unless the purpose of the test is to evaluate special fonts.

2.16 Long Tests

In general test should be short in nature. However For tests that must be long (e.g. scrolling tests), it is important to make it clear that the filler text is not relevant, otherwise the tester may think he is missing something and therefore waste time reading the filler text. Good text for use in these situations is, quite simply, "This is filler text. This is filler text. This is filler text.". If it looks boring, it's working!

2.17 Unobvious Tests

Test writers should avoid test, whose pupose and expected results are not obvious. For instance a test for which half of a sentence is normal text and the other half is half bold is not very obvious. Exception will be tests, whose nature and purpose will require such combinations.

2.18 Naming conventions

In general test writers should avoid scriptic test names. It is suggested that tests follow a test-topic-xxx.ext where:

Acknowledgements

Index

Webmaster · Last modified: $Date: 2008/09/16 18:42:58 $ by $Author: cmontane $

Copyright © 1994-2005 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C liability, trademark, document use and software licensing rules apply. Your interactions with this site are in accordance with our public and Member privacy statements.