Tuesday, August 16, 2011

Web Validation / W3C Compliance Testing


Web Validation / W3C Compliance Testing

The W3C web site can be used to test web sites for compliance to W3C's recommendations and standards concerning HTML and XHTML.



What type of test cases or testings is recommeneded??

The Basics - what you should run on all your web pages

  • Unicorn - W3C's Unified Validator
  • The MarkUp Validator - Also known as the HTML validator, it helps check Web documents in formats like HTML and XHTML, SVG or MathML.
  • The Link Checker - Checks anchors (hyperlinks) in a HTML/XHTML document. Useful to find broken links, etc.
  • The CSS Validator - validates CSS stylesheets or documents using CSS stylesheets.




Unicorn testing for a webpage or any feeds or for any documents on webpage

What is Unicorn?

Unicorn is W3C's unified validator, which helps people improve the quality of their Web pages by performing a variety of checks. Unicorn gathers the results of the popular HTML and CSS validators, as well as other useful services.

How to test?

Validation is a process of testing some piece of content (HTML, CSS, etc.) against a set of rules. The HTML validator determines whether the markup conforms to the grammar of HTML (e.g., as expressed through a document type definition, or DTD). The CSS validator determines whether the CSS rules conform to CSS syntax.

What are the generic cases?

You can tell Unicorn what to validate in any of the following ways:
  • By identifying a page on the Web with a URI.
  • By uploading a file (useful when your page isn't yet on the Web). Choose the "By File Upload" tab for this option.
  • By pasting markup directly into a form. Choose the "By Direct Input" tab for this option.

To test any open source tools can be used.



What is markup validator or HTML validator AND how to test ?


Verify the following HTML validations for the webpages:
1. Right validators are used for properties.
2. Tags are properly matches or closed.
3. Verify the page supports in all browsers ( mozilla, IE, chrome & opera)
4. Verify the page for various browser versions ( as per agreed set of versions)

Various Cases:
1.       DOCTYPE :  Identifies this tag is a Document Type Declaration (DTC) or DOCTYPE.
Right click your mouse and select view source. The first line of code for this page appears as shown below:
<!DOCTYPE HTML PUBLIC
          "-//W3C//DTD HTML 4.01 Transitional//EN">
               It should be placed on one line. The term DOCTYPE is case sensitive, it must be written in upper case!
2.       Character Encoding:
Character encoding is a method of converting bytes into characters. For documents in English the code below is recommended.
<meta http-equiv="Content-Type"
 content="text/html; charset=iso-8859-1">

Place this code on one line, between these HTML Tags:
<HEAD>...</HEAD>
Any opensource tools or addons for the browsers.



Web page Link validations


Link Checker looks for issues in links, anchors and referenced objects in a Web page, CSS style sheet, or recursively on a whole Web site.
It is very necessary to know the broken links available in the site.
Generic Cases:
1.       Links are connected & response is obtained.
2.       Link path
3.       If link is image, then image name.
4.       If link is any doc, then doc path etc.,

Tools:
2.       Link Valet - http://www.htmlhelp.com/tools/valet/
3.       w3.org - http://validator.w3.org/checklink
4.       Firefox addon – link checker




Web page CSS validation



Cascading Style Sheets (CSS) is a simple mechanism for adding style (e.g., fonts, colors, spacing) to Web documents.

Generic case: 
Cascading Style Sheets (CSS) is a simple mechanism for adding style (e.g., fonts, colours, and spacing) to Web documents.
This depends mainly requires browser compatibility.  So need to check the page - colour, fonts, sections, locations, features are compatible with the various browsers or not.

 Tools :




RSS/  Feed Validator


It checks the syntax of Atom or RSS feeds of the site links, able to view the contents, able to register in the users browsers.

This is a validator for syndicated feeds. It works with RSS 0.90, 0.91, 0.92, 0.93, 0.94, 1.0, and 2.0. It also validates Atom feeds.
To use it, simply enter the address of your feed and click Validate. If the validator finds any problems in your feed, it will give you messages for each type of problem and highlight where the problem first occurs in your feed. If you're unsure what a message means, click the "help" link next to the message for a fuller explanation.

Validators help you to codify the specification (literally, to translate it into code) to make it easier to know when you’re producing RSS correctly, and to help you fix it when you’re not.
Many feed readers (including Google‘s FeedBurner service) will not accept invalid blog/site feeds. So it is better to validate your site’s feeds first.

Generic case: 
It validates RSS feeds against the rules defined in the RSS 2.0 specification. It also validates elements of commonly used namespaces:
  • blogChannel
  • Dublin Core
  • itunes
  • mod_admin
  • mod_syndication
  • mod_content (content:encoded only)
For Atom feeds, it validates against draft-ietf-atompub-format-11, which describes version 1.0 of the Atom feed format. This draft will become an RFC when a number is assigned by the IETF.
 Tools :
1.       w3.org - http://validator.w3.org/feed/

3.       Feedvalidator.org

4.       W3C Validator

5.       Validome – Feed Validation

6.       RSS Validator

7.       RSS Validator – Firefox Extension

8.       Weblogs Validator





Web page –XHTML/ XML validation ??


Use this form to check an XML document for well-formetness and (optionally) validity. External entity references are included, even when not validating.It checks for spaces and syntax errors, while pointing to the line number at which the error was spotted.

Generic case: 
The validation check is performed against any XML schema or DTD declared inside the XML document.  If neither an XML schema nor a DTD is declared, only a syntax check is performed.  To validate the XML document against an external XML schema

 Tools :

1.       http://www.w3schools.com/web/web_validate.asp



Web page –Spell check ??


Web page should be free from misspelled words ie., should not contains the misspelled words.


 Tools :
2.       http://checkdog.com/




Web page – Robots checker



 Robots.txt files (often erroneously called robot.txt, in singular) are created by webmasters to mark (disallow) files and directories of a web site that search engine spiders (and other types of robots) should not access.
 Tools :

1.       http://tool.motoricerca.info/robots-checker.phtml





Web page – Colour Contrast Analyzer



 AccessColor tests the color contrast and color brightness between the foreground and background of all elements in the DOM to make sure that the contrast is high enough for people with visual impairments. AccessColor will find the relevant color combination within your HTML and CSS documents rather than requiring you to find each value to input yourself in order to test the contrast between each color combination.
 Tools :




Web page – All objects validations



 It tests the complete HTML page including all objects (images, CSS, JavaScripts, RSS, Flash and frames/iframes). It mimics the way a page is loaded in a web browser.
The load time of all objects is shown visually with time bars.

 Tools :






1 comment:

  1. My cousin recommended this blog and she was totally right keep up the fantastic work!

    <a href="http://www.isolve.co.in/Compliance Software</a>

    ReplyDelete