Difference between revisions of "Submission"

From WEBAPPS
Jump to: navigation, search
m (Test Repository Structure)
(This doc has been replaced by http://www.w3.org/wiki/Webapps/Testing)
 
Line 1: Line 1:
The primary focus of this document is to describe the test case submission process for the Web Applications WG (aka WebApp). In particular, the document describes the WG's test depository structure and how WG members and non-WG members may contribute test cases.
+
'''This document has been obsoleted, replaced by WebApps' new [http://www.w3.org/wiki/Webapps/Testing Github-based Testing wiki].
 
+
'''
Comments on this document are welcome and should be submitted to the WG's <code>[mailto:public-webapps-testsuite@w3.org public-webapps-testsuite]</code> e-mail list ([http://lists.w3.org/Archives/Public/public-webapps-testsuite/ archive]).
+
 
+
 
+
==Test Licensing==
+
 
+
All of the tests in WebApps' test suites are intended to be released under both the [http://www.w3.org/Consortium/Legal/2008/04-testsuite-license.html W3C Test Suite license] and the [http://www.w3.org/Consortium/Legal/2008/03-bsd-license.html 3-clause BSD license].
+
 
+
If a Contributor is a member of WebApps, there is no need to complete any license forms. However, if a Contributor is not a member of WebApps, the Contributor must grant permission to distribute their contribution under these two licenses, and this requires completing the [http://www.w3.org/2002/09/wbs/1/testgrants2-200409/ W3C's license grant form].
+
 
+
== Test Repository Structure ==
+
 
+
The WG uses the W3C's Hg (Mercurial) source control tool for its tests. WebApps' Hg and Mirror roots are as follows:
+
 
+
* Hg Root: [http://dvcs.w3.org/hg/webapps/ <code>http://dvcs.w3.org/hg/webapps/</code>]
+
* Mirror Root: [http://w3c-test.org/webapps/ <code>http://w3c-test.org/webapps/</code>]
+
 
+
The structure of the repository, is:
+
 
+
* <code>.../webapps/[SPECIFICATION]/</code>
+
* <code>.../webapps/[SPECIFICATION]/tests/Status.html</code>
+
* <code>.../webapps/[SPECIFICATION]/tests/approved/</code>
+
* <code>.../webapps/[SPECIFICATION]/tests/submissions/[CONTRIBUTOR]/</code>
+
 
+
Where:
+
 
+
* SPECIFICATION is a short name of a specification e.g. XMLHttpRequest, WebWorkers
+
* CONTRIBUTOR is the name of the submitter / contributor e.g. CompanyA, ContributorName
+
* The ''Status.html'' file is described in [[Approval]]
+
* The ''submissions'' directory will have a different directory for each Contributor that submits test cases.
+
* The ''approved'' directory only includes those test cases that have been approved as described in [[Approval]]. Contributors should not put test cases in this directory without prior consent.
+
 
+
The WG's repository also includes the general directories for testing-related resources e.g. resources that are shared among the various test suites:
+
 
+
* <code>.../webapps/tests/</code>
+
* <code>.../webapps/tests/resources/</code>
+
 
+
== Test Case Requirements ==
+
 
+
The group has agreed that all tests need to be written in the following manner:
+
 
+
# Tests should use the JavaScript harness described in [[Harness]]
+
# If a test is a visual test (not API specific) a Reference Test (aka RefTest) must be created. Note that ''-ref'' must be added to the testcase name to identify the ''reference'' page. For some information on RefTests, see:
+
## [http://wiki.csswg.org/test/reftest RefTests] by the CSS WG
+
## [https://developer.mozilla.org/en/Creating_reftest-based_unit_tests Creating reftest-based unit tests] by Mozilla
+
# The final option is a ''self-describing test'' and should be used only when a JavaScript or a RefTest is not appropriate.
+
 
+
==How to Submit a New Test - The Short Version==
+
 
+
A Contributor can submit tests by:
+
 
+
# Submitting the tests directly to [http://dvcs.w3.org/hg/webapps/ WebApp's Hg repository]. However, if you are not a W3C member and do not have write access to this repository, then any public location is ok.
+
# Notifying the WG of the submission or the intent to submit by sending an e-mail to the <code>[mailto:public-webapps-testsuite@w3.org public-webapps-testsuite@w3.org]</code> mailing list, describing the test cases submitted or the test cases available for sumbmission, and, if the Contributor is not a WG member, granting permission for their use as described in the licensing section above.
+
 
+
Please make sure submissions target one of WebApps' [http://www.w3.org/2008/webapps/wiki/PubStatus specifications].
+
 
+
All tests are subject to the approval process as described in [[Approval]].
+
 
+
Contributors may be asked to make updates to their submitted test cases, if, for example, a test case does not meet the test case requirements listed above, the test case has a bug, etc.
+
 
+
== How to Submit New Tests - The Long Version ==
+
 
+
# Install Mercurial
+
# Pull The Respository
+
## <code>hg clone https://dvcs.w3.org/hg/webapps/</code>
+
# Prepare a Directory in the Staging Area
+
## Go to the <code>[SPECIFICATION]/tests/submissions/</code> directory in the staging area.
+
## If you already have a directory for yourself or your group, use it; otherwise create a new directory.
+
# Write Your Test Case
+
## Write a test case <span style="color:#ff0000">'''@@@ TBD: add a link to an example'''</span>
+
# Commit your test case
+
## Set your W3C username in your global mercurial configuration.
+
## In the <code>[paths]</code> section of the <code>.hg/hgrc</code> file ''inside the top level of your clone'' of the repository, add the line:  <code>default-push = https://[USERNAME]@dvcs.w3.org/hg/webapps/</code>
+
## Use <code>hg add</code> to add the new files.  (See <code>hg help add</code>.  Or, if you want to be fancy, you can use <code>hg addremove</code>; see <code>hg help addremove</code>.)
+
## Run <code>hg diff</code> to see what you're going to commit and then use <code>hg commit</code> (with a good commit message, the <code>-m</code> option).  (For more information, see <code>hg help commit</code> and <code>hg help diff</code>.)
+
## Run <code>hg outgoing</code> to see what you're about to push and then <code>hg push</code> to push to the repository.
+
### If you're told that the push creates new remote heads, you need to merge with them.  At this point, you have two options:
+
#### <code>hg pull</code>, <code>hg merge</code>, and <code>hg commit -m"Merge."</code>, and then try pushing again.
+
#### rebase your changesets either using the rebase extension or using mq
+
# Notify the WG of the submission by sending an e-mail to the <code>[mailto:public-webapps-testsuite@w3.org public-webapps-testsuite@w3.org]</code> mailing list, describing the test cases submitted.
+

Latest revision as of 16:09, 17 May 2013

This document has been obsoleted, replaced by WebApps' new Github-based Testing wiki.