Jump to: navigation, search

Difference between revisions of "XSLT Tools/SmokeScenarios"

(New page: These tests are based on chapter 17 of the [http://www.cafeconleche.org/books/bible2/chapters/ch17.html XML Bible: XSLT]. This chapter is also a good introduction for those that aren't fa...)
 
(See Also)
 
(6 intermediate revisions by one other user not shown)
Line 20: Line 20:
 
# Save the File.
 
# Save the File.
 
# Verify that Validation is working as expected.
 
# Verify that Validation is working as expected.
 +
## Make a change that invalidates the XSL file.
 
# Verify that Validation Preferences can be changed.
 
# Verify that Validation Preferences can be changed.
  
 +
==Scenario 2: Simple Transformation==
 +
This test uses the file that was created in Scenario 1.
  
==Launching, Debugging==
+
# Create a new XSL Launch Configuration.
 +
# Input file is the Atomic Table XML file from Listing 17-1.
 +
# The XSL files is the file that was created in Scenario 1.
 +
# Leave output filename as default, this should create a file that is the Input file with out.xml as the extension.
 +
# Select the Processor to use.
 +
## Test should be run with the Default JRE processor
 +
## Test should be run with the Xalan 2.7.1 processor
 +
# View the output of the file created.
  
;Open and Close Editor
+
==Scenario 3: Namespace Content Assistance Testing==
:Ensure views are maintained
+
  
;Add Tests
+
This scenario tests that the non-XSL content assistance for Namespaced Grammar assistance is working.  This functionality is
: Element (From Design and Outline)
+
inherited from the XML editor.
: Complex Type
+
: Simple Type
+
: Attribute
+
: Attribute Group
+
: Groups
+
: Modify names
+
: Attribute Refs and modify refs
+
  
;Selection Tests
+
# Create a new XSL File by using the New XSL File Wizaard.
: Synchronization between views (Properties, Graph, Source, Outline)
+
## Give the XSL File a name like Scenario1.xsl
 +
## Select a normal XSL Stylesheet.
 +
# Create an XML Catalog entry for the XHTML namespace.  The XSD to use for the catalog entry is http://www.w3.org/2002/08/xhtml/xhtml1-transitional.xsd
 +
# Using the XSL Editor, create the styelsheet in Listing 17-2.
 +
## set the default namespace to xmlns="http://www.w3.org/1999/xhtml" on the xsl:stylesheet element.
 +
## Test content assistance for the XSL Elements.
 +
## Test content assistance for the XHTML elements.
 +
### Note that currently that within non-xsl elements there isn't content assistance for the elements until an XSL element is added.
 +
# Save the File.
 +
# Verify that Validation is working as expected.
 +
## Make a change that invalidates the XSL file.
 +
# Verify that Validation Preferences can be changed.
  
;Delete Tests
+
==Scenario 4: Content Assistance for XPath Functionality==
: Delete globals and locals
+
  
;Drag and Drop
+
# Create a new XSL File by using the New XSL File Wizaard.
: Elements in a sequence
+
## Give the XSL File a name like Scenario4.xsl
 
+
## Select a normal XSL Stylesheet.
;Source Editing
+
# Using the XSL Editor, create the styelsheet in Listing 17-10.
:As you type validation
+
## Test content assistance for the XSL Elements.
:Content Assist
+
## Test content assistance for the XHTML elements.
:Context Menus
+
## Test content assistance for the select attribute of the '''xsl:value-of''' attribute.
:Switch back to the graph view and ensure it is refreshed with any source changes
+
### Test with no prefilled proposals.
 
+
### Test with part of ''par'' typed
;Extensions
+
### Test content assistance after parent::
:Add and delete extensions
+
# Save the File.
:Add attributes
+
# Verify that Validation is working as expected.
 
+
## Make a change that invalidates the XSL file.
;Constraints
+
## Verify that Validation on XPath statements is workingMake the XPath invalidi.e. change parent:: to tarent::.
:Change lengths
+
# Verify that Validation Preferences can be changed.
:Add enumerations
+
# Set up a Launching Scenario, and verify that launching works (see Scenario 2).
 
+
;Refactoring
+
:Rename a complex type
+
 
+
;File creation & saving
+
:Save/Save As
+
:Close without saving
+
:Open existing file
+
:Create new file using new XSD file wizard
+
 
+
;Validation
+
:Disconnected mode
+
:Dependency validation as of WTP3.0M7Add validation builder to the projectIntroduce a change to a schema that will invalidate an xml file. Ensure the XML file is automatically validated with an error.
+
  
;XML Catalog
+
==Scenario 5: Debugging==
:Resolve schemas in jars
+
:Test the Next Catalog.  Export and Import catalog files.
+
  
;Properties
+
Need Debugging Scenario
:Attributes - Value Default and Fixed and Form
+
:Attribute Refs
+
  
;Generators
+
==Scenario 6: XPath View==
:Generate an XML file from an XSD file
+
  
;Unused Imports (New to 3.0.1)
+
Need XPath View testing
:Check preferences under XML->XML Schema Files
+
:Test that unused imports and includes are removed
+
  
 
=See Also=
 
=See Also=
 
[[WTP Smoke Test Results | Click here to view WTP smoke test results.]]
 
[[WTP Smoke Test Results | Click here to view WTP smoke test results.]]
  
[[Category:XSL Tools]]
+
[[Category:XSL Tools| ]]

Latest revision as of 23:10, 12 September 2008

These tests are based on chapter 17 of the XML Bible: XSLT. This chapter is also a good introduction for those that aren't familiar with XSLT and need a primer on getting started.

Prereqs

  • Create a Project to hold the XML and XSL files. This project will also hold the output for the transformations.
  • Create an XML file that contains the periodic table from Listing 17-1.

XSL Tools Smoke Test Scenarios

The following scenarios will test the basic functionality of the editor. These scenarios are broken into several sections that will test options of the XSL Tools editor and plugins from end to end.

Scenario 1: Simple XSL Stylesheet Editing Test

  1. Create a new XSL File by using the New XSL File Wizaard.
    1. Give the XSL File a name like Scenario1.xsl
    2. Select a normal XSL Stylesheet.
  2. Using the XSL Editor, create the styelsheet in Listing 17-2.
    1. Test Content Assistance for XSLT elements.
      1. Note that currently that within non-xsl elements there isn't content assistance for the elements until an XSL element is added.
  3. Save the File.
  4. Verify that Validation is working as expected.
    1. Make a change that invalidates the XSL file.
  5. Verify that Validation Preferences can be changed.

Scenario 2: Simple Transformation

This test uses the file that was created in Scenario 1.

  1. Create a new XSL Launch Configuration.
  2. Input file is the Atomic Table XML file from Listing 17-1.
  3. The XSL files is the file that was created in Scenario 1.
  4. Leave output filename as default, this should create a file that is the Input file with out.xml as the extension.
  5. Select the Processor to use.
    1. Test should be run with the Default JRE processor
    2. Test should be run with the Xalan 2.7.1 processor
  6. View the output of the file created.

Scenario 3: Namespace Content Assistance Testing

This scenario tests that the non-XSL content assistance for Namespaced Grammar assistance is working. This functionality is inherited from the XML editor.

  1. Create a new XSL File by using the New XSL File Wizaard.
    1. Give the XSL File a name like Scenario1.xsl
    2. Select a normal XSL Stylesheet.
  2. Create an XML Catalog entry for the XHTML namespace. The XSD to use for the catalog entry is http://www.w3.org/2002/08/xhtml/xhtml1-transitional.xsd
  3. Using the XSL Editor, create the styelsheet in Listing 17-2.
    1. set the default namespace to xmlns="http://www.w3.org/1999/xhtml" on the xsl:stylesheet element.
    2. Test content assistance for the XSL Elements.
    3. Test content assistance for the XHTML elements.
      1. Note that currently that within non-xsl elements there isn't content assistance for the elements until an XSL element is added.
  4. Save the File.
  5. Verify that Validation is working as expected.
    1. Make a change that invalidates the XSL file.
  6. Verify that Validation Preferences can be changed.

Scenario 4: Content Assistance for XPath Functionality

  1. Create a new XSL File by using the New XSL File Wizaard.
    1. Give the XSL File a name like Scenario4.xsl
    2. Select a normal XSL Stylesheet.
  2. Using the XSL Editor, create the styelsheet in Listing 17-10.
    1. Test content assistance for the XSL Elements.
    2. Test content assistance for the XHTML elements.
    3. Test content assistance for the select attribute of the xsl:value-of attribute.
      1. Test with no prefilled proposals.
      2. Test with part of par typed
      3. Test content assistance after parent::
  3. Save the File.
  4. Verify that Validation is working as expected.
    1. Make a change that invalidates the XSL file.
    2. Verify that Validation on XPath statements is working. Make the XPath invalid. i.e. change parent:: to tarent::.
  5. Verify that Validation Preferences can be changed.
  6. Set up a Launching Scenario, and verify that launching works (see Scenario 2).

Scenario 5: Debugging

Need Debugging Scenario

Scenario 6: XPath View

Need XPath View testing

See Also

Click here to view WTP smoke test results.