QA/Firefox3/TestPlan/Microformats

From MozillaWiki
Jump to: navigation, search

« QA/Firefox3/TestPlan

Feature Microformats Test Plan

Overview

This feature will make it easier for extension authors to detect and parse microformat data on a web page. It will also allow extension authors and web page authors to create new microformat definitions and register them with Firefox for the duration of that Firefox Session. It will work with the Web Application content handling to change the way htat detected microformats will be acted upon by third party applications. As a result, some of this code will overlap into the the testcases for the Web Application Content Handling

Specifically there are five types of Microformats that will be supported "out of the box":

  • adr -- Used to specify addresses
  • hCard -- Used to encode digital business cards using VCARD style format
  • hCalendar -- Used to encode events using ICALENDAR style format
  • geo -- Used to encode location specific data (like coordinates)
  • tag -- Used to encode a tag for something, just an attribute-value pair

Since websites and extension authors can create their own Microformat defnitions, they must also test our own customized Microformat definitions.

Scope of planned testing

We plan to test this with a combination of Litmus test cases and automated methods.

Automated Testing

  • Use Mochitest to run automated test cases that will query and for and ensure that all elements of each "default" Microformat definitions are correctly parsed and interpretted
  • Use Mochitest for limit testing on the "default" Microformat definitions
  • Use Mochitest for automating a user-defined Microformat definition

Litmus Testing

  • Test default Microformat definitions that are malformed to ensure that proper error messages are displayed
  • Test Microformat definitions that are in the wild and are in use on public web sites
    • Quick test on each OS to see that each data type can launch third party applications/web services with meaningful data for the hCard, hCalendar, and Geo types (adr is essentially a part of hCard, and tag has no third party handler).
  • Test Microformat preferences in the preference panel
  • Test the Microformat UI for ease of use and discoverability

Further Testing

  • Create a Microformat handling extension that detects a custom Microformat and registers this Microformat definition with Firefox on startup.
  • Since this new API is primarily for extension developers, it would make sense to create a test extension with it to test the usability/completeness of the API as well.
  • This testing might get timeboxed.

Platform and Configurations

Many of the Microformats contain data that are best acted upon by third party applications and/or Web Applications. These data types and their popular applications have been folded into the matrix for Web Content Handling and exhaustive testing of data type handling will be tested under that purview. However, a few specific Microformat handling cases for default definition Microformats will be done under our Litmus test section above.

Major Test Areas

  • adr definition
    • Limit testing, all attributes parsed (Automated)
    • Test for error messages if malformed (Litmus)
  • tag definition
      • Limit testing, all attributes parsed (Automated)
      • Test for error messages if malformed (Litmus)
  • hCard definition
      • Limit testing, all attributes parsed (Automated)
      • Test for error messages if malformed (Litmus)
      • Test default application opens when handling on specified platform (Litmus)
      • Test hCard uses "in the wild"
      • Test discoverability "in the wild"
  • hCalendar definition
      • Limit testing, all attributes parsed (Automated)
      • Test for error messages if malformed (Litmus)
      • Test default application opens when handling on specified platform (Litmus)
      • Test hCalendar uses "in the wild" (Litmus)
      • Test discoverability "in the wild" (Litmus)
  • geo definition
      • Limit testing, all attributes parsed (Automated)
      • Test for error messages if malformed (Litmus)
      • Test default application opens when handling on specified platforms (Litmus)
      • Test geo uses "in the wild" (Litmus)
      • Test discoverability "in the wild" (Litmus)
  • custom definition
      • All attributes parsed (Automated)
      • Disappears on next session of Firefox (Litmus)
      • Can be registered at startup of Firefox (Litmus, using test extension)
  • UI
      • Preference panel for Microformats (Litmus)
      • Test discoverability process for Microformats (Litmus)
      • Test assignment process to assign Microformats to specific handlers (Litmus)
        • Test assigning Microformat to a handler that cannot support the data type (Litmus)
        • Test assigning Microformat to a web-service handler (Litmus)

Testing Notes

The tests currently checked into the tree do an adequate job of parsing hCard, hCalendar, and geo microformats. The tests for these will focus on the Microformats API as detailed in the specification. We will also test specific areas where values are excerpted, where values are specified as object or data tags, where different microformat types are included in other microformat types. For example, it's natural to include a geo and a rel-tag inside an hCard.

Tests will also focus on adding a new Microformat to the standard set of Microformats.

No UI will land for this feature before M9, so no Litmus tests will be created for it. Since Content Handling did not land, there will be no interaction between the content/protocol handling and the Microformated data. The only exception here will be if a way can be found to pass an information link i.e. a webcal:// link, to a protocol handler.

So, while the above testing guide is good in a perfect world, and I am loath to rearrange it for that reason, I need to re-state the priorities of this testing.

  • Mochikit API Tests
      • Ensure that complicated hCalendar/hCard/Geo/tag/adr built in Microformats work properly.
      • Create a new microformat and register it
        • Ensure new microformat parses correctly
      • Test availability of enclosed microformat types
      • Test alternative representations of microformat data - like object tags and data URLs.
      • Test excerpted and excepted values
      • Test specific APIs for robustness
      • Test for errors when invalid microformat text is detected
      • Test for errors when required microformat information is missing.
      • Test for invisible (and therefore illegal) tags

Schedule/milestones

Tests and code functionality are currently scheduled for Beta 1.

References