Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
JSDTestScenarios
Contents
JSDT Functional Testing Scenarios
JUnit Automated Plugin Tests
There are 4 JUnit plugins for automated JSDT testing:
- org.eclipse.wst.jsdt.core.tests.compiler
- org.eclipse.wst.jsdt.core.tests.model
- org.eclipse.wst.jsdt.web.core.tests
- org.eclipse.wst.jst.web.ui.tests
Basic Editor Functional Testing
The following functions should be verified for the standalone JavaScript editor
- Syntax Highlighting (verify JavaScript coloring)
- Folding / Line Numbers
- Outlining (create prototype class definition and verify in outline)
- Highlight and check of matching bracket / parenthesis
- Auto-complete of brackets, parenthesies and indentation
- Mark Occurrence
- Comment Toggle (line and block)
- Generate Element JsDoc
- Code Completion / Content Assist
- Hover Help that display element declaration and JsDoc or Error message
- Syntax Error/Warning checking
- Flow analysis (verify with an unreachable return)
- Quick-fix for unresolved fields and types.
- Surround with do, for, try/catch, while
- Completion Templates (invoke content assist after do)
- Extract Function/Change function signature
- Indentation Correction
- Open Declaration
- Open Type Hierarchy
- Open Call Hierarchy
- Code Formating
The following functions should be verified for the HTML/JavaScript editor
- Syntax Highlighting (veri* Outlining (create prototype class definition and verify in outline)
- Highlight and check of matching bracket / parenthesis
- Auto-complete of brackets, parenthesies and indentation
- Mark Occurance
- Generate Element JsDoc
- Code Completion / Content Assist
- Hover Help that display element declaration and JsDoc or Error message
- Syntax Error/Warning checking
- Flow analysis (verify with an unreachable return)
- Completion Templates (invoke content assist after do)
- Extract Function/Change function signature
- Code Formating
- Page includes (<script src="file1.js"> </script>, add functions to file1.js and make sure they aren't marked as error when the proper file is included in HTML page. also remove the include and verify that the function is marked in error)
Preference Page Verification
Verify that the General JavaScript preference page has the following main nodes:
-JavaScript - Apperance - Members Sort Order - Code Style - Clean UP - Code Templates - Formater - Editor - Content Assit - Advanced - Folding - Hovers - Mark Occurrence - Save Actions - Syntax Coloring - Templates - Typeing - Include Path - Include Path Variables - User Libraries - Validator - Errors/Warning - Jsdoc - Task Tags
For a Project:
-JavaScript - JavaScript Code Style - Clean UP - Code Templates - Formater - JavaScript Editor - Save Actions - JavaScript Libraries - JavaScript Validator - Errors / Warnings - JsDoc - Task Tags - Validating - JsDoc Location
WTP Build Smoke Test for JSDT
- New JavaScript project
- Add an IE or FireFox library to the project
- Add a Js source file, verify Basic Editor Function as stated above
- New Static Web Project
- Create a HTML file, add a <script></script region
- verify the HTML/JavaScript function as mentioned above.
- Check Help-->Contents->JavaScript Development Toolkit Users Guide
- Verify Preference pages as listed above