Auto-tools/Projects/CrossWeave: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
 
(14 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== Introduction ==
This page is obsolete, documentation for TPS (formerly Crossweave) may now be found at https://developer.mozilla.org/en/TPS
 
CrossWeave is a new, data-driven automation framework for testing client/server interactions in Weave using a Firefox extension.  CrossWeave is distinct from, and complementary to, other test projects for Weave:
 
* [[Labs/Weave/Testing|unit tests]]
* [[QA/Weave_Test_Plan/Client_Manual_Testing|manual client testing]]
* [[Weave_Load_Test_Plan|load testing]]
 
CrossWeave does not use the Weave UI, but does use the Weave extension code for all Weave server access; e.g., it imports <code>resource://weave/service.js</code> and uses <code>Weave.Service.sync()</code> to sync with the Weave service.  In this way it tests both the Weave client and the Weave server for things such as account access, data synchronization, and conflict resolution.
 
The CrossWeave project is currently not tied to a specific Weave release; in particular, it will not necessarily be ready in time to be useful for Weave 1.3.
 
== How it works ==
 
CrossWeave consists of a Firefox extension of the same name, along with a python test runner.  The python test runner will read a test file (in JSON format), setup a Firefox profile with the necessary extensions and preferences, then launch Firefox and pass the test file to the CrossWeave extension.  The extension will read the test file and perform a series of actions specified therein, such as populating a set of bookmarks, syncing to the weave server, making bookmark modifications, etc.
 
A test file may contain an arbitrary number of sections, each involving the same or different profiles, so that one test file may be used to test the effect of syncing and modifying a common set of data (from a single Weave account) over a series of different events and clients.
 
The easiest way to understand this is to look at a simple CrossWeave test file.
 
{
  "setup": {
    "profile": ["profile1", "profile2"],
    "weaveaccount": "crossweave",
  },
  "bookmarks-initial": [
    { "uri": "http://www.google.com", "location": "menu",
      "changes": { "title": "Google" } },
    { "uri": "http://www.yahoo.com", "location": "menu/foldera", "title": "testing Yahoo",
      "changes": { "location": "menu/folderb" } },
    ],
    "bookmarks-post-change": [
    { "uri": "http://www.google.com", "title": "Google", "location": "menu" },
    { "uri": "http://www.yahoo.com", "location": "menu/folderb", "title": "testing Yahoo" },
    ],

Latest revision as of 22:57, 5 July 2011

This page is obsolete, documentation for TPS (formerly Crossweave) may now be found at https://developer.mozilla.org/en/TPS