wst validation
Validation Framework Preferences.
Vijay Bhadriraju
IBM Rational
November 14, 2005
Introduction
 

This document describes the various UI driven module level and global preferences provided by validation framework and how to test these preferences in the workbench. This testcase expects the validation component being installed from the wst sub project.

Global Validation Preferences
 

The global validation preference page is used to control all custom validators created extending the framework. The various control details on how to test them is explained below.

 
 

Verify the following items in the preferences page
1) Make sure Select All and Deselect All button check and uncheck all the validators.
2) Click Select All and then OK. Relaunch the preferences page and make sure all the validators are selected
3) Click Restore Defaults and then OK. Relaunch the preferences page and make sure the default as in the page above is selected.
4) Click Deselect All and make sure the following Check boxes are disabled
"Run validation when you manually build a project" (This preference is used when validation is run as part of manual build).
"Run validation automatically when you save changes to a resource" (This preference is used when validation is automatically triggered a part of auto build).

Module Validation Preferences
 

1) Make sure you are in the Project Explorer View. Create a new EAR Module named "Foo" with all default module (Application Client, Web, EJB, Connector modules).
1.1) Verify the following on FooEJB module
- Right click on the EJB project and make sure "Run Validation" pop up menu option is available. Select "Properties" -> Validation and make sure the validation properties page has following defaults selected.

- Select the Override validation preferences check box to enable the preferences in this page.
- Make sure "Select All" and "Deselect All" buttons check and uncheck all the validators.
- Click "Select All" and then OK. Relaunch the preferences page and make sure all the validators are selected
- Click Restore Defaults and then OK. Relaunch the preferences page and make sure the default as in the page above is selected.
- Click "Deselect All" and make sure all validator check boxes are disabled
- Unselect the check boxes "Run validation when you manually build a project","Run validation automatically when you save changes to a resource" in the Global Validation preferences page and make sure this is propagated to the FooEJB module Validation properties page i.e. the check boxes unselected in the Global preferences page should also be unselected for all J2EE modules.
- Select the "Override validation preferences" check box and make sure the controls in the page are enabled
- Open the EJB Deployment Descriptor using the XML editor. Remove the ending "display-name" tag from the ejb-xml file and save the DD to produce EJB validation error and warnings. Paste back the ending "display-name" tag from the ejb-xml file save the DD to verify the errors and warnings go off.
- Uncheck the "Run validation automatically when you save changes to FooEJB resource" check box. Remove the ending "display-name" tag from the ejb-xml file and save the DD and verify no validation errors or warnings are produced.
- Uncheck the "Run validation when you manually build FooEJB" check box. Select Project -> Rebuild project and make sure no validation errors or warnings are produced.
- Now check "Run validation when you manually build FooEJB" and Rebuild project. Make sure the validation errors or warnings appear in the task list.
- Make sure all the validators that are shown in the selected validators list also exist in the selected validator list in the Global Preferences page
- Create more than 25 errors or warnings in the task list for the FooEJB Module. Make sure the following information message "IWAD3000I: Some messages may be missing because the maximum number of messages has been reported. Increase the maximum number of messages and try again." appears when the errors or warnings items are more than 25.
- Change the "Maximum number of validation messages on FooEJB" from 25 to 100 and run validation by selecting Run Validation in the Pop up. make sure the above information message goes off and all the errors or warnings are displayed.
1.2) Verify all the above steps performed in 6.1 on FooEAR,FooClient,FooWeb,FooConnector projects

Custom Marker Support (New in M3)
 

The custom marker support is a new feature added for custom validators to provide a custom problem marker for the problems reported by the custom validator. The validation overview document talks about the implementation details of this feature. Currently this feature has been implemented for the EAR and EJB Validators and will be added to other J2EE validators in the next milestone. Here is the proceedure to test this feature.
1. Create an EAR project with an EJB module project in it
2. Create error or warnings conditions in the EAR and EJB projects that will lead to creating errors or warinings in the problems view.
3. In the upper right hand side of the problems view click the Filters.. button to view the filters dialog.

4. The EAR Validator Message and EJB Validator Message items in the Show items of type are the marker types that were added using the custom validator markers.
5. Uncheck the EAR Validator Message check box and click ok in the Filters dialog to close it. This action filters out the Error/Warning/Information problem markers that were put out by the EAR Validator.
6. Try step 5 for the EJB Validator message in which case the Errors/Warnings/Infomrational put out by the EJB Validator are filtered out.