TS 72 ProjectsActions
Projects Test Specification for Projects actions
Author: Tomas Musil, Adam Senk
Last update: 30.07.2013
Introduction: Test basics of project action which can be called on j2se project and export/improt in zip format.
Contents |
Test suite: Main Menu project concept
Purpose: Actions can be tied to main project, or to project which is in context.
Setup:
- Choosing main project
- Create two projects
- EXPECTED RESULT: In Run - Set Main project menu you can choose which of them will be main (or none of them). Try all possibilities.
- Actions for main project
- Have two projects with main classes,set one of them as main project
- Invoke Run (F6) while focus is in each Main class. (Try this also for Build, Clean and Build, Debug)
- EXPECTED RESULT: In both cases, main class of main project is ran
- Actions for non-main project
- Have two projects with main classes,none of them is main
- Invoke Run (F6) while focus is in each Main class. (Try this also for Build, Clean and Build, Debug)
- EXPECTED RESULT: IDE give you menu with as many options as there is projects. You choose one of theme and the project will be run. The project also is set as main.
- Project configuration in context
- Create main project P1, non main project P2
- Put project P2 into context
- Run | Set project configuration | Customize
- EXPECTED RESULT: Customizer of P1 should be invoked.
Test suite: Project actions
Purpose: Tests actions on project.
Setup: Start with fresh userdir. Create some sample project e.g. Anagrams game.
- Clean and build project
- Invoke Clean and Build on project
- EXPECTED RESULT: Project is cleaned and built, check JAR file in dist folder and *.class files in build folder.
- Clean project
- Invoke Clean on project
- EXPECTED RESULT: Project is cleaned. Dist and build folders are deleted.
- Run project
- Invoke Run on project
- EXPECTED RESULT: Project is ran.
- Debug project
- Put breakpoint into some source file
- Invoke Debug on project
- EXPECTED RESULT: Project is ran in debug mode, debugger stops at breakpoint.
- Test project
- Invoke Test on project
- EXPECTED RESULT: Tests of project are launched, output window with test results is opened.
- Open required projects
- Create new project called master
- Create new project called slave
- Set dependency on slave project using Libraries node of master project
- Close slave project
- Invoke Open required projects on master project
- EXPECTED RESULT: Slave project is opened.
- Rename project
- Invoke Rename on project
- Do not check to rename project folder
- EXPECTED RESULT: Only project display name is changed, project folder is the same.
- Rename project with project folder
- Invoke Rename on project
- Check to rename also project folder
- EXPECTED RESULT: Both project display name and project folder are changed.
- Move project
- Invoke Move on project
- Select target location
- EXPECTED RESULT: Project is successfully moved.
- Copy project
- Invoke Copy on project
- Select target location and project name
- EXPECTED RESULT: Project is successfully copied to target location with new name.
- Delete project
- Invoke Delete on project
- Do not check to delete also soources
- EXPECTED RESULT: Project is deleted, but under project folder remained sourceroot and testroot.
- Delete project with sources
- Invoke Delete on project
- Check to delete also sources
- EXPECTED RESULT: Project folder is deleted with its content.
Test suite: Project actions - multiple project selection
Purpose: Project-wide actions, such as Clean & Build, may now be run when multiple projects are selected.
Setup: Start with fresh userdir. Create two or more J2SE projects. Test all actions, when all projects in propject view are selected
- Clean and build multiple projects
- Invoke Clean and Build on multiple projects selected
- EXPECTED RESULT: All projects are cleaned and built, check JAR file in dist folder and *.class files in build folder.
- Clean multiple projects
- Invoke Clean on multiple project selected
- EXPECTED RESULT:All project are cleaned dist and build folders are deleted.
- Run multiple projects
- Invoke Run on multiple projects selected
- EXPECTED RESULT: All projects are ran.
- Debug multiple project
- Put breakpoint into some source file in each project
- Invoke Debug on multiple projects selected
- EXPECTED RESULT: All project are ran in debug mode, debugger stops at breakpoint.
- Test multiple project
- Invoke Test on multiple project selected
- EXPECTED RESULT: Tests of all projects are launched, output window with test results is opened.
- Rename multiple projects
- Invoke Rename on multiple projects selected
- Do not check to rename project folder
- EXPECTED RESULT:The rename action is invoked for each project.
- Move multiple project
- Invoke Move on multiple projects selected
- EXPECTED RESULT: The move action is invoked for each selected project.
- Copy multiple projects
- Invoke Copy on multiple projects selected
- EXPECTED RESULT: The copy action is invoked for each selected project.
- Delete multiple project
- Invoke Delete on project
- EXPECTED RESULT: The delete action is invoked for each selected project.
Test suite: Actions of files
Purpose: Tests other project related actions on files.
Setup: Create sample Anagram game project. Turn off compile on save feature in project properties!
- Compile single file
- Clean project
- Invoke action Compile File in context menu of some Java file
- EXPECTED RESULT: Selected Java file must be successfully compiled
- Run single file
- Select executable Java file under Project node (e.g. Anagrams.java)
- Invoke action Run File in its context menu
- EXPECTED RESULT: Selected Java file must be successfully executed
- Debug single file
- Select executable Java file under Project node (e.g. Anagrams.java)
- Set breakpoint somewhere in reachable code in opened file
- Invoke action Debug File in its context menu
- EXPECTED RESULT: Selected Java file must be successfully debugged
- Test single file
- Select Java file that has test - e.g. WordLibrary.java)
- Invoke action Run -> Run File -> Test filename
- EXPECTED RESULT: Test for selected file must be executed (no matter result)
- Debug test for single file
- elect Java file that has test - e.g. WordLibrary.java)
- Set breakpoint somewhere in reachable code in test file (WordLibraryTest.java)
- Invoke action Run -> Run File -> Debug Test for filename
- EXPECTED RESULT: Test for selected file must be debugged
- Compile single package
- Select some package
- Invoke action Compile Package
- EXPECTED RESULT: Selected Java package must be successfully compiled
- Run single file
- Select non-executable Java file under Project node
- Invoke action Run File in its context menu
- EXPECTED RESULT: Dialog that class does not have main method appears.
Test suite: Export/Import zip
Purpose: This test covers functionality of importing/exporting projects in zip format. (Since 7.2)
Setup: Start IDE with clean userdir. Create new J2SE sample project (e.g. AnagramGame)
- Export zip
- In Main menu select File | Export Project | To ZIP ...
- "Export Project(s) to Zip" window is invoked.
- "Root project" radio button is checked and "AnagramGame" project is selected to be exported as ZIP.
- Select path to export ZIP file.
- Click on "Export" button.
- EXPECTED RESULT: Project is exported as a ZIP. Check exported file (On correcr place should be placed correct ZIP file.)Dist, build and private directories should be excluded from ZIP file.
- Import ZIP
- Continue with project from previous test case.
- Invoke popup menu on AnagramGame project and select Delete.
- Chech "Also delete sources under ..."
- Push "Delete" button
- Project is closed and all project and source files are deleted.
- In Main menu select File | Import Project | From Zip ...
- Select exported ZIP file from previous test case.
- Select path to import the project (you can leave it default).
- Push "Import" button.
- EXPECTED RESULT:Project is unpacked and imported correctly. Check basic project action and imported directories and files.