TS 69 JavaFX Project

(Difference between revisions)
(Created page with '==Project Tests Specification== '''Author:''' [mailto:sunflower@netbeans.org Alexandr Scherbatiy] <br> '''Version:''' 1.1 <br> '''Last update:''' 01 October 2009 <br> '''Introdu…')
({{testcase|Cut and Paste File}})
 
(14 intermediate revisions not shown)
Line 1: Line 1:
-
==Project Tests Specification==
 
'''Author:''' [mailto:sunflower@netbeans.org Alexandr Scherbatiy] <br>
'''Author:''' [mailto:sunflower@netbeans.org Alexandr Scherbatiy] <br>
-
'''Version:''' 1.1 <br>
+
'''Version:''' 1.2 <br>
-
'''Last update:''' 01 October 2009 <br>
+
'''Last update:''' 03 August 2010 <br>
'''Introduction:'''  <br>
'''Introduction:'''  <br>
'''Comments:'''  <br>       
'''Comments:'''  <br>       
Line 9: Line 8:
__TOC__
__TOC__
        
        
-
====Test suite: Project====
+
==Test suite: Project==
Purpose:  <br>
Purpose:  <br>
Setup:  <br>
Setup:  <br>
      
      
-
# {{testcase|Create Empty JavaFX Script Application}}
+
=== {{testcase|Create Empty JavaFX Script Application}} === 
-
   
+
# Invoke 'Tools | New Project...' from the main menu bar.         
-
## Invoke 'Tools | New Project...' from the main menu bar.
+
# Under Categories, select JavaFX.         
-
          
+
# Under Projects, select JavaFX Application.         
-
## Under Categories, select JavaFX.  
+
# Click Next.         
-
          
+
# In the Project Name field, type JavaFXSmokeApp.         
-
## Under Projects, select JavaFX Application.  
+
# Click Finish.         
-
          
+
#* {{result|EXPECTED RESULT: JavaFXSmokeApp should be created in the Projects window. }}             
-
## Click Next.  
+
#* {{result|EXPECTED RESULT: JavaFX Editor should be opened. }}             
-
          
+
 
-
## In the Project Name field, type JavaFXSmokeApp.  
+
=== {{testcase|Create JavaFX Script Application From Sources}} === 
-
          
+
# Invoke 'Tools | New Project...' from the main menu bar.        
-
## Click Finish.  
+
# Under Categories, select JavaFX.         
-
          
+
# Under Projects, select JavaFX Application.         
-
#* {{result|EXPECTED RESULT: JavaFXSmokeApp should be created in the Projects window. }}  
+
# Click Next.         
-
              
+
# In the Project Name field, type JavaFXAppFromSources.         
-
#* {{result|EXPECTED RESULT: JavaFX Editor should be opened. }}  
+
# Select ''From Sources'' radio button.         
-
              
+
# Press ''Add Folder...'' button.      
-
# {{testcase|Create JavaFX Script Application From Sources}}
+
# Browse to the JavaFX source folder.      
-
   
+
# Click Finish.      
-
## Invoke 'Tools | New Project...' from the main menu bar.
+
#* {{result|EXPECTED RESULT: JavaFXAppFromSources should be created in the Projects window. }}          
-
       
+
-
## 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.  
+
-
       
+
-
#* {{result|EXPECTED RESULT: JavaFXAppFromSources should be created in the Projects window. }}  
+
-
           
+
#* {{result|EXPECTED RESULT: . }}  
#* {{result|EXPECTED RESULT: . }}  
-
           
+
         
-
# {{testcase|Set as Main Project}}
+
=== {{testcase|Set as Main Project}} ===
-
   
+
# Create Project1 JavaFX project.         
-
# {{testcase|Rename Project}}
+
# Create Project2 JavaFX project.         
-
   
+
# Right->click the  Project1 and select Set as Main Project.         
-
# {{testcase|Move Project}}
+
#* {{result|EXPECTED RESULT: The Project1 should be highlighted as Main. }}
-
   
+
 
-
# {{testcase|Delete Project}}
+
=== {{testcase|Rename Project}} ===
 +
# Create Project1 JavaFX project.         
 +
# Right->click the  Project1 and select Rename.
 +
# Type Project2 for the project name
 +
# Press rename button         
 +
#* {{result|EXPECTED RESULT: The project name should be Project2. }}
 +
 
 +
=== {{testcase|Move Project}} ===
 +
# Create Project1 JavaFX project.         
 +
# Right->click the  Project1 and select Rename.
 +
# Select new project location
 +
# Press Move button         
 +
#* {{result|EXPECTED RESULT: The project should be moved to the new location. }}
 +
 
 +
=== {{testcase|Delete Project}} ===
      
      
 +
# Create Project1 JavaFX project.         
 +
# Right->click the  Project1 and select Delete.
 +
# Type Project2 for the project name
 +
# Press Yes button         
 +
#* {{result|EXPECTED RESULT: The project should be deleted. }}
 +
<br>
<br>
-
 
+
 
-
====Test suite: Build====
+
==Test suite: Build==
Purpose:  <br>
Purpose:  <br>
Setup:  <br>
Setup:  <br>
      
      
-
# {{testcase|Clean Project}}
+
=== {{testcase|Clean Project}} ===
-
   
+
# Create Project1 JavaFX project.         
-
# {{testcase|Build Project}}
+
# Right->click the  Project1 and select Clean Project.
-
   
+
#* {{result|EXPECTED RESULT: The build and dist directories should be deleted. }}
-
# {{testcase|Build and Clean Project}}
+
 
-
   
+
=== {{testcase|Build Project}} ===
-
# {{testcase|Run Project}}
+
# Create Project1 JavaFX project.         
 +
# Right->click the  Project1 and select Build Project.
 +
#* {{result|EXPECTED RESULT: The build and dist directories should be created. }}
 +
 
 +
=== {{testcase|Build and Clean Project}} ===
 +
# Create Project1 JavaFX project.         
 +
# Right->click the  Project1 and select Clean and Build Project.
 +
#* {{result|EXPECTED RESULT: The build and dist directories should be deleted and created again. }}
 +
 
 +
=== {{testcase|Run Project}}  ===
 +
 
 +
# Create Project1 JavaFX project.         
 +
# Right->click the  Project1 and select Run Project.
 +
#* {{result|EXPECTED RESULT: The window with title "Application title" should appear. }}
      
      
<br>
<br>
-
 
+
 
-
====Test suite: File====
+
==Test suite: File==
-
Purpose:  <br>
+
 
-
Setup:  <br>
+
=== {{testcase|Create Empty JavaFX File}} ===
-
   
+
# Select ''javafxapp'' package under the project.
-
# {{testcase|Create Empty JavaFX File}}
+
# Right-click and invoke ''New|Empty JavaFX File...''.
-
   
+
# Type ''MyFile'' for name.
-
# {{testcase|Create JavaFX Class}}
+
# Press ''Finish''.
-
   
+
#* {{result|EXPECTED RESULT: Empty ''MyFile'' JavaFX Script file should be created. }}  
-
# {{testcase|Create JavaFX Applet}}
+
#* {{result|EXPECTED RESULT: The file should contain ''javafxapp'' package. }}
-
   
+
=== {{testcase|Create Package}} ===
-
# {{testcase|Create Package}}
+
# Select ''Source Packages'' node under the project.
-
   
+
# Right-click and invoke ''New|Java Package...''.
-
# {{testcase|Rename File}}
+
# Type ''test'' for name.
-
   
+
# Press ''Finish''.
-
# {{testcase|Copy File}}
+
#* {{result|EXPECTED RESULT: ''test'' package should be created. }}
-
      
+
=== {{testcase|Create JavaFX Class}} ===
-
# {{testcase|Move File}}
+
# Select ''test'' package under the project.
-
   
+
# Right-click and invoke ''New|JavaFX Class...''.
-
# {{testcase|Cut and Paste File}}
+
# Type ''MyClass'' for name.
-
   
+
# Press ''Finish''.
-
# {{testcase|Delete File}}
+
#* {{result|EXPECTED RESULT: JavaFX Class ''MyClass'' should be created }}
-
   
+
<pre> 
 +
package test;
 +
 
 +
public class MyClass {
 +
}
 +
</pre>
 +
           
 +
=== {{testcase|Create Nested Package}} ===
 +
# Select ''test'' package under the project.
 +
# Right-click and invoke ''New|Java Package...''.
 +
# Type ''nested'' for name.
 +
# Press ''Finish''.
 +
#* {{result|EXPECTED RESULT: ''test.nested'' package should be created. }}
 +
=== {{testcase|Create JavaFX Stage}} ===
 +
# Select ''test.nested'' package under the project.
 +
# Right-click and invoke ''New|JavaFX Stage...''.
 +
# Type ''MyStage'' for name.
 +
# Press ''Finish''.
 +
#* {{result|EXPECTED RESULT: ''MyStage'' JavaFX Script file should be created }}  
 +
<pre> 
 +
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"
 +
            }
 +
        ]
 +
    }
 +
} </pre>
 +
           
 +
=== {{testcase|Create Java Class}} ===
 +
# Select ''test.nested'' package under the project.
 +
# Right-click and invoke ''New|Java Class...''.
 +
# Type ''MyClass'' for name.
 +
# Press ''Finish''.
 +
#* {{result|EXPECTED RESULT: ''MyClass'' Java classshould be created }}
 +
<pre> 
 +
package test.nested;
 +
 
 +
public class MyClass {
 +
}
 +
</pre>
 +
           
 +
=== {{testcase|Rename JavaFX Class}} ===
 +
# Select ''test.MyClass'' JavaFX class under the project.
 +
# Right-click and invoke ''Rename...''.
 +
# Type ''RenamedClass'' for new name.
 +
# Press ''OK''.
 +
#* {{result|EXPECTED RESULT: The class should be renamed to ''RenamedClass''. }}
 +
=== {{testcase|Delete JavaFX Class}} ===
 +
# Select ''test.RenamedClass'' JavaFX class under the project.
 +
# Right-click and invoke ''Delete...''.
 +
# Press ''Yes'' on Confirm Object Deletion dialog.
 +
#* {{result|EXPECTED RESULT: The class should be deleted from the project. }}
<br>
<br>
-
 
+
 
-
====Test suite: Properties====
+
 
-
Purpose:  <br>
+
-
Setup:  <br>
+
      
      
-
<br>
+
=== {{testcase|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'''
 +
#* {{result|EXPECTED RESULT: The Main file should be copied. }}
 +
 
 +
=== {{testcase|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''
 +
#* {{result|EXPECTED RESULT: The Main file should be moved. }}
 +
 
 +
=== {{testcase|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'''
 +
#* {{result|EXPECTED RESULT: The Main file should be moved. }}

Current revision as of 08:08, 6 August 2010

Author: Alexandr Scherbatiy
Version: 1.2
Last update: 03 August 2010
Introduction:
Comments:


Contents


Test suite: Project

Purpose:
Setup:

Create Empty JavaFX Script Application

  1. Invoke 'Tools | New Project...' from the main menu bar.
  2. Under Categories, select JavaFX.
  3. Under Projects, select JavaFX Application.
  4. Click Next.
  5. In the Project Name field, type JavaFXSmokeApp.
  6. 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

  1. Invoke 'Tools | New Project...' from the main menu bar.
  2. Under Categories, select JavaFX.
  3. Under Projects, select JavaFX Application.
  4. Click Next.
  5. In the Project Name field, type JavaFXAppFromSources.
  6. Select From Sources radio button.
  7. Press Add Folder... button.
  8. Browse to the JavaFX source folder.
  9. Click Finish.
    • EXPECTED RESULT: JavaFXAppFromSources should be created in the Projects window.
    • EXPECTED RESULT: .

Set as Main Project

  1. Create Project1 JavaFX project.
  2. Create Project2 JavaFX project.
  3. Right->click the Project1 and select Set as Main Project.
    • EXPECTED RESULT: The Project1 should be highlighted as Main.

Rename Project

  1. Create Project1 JavaFX project.
  2. Right->click the Project1 and select Rename.
  3. Type Project2 for the project name
  4. Press rename button
    • EXPECTED RESULT: The project name should be Project2.

Move Project

  1. Create Project1 JavaFX project.
  2. Right->click the Project1 and select Rename.
  3. Select new project location
  4. Press Move button
    • EXPECTED RESULT: The project should be moved to the new location.

Delete Project

  1. Create Project1 JavaFX project.
  2. Right->click the Project1 and select Delete.
  3. Type Project2 for the project name
  4. Press Yes button
    • EXPECTED RESULT: The project should be deleted.


Test suite: Build

Purpose:
Setup:

Clean Project

  1. Create Project1 JavaFX project.
  2. Right->click the Project1 and select Clean Project.
    • EXPECTED RESULT: The build and dist directories should be deleted.

Build Project

  1. Create Project1 JavaFX project.
  2. Right->click the Project1 and select Build Project.
    • EXPECTED RESULT: The build and dist directories should be created.

Build and Clean Project

  1. Create Project1 JavaFX project.
  2. 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

  1. Create Project1 JavaFX project.
  2. 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

  1. Select javafxapp package under the project.
  2. Right-click and invoke New|Empty JavaFX File....
  3. Type MyFile for name.
  4. Press Finish.
    • EXPECTED RESULT: Empty MyFile JavaFX Script file should be created.
    • EXPECTED RESULT: The file should contain javafxapp package.

Create Package

  1. Select Source Packages node under the project.
  2. Right-click and invoke New|Java Package....
  3. Type test for name.
  4. Press Finish.
    • EXPECTED RESULT: test package should be created.

Create JavaFX Class

  1. Select test package under the project.
  2. Right-click and invoke New|JavaFX Class....
  3. Type MyClass for name.
  4. Press Finish.
    • EXPECTED RESULT: JavaFX Class MyClass should be created
   
package test;

public class MyClass {
}
 		 

Create Nested Package

  1. Select test package under the project.
  2. Right-click and invoke New|Java Package....
  3. Type nested for name.
  4. Press Finish.
    • EXPECTED RESULT: test.nested package should be created.

Create JavaFX Stage

  1. Select test.nested package under the project.
  2. Right-click and invoke New|JavaFX Stage....
  3. Type MyStage for name.
  4. 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

  1. Select test.nested package under the project.
  2. Right-click and invoke New|Java Class....
  3. Type MyClass for name.
  4. Press Finish.
    • EXPECTED RESULT: MyClass Java classshould be created
   
package test.nested;

public class MyClass {
}
 		 

Rename JavaFX Class

  1. Select test.MyClass JavaFX class under the project.
  2. Right-click and invoke Rename....
  3. Type RenamedClass for new name.
  4. Press OK.
    • EXPECTED RESULT: The class should be renamed to RenamedClass.

Delete JavaFX Class

  1. Select test.RenamedClass JavaFX class under the project.
  2. Right-click and invoke Delete....
  3. Press Yes on Confirm Object Deletion dialog.
    • EXPECTED RESULT: The class should be deleted from the project.



Copy File

  1. Create test1 package
  2. Create Main file under the test1 package
  3. Right->click the Main file and select Copy
  4. Create test2 package
  5. Right->click the test2 package and select Paste
    • EXPECTED RESULT: The Main file should be copied.

Move File

  1. Create test1 package
  2. Create test2 package
  3. Create Main file under the test1 package
  4. Drag and Drop the Main file from test1 to test2
    • EXPECTED RESULT: The Main file should be moved.

Cut and Paste File

  1. Create test1 package
  2. Create Main file under the test1 package
  3. Right->click the Main file and select Cut
  4. Create test2 package
  5. Right->click the test2 package and select Paste
    • EXPECTED RESULT: The Main file should be moved.
Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo