TS 61 ProjectsActions
Projects Test Specification for Projects actions
Author: Tomas Musil
Last update: 02.05.2008
Introduction: Test basics of project action which can be called on j2se project
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
- 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: Run action is now context sensitive - which main class is ran depends now on context.
- Persistence of "Open as main project"
- Check persistence of "Open as main project" on open project dialog.
- EXPECTED RESULT: Should be off by default, but state should be remembered.
- Persistence of "Set as main project"
- Check persistence of "Set as main project" on new project wizard.
- EXPECTED RESULT: Should be on by default, but state should be remembered. (details for which projects is on/off are here: MainProjectConceptualChange
- 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 P2 should be invoked regardless of main project, action should be context sensitive
Test suite: Project actions
Purpose: Tests actions on project.
Setup: Start with fresh userdir. Create some sample project e.g. Anagrams game.
- Build project with CoS enabled
- Turn ON compile on save feature in project properties (right-click the project, invoke Properties, select Compiling section, uncheck Compile on Save)
- Invoke Build on project
- EXPECTED RESULT: A message saying the project is built automatically shows up. There are buttons "Project properties", "Clean and Build" and "OK".
- Build project with CoS disabled
- Turn OFF compile on save feature in project properties (right-click the project, invoke Properties, select Compiling section, uncheck Compile on Save)
- Invoke Build on project
- EXPECTED RESULT: A message saying the project is built automatically shows up. There are buttons "Project properties", "Clean and Build" and "OK".
- 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.
- Set main project
- Open some project as not main project (uncheck Open as main project checkbox during opening)
- Invoke Set main project on project
- EXPECTED RESULT: Project is set as main. Name of project node is bold. All project shortcuts (F6, F11, S-F11,...) are binded with this project.
- 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: 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 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.

