Difference between revisions of "Descriptive XML Smoke Test Scenarios"
(New page: '''Example Setup''' Examples found via: New -> Example ... -> Editing and validating XML files '''Open and Close Editor''' # Workspace XML file: open an XML file from the workspace and ...)
|Line 1:||Line 1:|
Revision as of 12:42, 17 September 2008
XML Smoke Test Scenarios
Examples found via: New -> Example ... -> Editing and validating XML files
Open and Close Editor
- Workspace XML file: open an XML file from the workspace and verify its content
- Non-workspace XML file: open an XML file from outside the workspace and verify its content. In addition, edit this file from an external editor and ensure a File changed dialog appears in Eclipse
- New element: add a new element from the Outline view via right clicking on the root element -> Add Child -> New Element ... (if the XML document has a schema, New Element ... will be replaced with a valid element to add)
- New comment: add a new comment from the Outline view via right clicking on any element and [AddChild | AddBefore | AddAfter] -> Comment
- New processing instruction: add new processing instruction from the Outline view view right clicking on the root element and Add Before -> Add Processing Instruction
- New attribute: add a new attribute from the Outline view via right clicking on an element -> Add Attribute
- New DTD Information: add DTD Information from the outline view via right click on the root element -> Add DTD Information ...
- New #PCData: if DTD Information was added, add #PCData from the Outline view via right clicking on an element -> #PCData;
- New CDATA: if DTD Information was added, add CDATA Section from the Outline view via right clicking on an element -> CDATA Section
- Repeat the previous Add/Modify tests using the Design view
- Make changes to the attributes or element values in Design view and verify changes by switching to the Source view
Selection Tests Go to various nodes like root and children nodes for testing synchronization between the properties, source, outline, and design views. The outline view should automatically expand it's hierarchy when selecting nodes in previously collapsed nodes in this view.
Drag & Drop Tests
- Reorder elements: drag elements in different order in Design View and in Outline View. In both cases, ensure both views are synchronized
- Create child elements: drag elements such that the newly dragged item is over a highlighted element. This makes the dragged element a child of the highlighted element. Do this in both Design View and Outline View and verify both views are synchronized
- Right click on a non-root element, attribute, DTD Information, PCData, CDATA, and processing instruction and select remove
- Remove the root element and ensure all children are removed
- As you type validation: select an XML file with a schema and insert or modify an entry that violates the schema. As you are typing, a red underline appears and if you mouse over the underlined text will show an error message
- Content assist: select an XML file with a schema and do CTRL+SPACE in the root element or in children elements to bring up possible elements to add. Do the same for an attribute by removing the attribute and using content assist to reinsert a valid attribute.
- Context menus: right click in the Design, Outline, and Source view to check the context menus
- Switching between Design and Source view: make sure changes to the source are reflected in the Design view
- Formatting: in the Source view, right click -> source -> Format. Now untab some elements by selecting elements and using SHIFT+TAB. To reformat, right click -> source -> Format.
- Toggle comment: in Source view, right click -> source -> Toggle Comment
- Add block comment: in Source view, right click -> source -> Add Block Comment
- Remove block comment: in Source view, right click while inside a block comment -> source -> Remove block Comment
File Creation & Saving
- Use save and save-as on XML files
- Close without saving, changes should not be committed
- Open existing XML file
- Create a new XML file via File -> New -> Other... -> XML folder -> XML. Try Create XML from a DTD file, Create XML file from XML Schema file, and Create XML file from an XML template
Right click on an XML file which has an XML Schema and select Validate. The expected result is a prompt indicating there where no warnings or errors. Modify the XML file such that the XML file is no longer valid based on the XML Schema
- Look for the red underline on the invalid entry
- Mouse over the invalid entry to see the error message
- Validate the invalid XML file and expect: a prompt with an error message, a red X in the Package Explorer view for the XML file, and the error reported in the Problem view
- Modify the value to make the XML file valid again and Validate. The errors should be removed.
- Rename: in the Package Explorer view, right click on an XML file -> Refactor -> Rename
- Move: in the Package Explorer view, right click on an XML file -> Refactor -> Move