Text of dev.w3.org › SVG › docs › SVGTestSuite-howto.html as Styx crawled it on Nov 19, 2026. The page may have changed since. Only its words are kept, without pictures or layout, and only the first part of a long page.

Open the live page

Making a new SVG 1.1 or 1.2 test case

How to make a new SVG 1.1 or 1.2 test Introduction A public SVG 1.1 testsuite has been published some years ago; in the meantime, the SVG 1.1 testsuite has continued to be developed - more tests added, tests corrected. SVG 1.2 is an upgrade to SVG 1.1, adding new features. It also has a test suite . To make a new test: Copy the appropriate template Rename it CVS add and commit the blank test into the svg directory , to reserve that test number Add your test material in the appropriate place in the file Document what the test does and how to pass it Set the owner , desc and status attributes to your initials, a one line description, and 'created' respectively.

Commit the test Add the details of the test to the Test Review section on the Wiki Find a reviewer and bug them to review it Check (and correct) the reference image, then set the status to imageOwnerReviewed Bug your reviewer to check the reference image and have them set the status to 'accepted' Remove the details of the test from the Test Review section on the Wiki Go to the Test Coverage section on the Wiki and mark off the assertion that your test covers Templates A blank svg template is the starting point for a new test.

For SVG Tiny 1.2, use template12-t.svg . For SVG 1.1, use template11-f.svg . The test suite scripts rely on these templates having been used. Copy this file and edit that copy to make your test. Note that this file contains both the actual test, and also the documentation for the test (in a different namespace). Naming conventions The first thing you need to decide is what filename to use for the new test. Filenames have the following structure: chapter-section-number-profile.svg .

For example, struct-snapshot-101-t.svg . The chapter part is an abbreviation of the chapter in the SVG 1.1 or SVG Mobile 1.2 specification, as appropriate. The section is an abbreviation of the section in that chapter where the feature is described. Here is a list of 1.1 chapter and section names and a list of Tiny 1.2 chapter and section names - your test chapter and section names must be picked from that list. If you pick a section that has no tests (and thus no short name) make a new one and document it in the list below so others use the same name. number is a number - SVG 1.2 tests start with 201 to allow the SVG 1.1 and 1.2 tests to be combined.

To reserve a number, first do a CVS update to see what tests already exist, then pick the next number in your section and check in a blank test (just the template) into CVS. profile is a letter designating the profile. For SVG 1.1 this was t or b or f for Tiny, Basic, or Full; for SVG 1.2 Tiny its always t and your template already has the appropriate letter. Directory structure There are separate directories for the original svg files, for processed svg files (where the test documentation has been stripped out), for images used by tests, for test harnesses (navigation structures to tie the tests into a test suite), and for reference images.

SVG 1.1 testsuite structure The 1.1 tests are under http://dev.w3.org/SVG/profiles/1.1F2/test/ htmlEmbed test suite harness using xhtml and the legacy 'embed' element htmlObject test suite harness using xhtml and the 'object' element imagePatches If Batik does not render a test correctly (eg for animation tests), this directory has a modified svg test that is rendered correctly. Alternatively, three raster images (for tiny, basic and full sizes) that are rendered correctly by some other implementation images external images (both raster and vector) used by svg tests png correctly rendered reference images, in PNG format, for the tests resources external resources, such as fonts, used by svg tests script scripts and other files for generating the test suite and associated status reports.

See README status config files, templates for tests, blank xml files for filling in the results of testing a particular implementation status/publish completed xml files with the results of testing a particular implementation. Used to make the implementation report. svg The original svg test files. Your new 1.1 test goes here. For creating a new test, you will only be concerned with the svg directory (and, if it uses external images, the images directory).

The SVG Tiny 1.2 testsuite has a very similar structure: SVG 1.2T testsuite structure The 1.2 Tiny tests are under repository/testsuite/1.2T archives archived zip files of particular release versions. htmlObjectHarness test suite harness using xhtml and the 'object' element imagePatches If Batik does not render a test correctly (eg for animation tests), this directory has a modified svg test that is rendered correctly.

Alternatively, three raster images (for tiny, basic and full sizes) that are rendered correctly by some other implementation images external images (both raster and vector) used by svg tests png correctly rendered reference images, in PNG format, for the tests script scripts and other files for generating the test suite and assocuiated status reports status config files, templates for tests, blank xml files for filling in the results of testing a particular implementation status/publish completed xml files with the results of testing a particular implementation.

Used to make the implementation report. svg The original svg test files. Your new 1.2T test goes here. svggen Generated svg files for publication, made from the original test files by stripping out the test documentation. svgHarness test suite harness using the svg 1.2T animation element Adding your test material The SVG for your test all goes inside a particular g element, replacing the comment: <g id="test-body-content"> <!-- put all of the actual test here --> </g> Any SVG that you put outside this group may be discarded by the test generating process.

This includes defs elements, fonts, etc. They all go inside this group. If you really, really need something to be outside this group (eg, a UTF-16 test) then mail the working group; the scripts for test generation may need to be specially modified for individual special tests. Tests should be designed to clearly show the essential feature being tested, and to make lack of conformance visually obvious. Test instructions Your template has xhtml 'p' elements).

Put the instructions for running the test here, adding more elements as required. First, briefly explain the purpose of the test. Then, briefly explain what someone should look for when running the test, to tell if an implementation passed or failed the test. Preferably, the user should be able to do this quickly, without reloading the test, without looking at the source code. Lastly, give any further details of the test (incluuding reference to individual elements, ids etc) that will help others understand how the test works (if it is at all unclear or complicated), eg an implementor trying to see why their implementation exactly fails.

Reviewing tests Once created, tests are reviewed and accepted by the Group. The review status is in the test itself, in several attributes on the SVGTestCase element. This information is used to generate summaries: see the SVG 1.1 Test suite summary table . The owner attribute The owner attribute holds the initials of the test owner (you). They are the same initials as are used in taking minutes, see list of people . For example, owner="SH" The reviewer attribute The initals of the person who reviews your test.

If you don't know who this is, leave it blank and ask on the mailing list for a reviewer. For example, reviewer="CL" The status attribute The values of the status attribute and their meanings are: empty An empty test has been created for the test. A copy of the template has been checked into CVS, to reserve a particular number. created A preliminary version of the test has been created. SVG has been added to the test, and the SVGTestCase element has been filled in to explain how to run the test.

Send mail to the reviewer, asking for review. Its helpful to no

The rest of this page is on the live site.