
| Test Suites Working Group
[DISABLED] Guidelines for the Mobile Web Test Suites Group (MWTS) Tests
Submissions
Licensing Issues and Acceptance
Test Structure and Documentation
- Test cases can be positive, negative or behavioral (e.g. how a browser
reacts to a particular technology).
- Negatives tests will be accepted. However, they must be identified as
such. (We can add a section to further explain negative tests). Unless it
is the goal of a test to illustrate the behavior of a user agent to
invalid content, the test cases should be well-formed/valid XHTML Basic,
syntactically correct CSS, DOM, etc.
- No particular test structure is assumed or reccommended, however
ideally tests should contain as much documentation as possible.
- Submitters should use the provided web interface to propose their test cases.
- Submitters should indicate any potential problems with the tests.
- Test cases as well as any variable names, function names, etc., should
not contain any copyrighted information or any company name or any other
text identifying a company.
- Submitted tests cases should be minimal in nature and independent of
one another.
- Metadata should be left out of the test itself. The
<title> of the test should describe what feature is
tested. How the test is performed should be self-evident
when viewing its source code.
- When using colour to indicate success or failure, use
green for success and red for failure. Avoid using these
colours for any other purpose, as this could cause
confusion.
- Test cases should have a clear pass condition and
indicate in the simplest way possible whether it has
passed or failed. "The word 'PASS' should appear
below" is a good positive pass condition. "There should
be no red on this page" is a good negative pass
condition.
Examples of a positive test cases:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.0//EN"
"http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CSS 2.1 Test Suite: Characters and Case:
Character Escapes</title>
<style type="text/css">
p { background: red; color: white; }
p { font-family: "\"", '\'', serif; background: green;
}
</style>
</head>
<body>
<p>This should have a green background.</p>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html lang="en">
<head>
<title>HTML BIDI: dir=rtl</title>
</head>
<body dir="rtl">
<p>!The exclamation mark should be to the right of the text, and the phrase should be right-aligned</p>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html lang="en">
<head>
<title>CSS Block Box Model: first-line and anonymous boxes</title>
<style type="text/css">
div { color: red; }
:first-line { color: green; }
p, p:first-line { color: black; background: white; }
</style>
</head>
<body>
<p>The following lines should all be green (assuming none of them wrap onto more than one line).</p>
<div>
<div> This line should be green. </div>
<div> This line should be green. </div>
<div> This line should be green. </div>
</div>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CSS Tables: Empty Tables</title>
<style type="text/css">
table { display: table; height: 5em; width: 5em; background: green; }
</style>
</head>
<body>
<p>There should be a green block under this paragraph.</p>
<table xmlns="http://www.example.org/"/>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html lang="en">
<head>
<title>CSS text-indent: Percentges</title>
<style type="text/css">
.wide { width: 16em; font: 30px/0 monospace; text-indent: 8em; margin: 2em 0; }
.narrow { width: 4em; text-indent: 50%; }
</style>
</head>
<body>
<div class="wide">PA<div class="narrow"> SS</div></div>
</body>
</html>
Test cases
- The Test cases should be designed to be readable on as many devices and user agents as possibles; contributors are invited to follow the Mobile Web Best Practices when possible and relevant
- Links (incl. embedded images, scripts, etc.) should be made using relative links unless absolutely necessary
- Submitted tests should use UTF-8 encoding, with the exception for cases
where the test case purpose is to evaluate how a user agent reacts to a specific encoding.
Relevant Specifications
Expected Results
- The test cases should describe the expected result(s) in sufficient details to allow external testers to assess whether a given user agent passes or fails the test, or matches a specific behavior.
Carmelo Montanez, Mobile Web Test Suites Working Group co-chair ·
Last modified: $Date: 2019/08/28 19:43:49 $ by $Author: carcone $
Copyright
© 2007 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.