W3C Test Writing Tutorials

Setup

Complete all steps before proceeding




Press down for additional steps



Reftest Overview

  • Two files: Test file + Reference file
  • Test file uses the feature you're testing
  • Reference file is an exact visual match without using the feature you're testing
  • Self-describing (works both manually and with automation)
  • Cross-browser & cross-platform

Directory structure


  • CSSWG Test Repository
      • contributors
        • ttwf
          • your_csswg_id
            • incoming
            • submitted


Congratulations!



You have completed both a W3C Reftest and JavaScript Test






Reference Slides

Mercurial Command Reference


  • Basic Commands:
    • hg pull (gets the latest changes from the CSSWG Test repo)
      • To update after pull, use: hg pull -u (alleviates need to do hg update)
    • hg update (applies the latest changes pulled to your local repo)
    • hg status (displays list of locally changed files)
    • hg add (stages a new or modified local file for commit)
    • hg remove (stages the removal of a local file for commit)
    • hg merge (merges local changes with updates pulled from CSSWG Test repo)
    • hg commit (commits local changes to local repository)
      • To include commit message, use: hg commit -m "Commit message here"
    • hg push (pushes local changes to the CSSWG Test repository)


Press down for more

  • User wants to update their local repo:
    • hg pull -u (pulls and applies latest changes from CSSWG repo to local repo)
  • User wants to push local changes:
    • hg status (check which files are stages for commit)
    • hg add fileName (stages file for commit, repeat for each file)
    • hg status (confirm all files are stages for commit)
    • hg commit -m "Commit message here" (Commit to local repo)
    • hg push (pushes locally committed changes to CSSWG Test repo)



Press down for more

  • User gets error message during push
                                               
    abort: push creates new remote head ...
                                                
                                            
    • hg pull (gets newest changes from CSSWG Test repo)
    • hg merge (merges newest changes from CSSWG Test repo with local changes)
    • hg commit -m "Merge" (commits the merge to local repo)
    • hg push (pushes changes to CSSWG Test repo)