TS 69 JavaFX Project
Author: Alexandr Scherbatiy
Version: 1.2
Last update: 03 August 2010
Introduction:
Comments:
Contents |
Test suite: Project
Purpose:
Setup:
Create Empty JavaFX Script Application
- Invoke 'Tools | New Project...' from the main menu bar.
- Under Categories, select JavaFX.
- Under Projects, select JavaFX Application.
- Click Next.
- In the Project Name field, type JavaFXSmokeApp.
- Click Finish.
- EXPECTED RESULT: JavaFXSmokeApp should be created in the Projects window.
- EXPECTED RESULT: JavaFX Editor should be opened.
Create JavaFX Script Application From Sources
- Invoke 'Tools | New Project...' from the main menu bar.
- Under Categories, select JavaFX.
- Under Projects, select JavaFX Application.
- Click Next.
- In the Project Name field, type JavaFXAppFromSources.
- Select From Sources radio button.
- Press Add Folder... button.
- Browse to the JavaFX source folder.
- Click Finish.
- EXPECTED RESULT: JavaFXAppFromSources should be created in the Projects window.
- EXPECTED RESULT: .
Set as Main Project
- Create Project1 JavaFX project.
- Create Project2 JavaFX project.
- Right->click the Project1 and select Set as Main Project.
- EXPECTED RESULT: The Project1 should be highlighted as Main.
Rename Project
- Create Project1 JavaFX project.
- Right->click the Project1 and select Rename.
- Type Project2 for the project name
- Press rename button
- EXPECTED RESULT: The project name should be Project2.
Move Project
- Create Project1 JavaFX project.
- Right->click the Project1 and select Rename.
- Select new project location
- Press Move button
- EXPECTED RESULT: The project should be moved to the new location.
Delete Project
- Create Project1 JavaFX project.
- Right->click the Project1 and select Delete.
- Type Project2 for the project name
- Press Yes button
- EXPECTED RESULT: The project should be deleted.
Test suite: Build
Purpose:
Setup:
Clean Project
- Create Project1 JavaFX project.
- Right->click the Project1 and select Clean Project.
- EXPECTED RESULT: The build and dist directories should be deleted.
Build Project
- Create Project1 JavaFX project.
- Right->click the Project1 and select Build Project.
- EXPECTED RESULT: The build and dist directories should be created.
Build and Clean Project
- Create Project1 JavaFX project.
- Right->click the Project1 and select Clean and Build Project.
- EXPECTED RESULT: The build and dist directories should be deleted and created again.
Run Project
- Create Project1 JavaFX project.
- Right->click the Project1 and select Run Project.
- EXPECTED RESULT: The window with title "Application title" should appear.
Test suite: File
Create Empty JavaFX File
- Select javafxapp package under the project.
- Right-click and invoke New|Empty JavaFX File....
- Type MyFile for name.
- Press Finish.
- EXPECTED RESULT: Empty MyFile JavaFX Script file should be created.
- EXPECTED RESULT: The file should contain javafxapp package.
Create Package
- Select Source Packages node under the project.
- Right-click and invoke New|Java Package....
- Type test for name.
- Press Finish.
- EXPECTED RESULT: test package should be created.
Create JavaFX Class
- Select test package under the project.
- Right-click and invoke New|JavaFX Class....
- Type MyClass for name.
- Press Finish.
- EXPECTED RESULT: JavaFX Class MyClass should be created
package test; public class MyClass { }
Create Nested Package
- Select test package under the project.
- Right-click and invoke New|Java Package....
- Type nested for name.
- Press Finish.
- EXPECTED RESULT: test.nested package should be created.
Create JavaFX Stage
- Select test.nested package under the project.
- Right-click and invoke New|JavaFX Stage....
- Type MyStage for name.
- Press Finish.
- EXPECTED RESULT: MyStage JavaFX Script file should be created
import javafx.stage.Stage; import javafx.scene.Scene; import javafx.scene.text.Text; import javafx.scene.text.Font; /** * @author author */ Stage { title: "Application title" width: 250 height: 80 scene: Scene { content: [ Text { font : Font { size : 16 } x: 10 y: 30 content: "Application content" } ] } }
Create Java Class
- Select test.nested package under the project.
- Right-click and invoke New|Java Class....
- Type MyClass for name.
- Press Finish.
- EXPECTED RESULT: MyClass Java classshould be created
package test.nested; public class MyClass { }
Rename JavaFX Class
- Select test.MyClass JavaFX class under the project.
- Right-click and invoke Rename....
- Type RenamedClass for new name.
- Press OK.
- EXPECTED RESULT: The class should be renamed to RenamedClass.
Delete JavaFX Class
- Select test.RenamedClass JavaFX class under the project.
- Right-click and invoke Delete....
- Press Yes on Confirm Object Deletion dialog.
- EXPECTED RESULT: The class should be deleted from the project.
Copy File
- Create test1 package
- Create Main file under the test1 package
- Right->click the Main file and select Copy
- Create test2 package
- Right->click the test2 package and select Paste
- EXPECTED RESULT: The Main file should be copied.
Move File
- Create test1 package
- Create test2 package
- Create Main file under the test1 package
- Drag and Drop the Main file from test1 to test2
- EXPECTED RESULT: The Main file should be moved.
Cut and Paste File
- Create test1 package
- Create Main file under the test1 package
- Right->click the Main file and select Cut
- Create test2 package
- Right->click the test2 package and select Paste
- EXPECTED RESULT: The Main file should be moved.