Auto-tools/Projects/CrossWeave/Test Format: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
The test files used by CrossWeave are all written in JSON; these drive the test.  There is no scripting required to create test cases.
The test files used by CrossWeave are all written in JSON; these drive the test.  There is no scripting required to create test cases.


The general format of a CrossWeave test is as follows:
The general format of a CrossWeave test is as follows, shown without the JSON formatting characters:


  setup
  setup
Line 40: Line 40:
As a simple example, without explaining the format, a short list of bookmarks might look like this:
As a simple example, without explaining the format, a short list of bookmarks might look like this:


   "bookmarks-after-second-update": {
   "bookmark-list-1": {
     "menu": [
     "menu": [
       { "uri": "http://www.apple.com/iphone/", "title": "iPhone" },
       { "uri": "http://www.apple.com/iphone/", "title": "iPhone" },

Revision as of 17:33, 20 May 2010

The test files used by CrossWeave are all written in JSON; these drive the test. There is no scripting required to create test cases.

The general format of a CrossWeave test is as follows, shown without the JSON formatting characters:

setup
  profiles: [profile1, profile2, ..., profile-n]
asset-list-1
...
asset-list-n
phase-1:
  profile: profile1
  actions: [action1, action2, ..., action-n]
phase-2:
  profile: profile2
  actions: [action1, action2, ..., action-n]
...
phase-n:
  profile: profile1
  actions: [action1, action2, ..., action-n]

The Setup Block

The setup block just lists the profiles that will be used during the test. CrossWeave creates these profiles before Firefox is launched. The profiles can be given any names. A complete setup block might look like:

 "setup": { 
   "profiles": ["profile1", "profile2", "profileGesundheit"]
 },

Asset Lists

A test file will contain one or more asset lists, which are lists of bookmarks, passwords, or other types of browser data that are relevant to Weave. The format of these asset lists vary depending on asset type, and are explained in detail at these links:

As a simple example, without explaining the format, a short list of bookmarks might look like this:

 "bookmark-list-1": {
   "menu": [
     { "uri": "http://www.apple.com/iphone/", "title": "iPhone" },
     { "uri": "http://bugzilla.mozilla.org/show_bug.cgi?id=%s", "title": "Bugzilla", "keyword": "bugzilla" },
     { "separator": true },
     { "uri": "http://www.mozilla.com" }
   ]
 },