TS 69 JavaFX Sanity

(Difference between revisions)
Line 14: Line 14:
      
      
# {{testcase|Install JavaFX Script plugin via installer}}
# {{testcase|Install JavaFX Script plugin via installer}}
-
   
 
## Download  the [http://www.netbeans.org/downloads/index.html  NetBeans] with JavaFX Script.         
## Download  the [http://www.netbeans.org/downloads/index.html  NetBeans] with JavaFX Script.         
## Install it.           
## Install it.           
#* {{result|EXPECTED RESULT: NetBeans with JavaFX Script Plugin should be installed without errors. }}             
#* {{result|EXPECTED RESULT: NetBeans with JavaFX Script Plugin should be installed without errors. }}             
#* {{result|EXPECTED RESULT:  It is possible to crate a JavaFX Script project. }}  
#* {{result|EXPECTED RESULT:  It is possible to crate a JavaFX Script project. }}  
-
           
 
# {{testcase|Uninstall JavaFX Script plugin}}     
# {{testcase|Uninstall JavaFX Script plugin}}     
##  Run the NetBeans with JavaFX Script plugin.           
##  Run the NetBeans with JavaFX Script plugin.           
Line 31: Line 29:
#* {{result|EXPECTED RESULT:  It is not possible to crate a JavaFX Script project. }}             
#* {{result|EXPECTED RESULT:  It is not possible to crate a JavaFX Script project. }}             
#* {{result|EXPECTED RESULT:  NetBeans installation dir does not contain ''javafx2'' cluster. }}             
#* {{result|EXPECTED RESULT:  NetBeans installation dir does not contain ''javafx2'' cluster. }}             
-
 
# {{testcase|Install JavaFX Script plugin via Update Center}}     
# {{testcase|Install JavaFX Script plugin via Update Center}}     
##  Download  [http://www.netbeans.org/downloads/index.html  NetBeans]  (JavaSE, Ruby, PHP or All).         
##  Download  [http://www.netbeans.org/downloads/index.html  NetBeans]  (JavaSE, Ruby, PHP or All).         
Line 44: Line 41:
#* {{result|EXPECTED RESULT:  JavaFX Script Plugin should be installed without errors. }}             
#* {{result|EXPECTED RESULT:  JavaFX Script Plugin should be installed without errors. }}             
#* {{result|EXPECTED RESULT:  It is possible to crate a JavaFX Script project. }}  
#* {{result|EXPECTED RESULT:  It is possible to crate a JavaFX Script project. }}  
-
           
 
<br>
<br>
    
    
Line 52: Line 48:
      
      
# {{testcase|Create New Application}}
# {{testcase|Create New Application}}
-
   
 
## Invoke 'File | New Project...' from the main menu bar.   
## Invoke 'File | New Project...' from the main menu bar.   
-
       
 
## Under Categories, select JavaFX.  
## Under Categories, select JavaFX.  
-
       
 
## Under Projects, select JavaFX Application.  
## Under Projects, select JavaFX Application.  
-
       
 
## Click Next.  
## Click Next.  
-
       
 
## In the Project Name field, type JavaFXApp.  
## In the Project Name field, type JavaFXApp.  
-
       
 
## Click Finish.  
## Click Finish.  
-
       
 
#* {{result|EXPECTED RESULT: JavaFXApp should be created in the Projects window. }}  
#* {{result|EXPECTED RESULT: JavaFXApp should be created in the Projects window. }}  
-
           
 
# {{testcase|Check Main file}}
# {{testcase|Check Main file}}
-
   
 
#* {{result|EXPECTED RESULT: Main JavaFX file should be opened. }}  
#* {{result|EXPECTED RESULT: Main JavaFX file should be opened. }}  
-
           
 
#* {{result|EXPECTED RESULT: Check that the Main file contains code: }}  
#* {{result|EXPECTED RESULT: Check that the Main file contains code: }}  
<pre>   
<pre>   
Line 101: Line 87:
              
              
# {{testcase|Create Empty JavaFX File}}
# {{testcase|Create Empty JavaFX File}}
-
   
 
## Select ''javafxapp'' package under the project.  
## Select ''javafxapp'' package under the project.  
-
       
 
## Right-click and invoke ''New|Empty JavaFX File...''.  
## Right-click and invoke ''New|Empty JavaFX File...''.  
-
       
 
## Type ''MyFile'' for name.  
## Type ''MyFile'' for name.  
-
       
 
## Press ''Finish''.  
## Press ''Finish''.  
-
       
 
#* {{result|EXPECTED RESULT: Empty ''MyFile'' JavaFX Script file should be created. }}  
#* {{result|EXPECTED RESULT: Empty ''MyFile'' JavaFX Script file should be created. }}  
-
           
 
#* {{result|EXPECTED RESULT: The file should contain ''javafxapp'' package. }}  
#* {{result|EXPECTED RESULT: The file should contain ''javafxapp'' package. }}  
-
           
 
# {{testcase|Create Package}}
# {{testcase|Create Package}}
-
   
 
## Select ''Source Packages'' node under the project.  
## Select ''Source Packages'' node under the project.  
-
       
 
## Right-click and invoke ''New|Java Package...''.  
## Right-click and invoke ''New|Java Package...''.  
-
       
 
## Type ''test'' for name.  
## Type ''test'' for name.  
-
       
 
## Press ''Finish''.  
## Press ''Finish''.  
-
       
 
#* {{result|EXPECTED RESULT: ''test'' package should be created. }}  
#* {{result|EXPECTED RESULT: ''test'' package should be created. }}  
-
           
 
# {{testcase|Create JavaFX Class}}
# {{testcase|Create JavaFX Class}}
-
   
 
## Select ''test'' package under the project.  
## Select ''test'' package under the project.  
-
       
 
## Right-click and invoke ''New|JavaFX Class...''.  
## Right-click and invoke ''New|JavaFX Class...''.  
-
       
 
## Type ''MyClass'' for name.  
## Type ''MyClass'' for name.  
-
       
 
## Press ''Finish''.  
## Press ''Finish''.  
-
       
+
#* {{result|EXPECTED RESULT: JavaFX Class ''MyClass'' should be created }}
-
#* {{result|EXPECTED RESULT: JavaFX Class ''MyClass'' should be created }}  
+
<pre>   
<pre>   
package test;
package test;
Line 145: Line 113:
              
              
# {{testcase|Create Nested Package}}
# {{testcase|Create Nested Package}}
-
   
 
## Select ''test'' package under the project.  
## Select ''test'' package under the project.  
-
       
 
## Right-click and invoke ''New|Java Package...''.  
## Right-click and invoke ''New|Java Package...''.  
-
       
 
## Type ''nested'' for name.  
## Type ''nested'' for name.  
-
       
 
## Press ''Finish''.  
## Press ''Finish''.  
-
       
 
#* {{result|EXPECTED RESULT: ''test.nested'' package should be created. }}  
#* {{result|EXPECTED RESULT: ''test.nested'' package should be created. }}  
-
           
 
# {{testcase|Create JavaFX Stage}}
# {{testcase|Create JavaFX Stage}}
-
   
 
## Select ''test.nested'' package under the project.  
## Select ''test.nested'' package under the project.  
-
       
 
## Right-click and invoke ''New|JavaFX Stage...''.  
## Right-click and invoke ''New|JavaFX Stage...''.  
-
       
 
## Type ''MyStage'' for name.  
## Type ''MyStage'' for name.  
-
       
 
## Press ''Finish''.  
## Press ''Finish''.  
-
       
 
#* {{result|EXPECTED RESULT: ''MyStage'' JavaFX Script file should be created }}  
#* {{result|EXPECTED RESULT: ''MyStage'' JavaFX Script file should be created }}  
<pre>   
<pre>   
Line 196: Line 153:
              
              
# {{testcase|Create Java Class}}
# {{testcase|Create Java Class}}
-
   
 
## Select ''test.nested'' package under the project.  
## Select ''test.nested'' package under the project.  
-
       
 
## Right-click and invoke ''New|Java Class...''.  
## Right-click and invoke ''New|Java Class...''.  
-
       
 
## Type ''MyClass'' for name.  
## Type ''MyClass'' for name.  
-
       
 
## Press ''Finish''.  
## Press ''Finish''.  
-
       
+
#* {{result|EXPECTED RESULT: ''MyClass'' Java classshould be created }}
-
#* {{result|EXPECTED RESULT: ''MyClass'' Java classshould be created }}  
+
<pre>   
<pre>   
package test.nested;
package test.nested;
Line 214: Line 166:
              
              
# {{testcase|Rename JavaFX Class}}
# {{testcase|Rename JavaFX Class}}
-
   
 
## Select ''test.MyClass'' JavaFX class under the project.  
## Select ''test.MyClass'' JavaFX class under the project.  
-
       
 
## Right-click and invoke ''Rename...''.  
## Right-click and invoke ''Rename...''.  
-
       
 
## Type ''RenamedClass'' for new name.  
## Type ''RenamedClass'' for new name.  
-
       
 
## Press ''OK''.  
## Press ''OK''.  
-
       
 
#* {{result|EXPECTED RESULT: The class should be renamed to ''RenamedClass''. }}  
#* {{result|EXPECTED RESULT: The class should be renamed to ''RenamedClass''. }}  
-
           
 
# {{testcase|Delete JavaFX Class}}
# {{testcase|Delete JavaFX Class}}
-
   
 
## Select ''test.RenamedClass'' JavaFX class under the project.  
## Select ''test.RenamedClass'' JavaFX class under the project.  
-
       
 
## Right-click and invoke ''Delete...''.  
## Right-click and invoke ''Delete...''.  
-
       
 
## Press ''Yes'' on Confirm Object Deletion dialog.  
## Press ''Yes'' on Confirm Object Deletion dialog.  
-
       
 
#* {{result|EXPECTED RESULT: The class should be deleted from the project. }}  
#* {{result|EXPECTED RESULT: The class should be deleted from the project. }}  
-
           
 
<br>
<br>
    
    
Line 242: Line 183:
      
      
# {{testcase|Type Code in Editor}}
# {{testcase|Type Code in Editor}}
-
   
 
## Type the following  code in the JavaFX editor:   
## Type the following  code in the JavaFX editor:   
-
<pre>   
+
<pre>   
var radius = 10;
var radius = 10;
Line 252: Line 192:
          
          
#* {{result|EXPECTED RESULT: The code should be typed without any exception. }}  
#* {{result|EXPECTED RESULT: The code should be typed without any exception. }}  
-
           
 
# {{testcase|Highlighting}}
# {{testcase|Highlighting}}
-
   
 
#* {{result|EXPECTED RESULT: The '' import '' statement should be highlighted  }}  
#* {{result|EXPECTED RESULT: The '' import '' statement should be highlighted  }}  
-
           
 
#* {{result|EXPECTED RESULT: The '' var '' statement  should be highlighted  }}  
#* {{result|EXPECTED RESULT: The '' var '' statement  should be highlighted  }}  
-
           
 
#* {{result|EXPECTED RESULT: The '' function '' statement  should be highlighted  }}  
#* {{result|EXPECTED RESULT: The '' function '' statement  should be highlighted  }}  
-
           
 
#* {{result|EXPECTED RESULT: The name of '' radius ''  variable should be highlighted  }}  
#* {{result|EXPECTED RESULT: The name of '' radius ''  variable should be highlighted  }}  
-
           
 
#* {{result|EXPECTED RESULT: The name of '' sqr ''  function should be highlighted  }}  
#* {{result|EXPECTED RESULT: The name of '' sqr ''  function should be highlighted  }}  
-
           
 
# {{testcase|Templates}}
# {{testcase|Templates}}
-
   
 
##Type ''sout'' in the editor.   
##Type ''sout'' in the editor.   
-
           
 
##Type  Press ''Tab'' key.  
##Type  Press ''Tab'' key.  
-
           
 
#* {{result|EXPECTED RESULT:  ''java.lang.System.out.println("");'' line should appear in the editor.  }}  
#* {{result|EXPECTED RESULT:  ''java.lang.System.out.println("");'' line should appear in the editor.  }}  
-
           
 
#* {{result|EXPECTED RESULT:  There should not be any error in the editor. }}  
#* {{result|EXPECTED RESULT:  There should not be any error in the editor. }}  
-
           
 
# {{testcase|Build Project}}
# {{testcase|Build Project}}
-
   
 
## Invoke 'Build Project' on the project node.  
## Invoke 'Build Project' on the project node.  
-
       
 
#* {{result|EXPECTED RESULT: The JavaFX application should build without errors. }}  
#* {{result|EXPECTED RESULT: The JavaFX application should build without errors. }}  
-
           
 
# {{testcase|Run Project}}
# {{testcase|Run Project}}
-
   
 
## Invoke 'Run Project' on the project node.  
## Invoke 'Run Project' on the project node.  
-
       
 
#* {{result|EXPECTED RESULT: The JavaFX application should build without errors. }}  
#* {{result|EXPECTED RESULT: The JavaFX application should build without errors. }}  
-
           
 
# {{testcase|Preview}}
# {{testcase|Preview}}
-
   
 
##  Save the JavaFX file (''Ctrl+S'').   
##  Save the JavaFX file (''Ctrl+S'').   
-
       
 
##  Enable the Preview.   
##  Enable the Preview.   
-
       
 
##  Wait a few seconds.   
##  Wait a few seconds.   
-
       
 
#* {{result|EXPECTED RESULT:  The image of JavaFX application should be shown in the preview panel. }}  
#* {{result|EXPECTED RESULT:  The image of JavaFX application should be shown in the preview panel. }}  
-
           
 
# {{testcase|Javadoc}}
# {{testcase|Javadoc}}
-
   
 
## Create ''Contact'' JavaFX class:
## Create ''Contact'' JavaFX class:
-
<pre>   
+
<pre>   
class Contact{
class Contact{
     var firstName: String;
     var firstName: String;
Line 310: Line 226:
          
          
## Invoke 'Generate Javadoc for Project' on the project node.  
## Invoke 'Generate Javadoc for Project' on the project node.  
-
       
 
#* {{result|EXPECTED RESULT:  The Javadoc should appear in a browser. }}  
#* {{result|EXPECTED RESULT:  The Javadoc should appear in a browser. }}  
-
           
 
#* {{result|EXPECTED RESULT:  The Javadoc should contain ''Contact'' class. }}  
#* {{result|EXPECTED RESULT:  The Javadoc should contain ''Contact'' class. }}  
-
           
 
#* {{result|EXPECTED RESULT:  The  ''Contact'' class should contain ''firstName,lastName and eMailAddress'' attributes. }}  
#* {{result|EXPECTED RESULT:  The  ''Contact'' class should contain ''firstName,lastName and eMailAddress'' attributes. }}  
-
           
 
#* {{result|EXPECTED RESULT:  The  ''Contact'' class should contain ''toString'' function. }}  
#* {{result|EXPECTED RESULT:  The  ''Contact'' class should contain ''toString'' function. }}  
-
           
 
# {{testcase|Palette}}
# {{testcase|Palette}}
-
   
 
## Drag and drop ''Applications|Stage'' component from the Palette to the editor.  
## Drag and drop ''Applications|Stage'' component from the Palette to the editor.  
-
       
 
## Drag and drop ''Basic Shapes|Circle '' component from the Palette to the Scene content.  
## Drag and drop ''Basic Shapes|Circle '' component from the Palette to the Scene content.  
-
       
 
## Run the project  
## Run the project  
-
       
 
#* {{result|EXPECTED RESULT: Frame with circle should appear. }}  
#* {{result|EXPECTED RESULT: Frame with circle should appear. }}  
-
           
 
# {{testcase|Navigator}}
# {{testcase|Navigator}}
-
   
 
##  Create a new Empty JavaFX file.  
##  Create a new Empty JavaFX file.  
-
       
 
## Type  in the editor:
## Type  in the editor:
<pre>   
<pre>   
Line 347: Line 251:
          
          
#* {{result|EXPECTED RESULT: There should be ''a:Integer'' node in the Navigator }}  
#* {{result|EXPECTED RESULT: There should be ''a:Integer'' node in the Navigator }}  
-
           
 
#* {{result|EXPECTED RESULT: There should be ''b:Boolean'' node in the Navigator }}  
#* {{result|EXPECTED RESULT: There should be ''b:Boolean'' node in the Navigator }}  
-
           
 
#* {{result|EXPECTED RESULT: There should be ''c:Float'' node in the Navigator }}  
#* {{result|EXPECTED RESULT: There should be ''c:Float'' node in the Navigator }}  
-
           
 
#* {{result|EXPECTED RESULT: There should be ''d:javafx.lang.Duration'' node in the Navigator }}  
#* {{result|EXPECTED RESULT: There should be ''d:javafx.lang.Duration'' node in the Navigator }}  
-
           
 
#* {{result|EXPECTED RESULT: There should be ''f:function(:Float,:String):Boolean'' node in the Navigator }}  
#* {{result|EXPECTED RESULT: There should be ''f:function(:Float,:String):Boolean'' node in the Navigator }}  
-
           
 
#* {{result|EXPECTED RESULT: There should be ''seq:java.lang.String[]'' node in the Navigator }}  
#* {{result|EXPECTED RESULT: There should be ''seq:java.lang.String[]'' node in the Navigator }}  
-
           
 
#* {{result|EXPECTED RESULT: There should be ''A'' node in the Navigator }}  
#* {{result|EXPECTED RESULT: There should be ''A'' node in the Navigator }}  
-
           
 
# {{testcase|Go to Declaration}}
# {{testcase|Go to Declaration}}
-
   
 
##  Create a new Empty JavaFX file.  
##  Create a new Empty JavaFX file.  
-
       
 
## Type code:
## Type code:
<pre>   
<pre>   
Line 379: Line 274:
          
          
##  Hold Ctrl and click mouse ''a'' in ''var b = a + 20;'' line.   
##  Hold Ctrl and click mouse ''a'' in ''var b = a + 20;'' line.   
-
       
 
#* {{result|EXPECTED RESULT:  The cursor should go to the line of ''var a = 10;''. }}  
#* {{result|EXPECTED RESULT:  The cursor should go to the line of ''var a = 10;''. }}  
-
           
 
# {{testcase|Go to Source}}
# {{testcase|Go to Source}}
-
   
 
## Type code:
## Type code:
<pre>   
<pre>   
Line 390: Line 282:
          
          
##  Hold Ctrl and click mouse ''Timeline''.   
##  Hold Ctrl and click mouse ''Timeline''.   
-
       
 
#* {{result|EXPECTED RESULT:  ''Timeline.fx '' class should be open. }}  
#* {{result|EXPECTED RESULT:  ''Timeline.fx '' class should be open. }}  
-
           
 
# {{testcase|Fix Imports}}
# {{testcase|Fix Imports}}
-
   
 
##  Create a new Empty JavaFX file.  
##  Create a new Empty JavaFX file.  
-
       
 
## Type code:
## Type code:
<pre>   
<pre>   
Line 415: Line 303:
          
          
## Fix imports (Invoke ''Fix Imports'' popup menu or press ''Ctrl+Shift+I'')  
## Fix imports (Invoke ''Fix Imports'' popup menu or press ''Ctrl+Shift+I'')  
-
       
 
#* {{result|EXPECTED RESULT:  Imports should be fixed. }}  
#* {{result|EXPECTED RESULT:  Imports should be fixed. }}  
-
           
 
#* {{result|EXPECTED RESULT:  Code should be compilable. }}  
#* {{result|EXPECTED RESULT:  Code should be compilable. }}  
-
           
 
# {{testcase|Code Formatting}}
# {{testcase|Code Formatting}}
-
   
 
## Type code:
## Type code:
<pre>   
<pre>   
Line 445: Line 329:
          
          
## Format code (Invoke ''Format'' popup menu or press ''Alt+Shift+F'')  
## Format code (Invoke ''Format'' popup menu or press ''Alt+Shift+F'')  
-
       
 
#* {{result|EXPECTED RESULT:  Code should be formatted. }}  
#* {{result|EXPECTED RESULT:  Code should be formatted. }}  
-
           
 
#* {{result|EXPECTED RESULT:  Code should be compilable. }}  
#* {{result|EXPECTED RESULT:  Code should be compilable. }}  
-
           
 
# {{testcase|Code Completion}}
# {{testcase|Code Completion}}
-
   
 
## Type code:
## Type code:
<pre>   
<pre>   
Line 460: Line 340:
          
          
## Press ''Ctrl+Space''  
## Press ''Ctrl+Space''  
-
       
 
## Select ''timeline'' variable from the list.  
## Select ''timeline'' variable from the list.  
-
       
 
## Type ''.'' after the timeline variable.  
## Type ''.'' after the timeline variable.  
-
       
 
## Press ''Ctrl+Space''  
## Press ''Ctrl+Space''  
-
       
 
## Select ''play()'' function from the list.  
## Select ''play()'' function from the list.  
-
       
 
#* {{result|EXPECTED RESULT:  Code Completion should work. }}  
#* {{result|EXPECTED RESULT:  Code Completion should work. }}  
-
           
 
#* {{result|EXPECTED RESULT:  Code should be compilable. }}  
#* {{result|EXPECTED RESULT:  Code should be compilable. }}  
-
           
 
<br>
<br>
    
    
Line 480: Line 353:
      
      
# {{testcase|Debug Project}}
# {{testcase|Debug Project}}
-
   
 
##  Create a JavaFX Script project.   
##  Create a JavaFX Script project.   
-
       
 
##  Press ''Debug Main Project'' button.   
##  Press ''Debug Main Project'' button.   
-
       
 
##  Press ''Finish Debugger Session'' button.   
##  Press ''Finish Debugger Session'' button.   
-
       
 
#* {{result|EXPECTED RESULT:  Debugger should start.  }}  
#* {{result|EXPECTED RESULT:  Debugger should start.  }}  
-
           
 
#* {{result|EXPECTED RESULT:  Debugger should stop.  }}  
#* {{result|EXPECTED RESULT:  Debugger should stop.  }}  
-
           
 
# {{testcase|Set Breakpoints}}
# {{testcase|Set Breakpoints}}
-
   
 
##  Create a JavaFX Script project.   
##  Create a JavaFX Script project.   
-
       
 
##  Copy the code to the Main file:
##  Copy the code to the Main file:
<pre>   
<pre>   
Line 504: Line 369:
          
          
##  Set breakpoints (click on the Glyph  Gutter in the editor) for ''a, b'' and ''c'' variables  
##  Set breakpoints (click on the Glyph  Gutter in the editor) for ''a, b'' and ''c'' variables  
-
       
 
##  Debug the project (press &lt;Ctrl+F5&gt;).   
##  Debug the project (press &lt;Ctrl+F5&gt;).   
-
       
 
##  Continue debug the project (press &lt;F5&gt;) for each variable.   
##  Continue debug the project (press &lt;F5&gt;) for each variable.   
-
       
 
#* {{result|EXPECTED RESULT:  Debugger should stop on each breakpoint.  }}  
#* {{result|EXPECTED RESULT:  Debugger should stop on each breakpoint.  }}  
-
           
 
#* {{result|EXPECTED RESULT:  Debugger should stop after end of the project.  }}  
#* {{result|EXPECTED RESULT:  Debugger should stop after end of the project.  }}  
-
           
 
# {{testcase|Watches Window}}
# {{testcase|Watches Window}}
-
   
 
##  Create a JavaFX Script project.   
##  Create a JavaFX Script project.   
-
       
 
##  Copy the code to the Main file:
##  Copy the code to the Main file:
<pre>   
<pre>   
Line 527: Line 385:
          
          
##  Set breakpoints for ''print(c);'' line  
##  Set breakpoints for ''print(c);'' line  
-
       
 
##  Debug the project (press &lt;Ctrl+F5&gt;).   
##  Debug the project (press &lt;Ctrl+F5&gt;).   
-
       
 
##  Go to ''Watches'' window.  
##  Go to ''Watches'' window.  
-
       
 
##  Right-click and select ''New Watch...''  
##  Right-click and select ''New Watch...''  
-
       
 
##  Type ''a + 10 '' for the watch expression.  
##  Type ''a + 10 '' for the watch expression.  
-
       
 
##  Right-click and select ''New Watch...''  
##  Right-click and select ''New Watch...''  
-
       
 
##  Type ''c * 2 '' for the watch expression.  
##  Type ''c * 2 '' for the watch expression.  
-
       
 
#* {{result|EXPECTED RESULT:  There should be ''20'' value for the ''a + 10 '' expression.  }}  
#* {{result|EXPECTED RESULT:  There should be ''20'' value for the ''a + 10 '' expression.  }}  
-
           
 
#* {{result|EXPECTED RESULT:  There should be ''61.0'' value for the ''c * 2'' expression.  }}  
#* {{result|EXPECTED RESULT:  There should be ''61.0'' value for the ''c * 2'' expression.  }}  
-
           
 
# {{testcase|Local Variables Window}}
# {{testcase|Local Variables Window}}
-
   
 
##  Create a JavaFX Script project.   
##  Create a JavaFX Script project.   
-
       
 
##  Copy the code to the Main file:
##  Copy the code to the Main file:
<pre>   
<pre>   
Line 564: Line 411:
          
          
##  Set breakpoints for ''println(d);'' line  
##  Set breakpoints for ''println(d);'' line  
-
       
 
##  Debug the project (press &lt;Ctrl+F5&gt;).   
##  Debug the project (press &lt;Ctrl+F5&gt;).   
-
       
 
##  Go to ''Locale Variables'' window.  
##  Go to ''Locale Variables'' window.  
-
       
 
#* {{result|EXPECTED RESULT:  There should be ''a|Integer|10'' line.  }}  
#* {{result|EXPECTED RESULT:  There should be ''a|Integer|10'' line.  }}  
-
           
 
#* {{result|EXPECTED RESULT:  There should be ''b|Number |25'' line.  }}  
#* {{result|EXPECTED RESULT:  There should be ''b|Number |25'' line.  }}  
-
           
 
#* {{result|EXPECTED RESULT:  There should be ''c|Boolean|true'' line.  }}  
#* {{result|EXPECTED RESULT:  There should be ''c|Boolean|true'' line.  }}  
-
           
 
#* {{result|EXPECTED RESULT:  There should be ''d|Main.D|10'' line.  }}  
#* {{result|EXPECTED RESULT:  There should be ''d|Main.D|10'' line.  }}  
-
           
 
#* {{result|EXPECTED RESULT:  There should be ''attr|Number|22.0'' line under ''d'' variable.  }}  
#* {{result|EXPECTED RESULT:  There should be ''attr|Number|22.0'' line under ''d'' variable.  }}  
-
           
 
# {{testcase|Call Stack}}
# {{testcase|Call Stack}}
-
   
 
##  Create a JavaFX Script project.   
##  Create a JavaFX Script project.   
-
       
 
##  Copy the code to the Main file:
##  Copy the code to the Main file:
<pre>   
<pre>   
Line 592: Line 429:
          
          
##  Set breakpoints for ''a, b'' and ''c'' variables   
##  Set breakpoints for ''a, b'' and ''c'' variables   
-
       
 
##  Debug the project (press &lt;Ctrl+F5&gt;).   
##  Debug the project (press &lt;Ctrl+F5&gt;).   
-
       
 
##  Go to ''Call Stack'' window.  
##  Go to ''Call Stack'' window.  
-
       
 
#* {{result|EXPECTED RESULT:  The current program call stack should be shown.  }}  
#* {{result|EXPECTED RESULT:  The current program call stack should be shown.  }}  
-
           
 
# {{testcase|Breakpoints Window}}
# {{testcase|Breakpoints Window}}
-
   
 
##  Create a JavaFX Script project.   
##  Create a JavaFX Script project.   
-
       
 
##  Copy the code to the Main file:
##  Copy the code to the Main file:
<pre>   
<pre>   
Line 612: Line 443:
          
          
##  Set breakpoints for ''a, b'' and ''c'' variables   
##  Set breakpoints for ''a, b'' and ''c'' variables   
-
       
 
##  Debug the project (press &lt;Ctrl+F5&gt;).   
##  Debug the project (press &lt;Ctrl+F5&gt;).   
-
       
 
##  Go to ''Breakpoints'' window.  
##  Go to ''Breakpoints'' window.  
-
       
 
#* {{result|EXPECTED RESULT:  The ''Breakpoints'' window should show set berakpoints.  }}  
#* {{result|EXPECTED RESULT:  The ''Breakpoints'' window should show set berakpoints.  }}  
-
           
 
# {{testcase|Step Into}}
# {{testcase|Step Into}}
-
   
 
##  Create a JavaFX Script project.   
##  Create a JavaFX Script project.   
-
       
 
##  Copy the code to the Main file:
##  Copy the code to the Main file:
<pre>   
<pre>   
Line 636: Line 461:
          
          
##  Set a breakpoint for the ''b()'' call on the last line   
##  Set a breakpoint for the ''b()'' call on the last line   
-
       
 
##  Debug the project (press &lt;Ctrl+F5&gt;).   
##  Debug the project (press &lt;Ctrl+F5&gt;).   
-
       
 
##  Press ''Step Into'' button (press &lt;F7&gt;) on the toollbar.  
##  Press ''Step Into'' button (press &lt;F7&gt;) on the toollbar.  
-
       
 
#* {{result|EXPECTED RESULT:  The green line should point to the ''b'' function body.  }}  
#* {{result|EXPECTED RESULT:  The green line should point to the ''b'' function body.  }}  
-
           
 
<br>
<br>
    
    
Line 650: Line 471:
      
      
# {{testcase|CPU mode}}
# {{testcase|CPU mode}}
-
   
 
##  Create a JavaFX Script project that contains a Stage.  
##  Create a JavaFX Script project that contains a Stage.  
-
 
<pre>   
<pre>   
import javafx.stage.*;
import javafx.stage.*;
Line 678: Line 497:
          
          
##  Press ''Profile Main Project...'' toolbar button.   
##  Press ''Profile Main Project...'' toolbar button.   
-
       
 
##  Press ''OK'' on Enable Profiling dialog if it appears.   
##  Press ''OK'' on Enable Profiling dialog if it appears.   
-
       
 
##  Select ''CPU''.   
##  Select ''CPU''.   
-
       
 
##  Press ''Run''.   
##  Press ''Run''.   
-
       
 
#* {{result|EXPECTED RESULT:  The application should start. }}  
#* {{result|EXPECTED RESULT:  The application should start. }}  
-
           
 
##  Close the application.   
##  Close the application.   
-
       
 
#* {{result|EXPECTED RESULT:  The application should stop. }}  
#* {{result|EXPECTED RESULT:  The application should stop. }}  
-
           
 
# {{testcase|Live results}}
# {{testcase|Live results}}
-
   
 
##  Profile the Project from test case 5.1 (Do not close it).   
##  Profile the Project from test case 5.1 (Do not close it).   
-
       
 
##  Press ''Live Results'' button on the Profiler Control Panel in NetBeans.   
##  Press ''Live Results'' button on the Profiler Control Panel in NetBeans.   
-
       
 
##  Type ''run'' in the filter text field.  
##  Type ''run'' in the filter text field.  
-
       
 
##  Select ''javafxapplication.Main.javafx$run$(com.sun.javafx.runtime.sequence.Sequence)'' method and invoke ''Go to source''.  
##  Select ''javafxapplication.Main.javafx$run$(com.sun.javafx.runtime.sequence.Sequence)'' method and invoke ''Go to source''.  
-
       
 
#* {{result|EXPECTED RESULT:  ''Main.fx'' file should open. }}  
#* {{result|EXPECTED RESULT:  ''Main.fx'' file should open. }}  
-
           
 
# {{testcase|Take Snapshot}}
# {{testcase|Take Snapshot}}
-
   
 
##  Profile the Project from test case 5.1 (Do not close it).   
##  Profile the Project from test case 5.1 (Do not close it).   
-
       
 
##  Press ''Take Snapshot'' button on the Profiler Control Panel in NetBeans.   
##  Press ''Take Snapshot'' button on the Profiler Control Panel in NetBeans.   
-
       
 
##  Select ''Main.main(String[])'' method and invoke ''Go to source''.  
##  Select ''Main.main(String[])'' method and invoke ''Go to source''.  
-
       
 
##  Check ''Call Tree, Hot Spots, Compined'' and ''Info'' tabs.  
##  Check ''Call Tree, Hot Spots, Compined'' and ''Info'' tabs.  
-
       
 
#* {{result|EXPECTED RESULT:  ''Main.fx'' file should open. }}  
#* {{result|EXPECTED RESULT:  ''Main.fx'' file should open. }}  
-
           
 
# {{testcase|Memory mode}}
# {{testcase|Memory mode}}
-
   
 
##  Create a JavaFX Script project.   
##  Create a JavaFX Script project.   
-
       
 
##  Press ''Profile Main Project...'' toolbar button.   
##  Press ''Profile Main Project...'' toolbar button.   
-
       
 
##  Press ''OK'' on Enable Profiling dialog if it appears.   
##  Press ''OK'' on Enable Profiling dialog if it appears.   
-
       
 
##  Select ''Memory''.   
##  Select ''Memory''.   
-
       
 
##  Press ''Run''.   
##  Press ''Run''.   
-
       
 
#* {{result|EXPECTED RESULT:  The application should start. }}  
#* {{result|EXPECTED RESULT:  The application should start. }}  
-
           
 
##  Close the application.   
##  Close the application.   
-
       
 
#* {{result|EXPECTED RESULT:  The application should stop. }}  
#* {{result|EXPECTED RESULT:  The application should stop. }}  
-
           
 
# {{testcase|Monitor mode}}
# {{testcase|Monitor mode}}
-
   
 
##  Create a JavaFX Script project.   
##  Create a JavaFX Script project.   
-
       
 
##  Press ''Profile Main Project...'' toolbar button.   
##  Press ''Profile Main Project...'' toolbar button.   
-
       
 
##  Press ''OK'' on Enable Profiling dialog if it appears.   
##  Press ''OK'' on Enable Profiling dialog if it appears.   
-
       
 
##  Select ''Monitor''.   
##  Select ''Monitor''.   
-
       
 
##  Press ''Run''.   
##  Press ''Run''.   
-
       
 
#* {{result|EXPECTED RESULT:  The application should start. }}  
#* {{result|EXPECTED RESULT:  The application should start. }}  
-
           
 
##  Close the application.   
##  Close the application.   
-
       
 
#* {{result|EXPECTED RESULT:  The application should stop. }}  
#* {{result|EXPECTED RESULT:  The application should stop. }}  
-
           
 
# {{testcase|Threads}}
# {{testcase|Threads}}
-
   
 
##  Profile the Project in CPU mode.   
##  Profile the Project in CPU mode.   
-
       
 
##  Press ''Threads'' button on the Profiler Control Panel in NetBeans.   
##  Press ''Threads'' button on the Profiler Control Panel in NetBeans.   
-
       
 
##  Press the icon to enable threads on the ''Threads'' window.   
##  Press the icon to enable threads on the ''Threads'' window.   
-
       
 
#* {{result|EXPECTED RESULT:  Threads should be shown on the ''Threads'' window  }}  
#* {{result|EXPECTED RESULT:  Threads should be shown on the ''Threads'' window  }}  
-
           
 
# {{testcase|VM Telemetry}}
# {{testcase|VM Telemetry}}
-
   
 
##  Profile the Project in CPU mode.   
##  Profile the Project in CPU mode.   
-
       
 
##  Press ''VM Telemetry'' button on the Profiler Control Panel in NetBeans.   
##  Press ''VM Telemetry'' button on the Profiler Control Panel in NetBeans.   
-
       
 
#* {{result|EXPECTED RESULT:  The ''VM Telemetry'' window should open. }}  
#* {{result|EXPECTED RESULT:  The ''VM Telemetry'' window should open. }}  
-
           
 
<br>
<br>
    
    
Line 776: Line 549:
      
      
# {{testcase|Applet}}
# {{testcase|Applet}}
-
   
 
## Invoke '' Properties '' on project node.  
## Invoke '' Properties '' on project node.  
-
       
 
## Select '' Run '' under categories.  
## Select '' Run '' under categories.  
-
       
 
## Select '' Run in Browser '' check box.  
## Select '' Run in Browser '' check box.  
-
       
 
## Press '' OK ''.  
## Press '' OK ''.  
-
       
 
## Invoke ''Run Project'' on the project node.  
## Invoke ''Run Project'' on the project node.  
-
       
 
#* {{result|EXPECTED RESULT: Applet should be started in Browser. }}  
#* {{result|EXPECTED RESULT: Applet should be started in Browser. }}  
-
           
 
# {{testcase|Java Web Start}}
# {{testcase|Java Web Start}}
-
   
 
## Invoke '' Properties '' on project node.  
## Invoke '' Properties '' on project node.  
-
       
 
## Select '' Run '' under categories.  
## Select '' Run '' under categories.  
-
       
 
## Select '' Web Start Execution '' check box.  
## Select '' Web Start Execution '' check box.  
-
       
 
## Press '' OK ''.  
## Press '' OK ''.  
-
       
 
## Invoke ''Run Project'' on the project node.  
## Invoke ''Run Project'' on the project node.  
-
       
 
#* {{result|EXPECTED RESULT: Application should be started under Java Web Start. }}  
#* {{result|EXPECTED RESULT: Application should be started under Java Web Start. }}  
-
           
 
# {{testcase|Mobile Emulator (Windows only)}}
# {{testcase|Mobile Emulator (Windows only)}}
-
   
 
## Invoke '' Properties '' on project node.  
## Invoke '' Properties '' on project node.  
-
       
 
## Select '' Run '' under categories.  
## Select '' Run '' under categories.  
-
       
 
## Select '' Run in Mobile Emulator '' check box.  
## Select '' Run in Mobile Emulator '' check box.  
-
       
 
## Press '' OK ''.  
## Press '' OK ''.  
-
       
 
## Invoke ''Run Project'' on the project node.  
## Invoke ''Run Project'' on the project node.  
-
       
 
#* {{result|EXPECTED RESULT: Application should be started in the Mobile Emulator. }}  
#* {{result|EXPECTED RESULT: Application should be started in the Mobile Emulator. }}  
-
           
 
# {{testcase|Applet parameters}}
# {{testcase|Applet parameters}}
-
   
 
## Invoke '' Properties '' on project node.  
## Invoke '' Properties '' on project node.  
-
       
 
## Select '' Application'' under categories.  
## Select '' Application'' under categories.  
-
       
 
## Set ''width'' to 450.  
## Set ''width'' to 450.  
-
       
 
## Set ''height'' to 450.  
## Set ''height'' to 450.  
-
       
 
## Set ''Draggable Applet'' check box.  
## Set ''Draggable Applet'' check box.  
-
       
 
## Select '' Run '' under categories.  
## Select '' Run '' under categories.  
-
       
 
## Select '' Run in Browser '' check box.  
## Select '' Run in Browser '' check box.  
-
       
 
## Press '' OK ''.  
## Press '' OK ''.  
-
       
 
## Invoke ''Run Project'' on the project node.  
## Invoke ''Run Project'' on the project node.  
-
       
 
## Click &lt;Alt&gt; and drag the applet from a browser (Works only with Firefox 3.0 and JDK 6u12 or later).  
## Click &lt;Alt&gt; and drag the applet from a browser (Works only with Firefox 3.0 and JDK 6u12 or later).  
-
       
 
#* {{result|EXPECTED RESULT: Applet should be started in Browser. }}  
#* {{result|EXPECTED RESULT: Applet should be started in Browser. }}  
-
           
 
#* {{result|EXPECTED RESULT: Applet should be dragged from Browser (Works only with Firefox 3.0 and JDK 6u12 or later). }}  
#* {{result|EXPECTED RESULT: Applet should be dragged from Browser (Works only with Firefox 3.0 and JDK 6u12 or later). }}  
-
           
 
# {{testcase|Self Signed Jar}}
# {{testcase|Self Signed Jar}}
-
   
 
## Invoke '' Properties '' on project node.  
## Invoke '' Properties '' on project node.  
-
       
 
## Select '' Application'' under categories.  
## Select '' Application'' under categories.  
-
       
 
## Set ''Self Signed Jar'' check box.  
## Set ''Self Signed Jar'' check box.  
-
       
 
## Select '' Run '' under categories.  
## Select '' Run '' under categories.  
-
       
 
## Select '' Run in Browser '' check box.  
## Select '' Run in Browser '' check box.  
-
       
 
## Press '' OK ''.  
## Press '' OK ''.  
-
       
 
## Invoke ''Run Project'' on the project node.  
## Invoke ''Run Project'' on the project node.  
-
       
 
#* {{result|EXPECTED RESULT: Applet should be started in Browser. }}  
#* {{result|EXPECTED RESULT: Applet should be started in Browser. }}  
-
           
 
# {{testcase|Pack200 Compression}}
# {{testcase|Pack200 Compression}}
-
   
 
## Invoke '' Properties '' on project node.  
## Invoke '' Properties '' on project node.  
-
       
 
## Select '' Application'' under categories.  
## Select '' Application'' under categories.  
-
       
 
## Set ''Pack200 Compression'' check box.  
## Set ''Pack200 Compression'' check box.  
-
       
 
## Select '' Run '' under categories.  
## Select '' Run '' under categories.  
-
       
 
## Select '' Run in Browser '' check box.  
## Select '' Run in Browser '' check box.  
-
       
 
## Press '' OK ''.  
## Press '' OK ''.  
-
       
 
## Invoke ''Run Project'' on the project node.  
## Invoke ''Run Project'' on the project node.  
-
       
 
#* {{result|EXPECTED RESULT: Applet should be started in Browser. }}  
#* {{result|EXPECTED RESULT: Applet should be started in Browser. }}  
-
           
 
<br>
<br>
    
    
Line 886: Line 607:
      
      
# {{testcase|WeatherFX Application}}
# {{testcase|WeatherFX Application}}
-
   
 
##  Invoke 'File | New Project...' from the main menu bar.   
##  Invoke 'File | New Project...' from the main menu bar.   
-
       
 
##  Select ''Samples|JavaFX'' under Categories.   
##  Select ''Samples|JavaFX'' under Categories.   
-
       
 
##  Select ''JavaFX Weather Application'' sample.   
##  Select ''JavaFX Weather Application'' sample.   
-
       
 
##  Run the sample.  
##  Run the sample.  
-
       
 
#* {{result|EXPECTED RESULT:  The sample should start. }}  
#* {{result|EXPECTED RESULT:  The sample should start. }}  
-
           
 
# {{testcase|Best Practices}}
# {{testcase|Best Practices}}
-
   
 
##  Invoke 'File | New Project...' from the main menu bar.   
##  Invoke 'File | New Project...' from the main menu bar.   
-
       
 
##  Select ''Samples|JavaFX|Building Blocks'' under Categories.   
##  Select ''Samples|JavaFX|Building Blocks'' under Categories.   
-
       
 
##  Select a sample.   
##  Select a sample.   
-
       
 
##  Run the sample.  
##  Run the sample.  
-
       
 
#* {{result|EXPECTED RESULT:  The sample should start. }}  
#* {{result|EXPECTED RESULT:  The sample should start. }}  
-
           
 
# {{testcase|SDK Samples}}
# {{testcase|SDK Samples}}
-
   
 
##  Invoke 'File | New Project...' from the main menu bar.   
##  Invoke 'File | New Project...' from the main menu bar.   
-
       
 
##  Select ''Samples|JavaFX'' under Categories.   
##  Select ''Samples|JavaFX'' under Categories.   
-
       
 
##  Select a sample.   
##  Select a sample.   
-
       
 
##  Run the sample.  
##  Run the sample.  
-
       
 
#* {{result|EXPECTED RESULT:  The sample should start. }}  
#* {{result|EXPECTED RESULT:  The sample should start. }}  
-
           
 
# {{testcase|Meadi Box Samples}}
# {{testcase|Meadi Box Samples}}
-
   
 
##  Invoke 'File | New Project...' from the main menu bar.   
##  Invoke 'File | New Project...' from the main menu bar.   
-
       
 
##  Select ''Samples|JavaFX'' under Categories.   
##  Select ''Samples|JavaFX'' under Categories.   
-
       
 
##  Select ''Media Box'' sample.   
##  Select ''Media Box'' sample.   
-
       
 
##  Run the sample.  
##  Run the sample.  
-
       
 
#* {{result|EXPECTED RESULT:  The Media Box sample should show a movie. }}  
#* {{result|EXPECTED RESULT:  The Media Box sample should show a movie. }}  
-
           
 
<br>
<br>

Revision as of 14:21, 3 March 2010

Sanity Tests Specification

Author: Alexandr Scherbatiy
Version: 1.2
Last update: 02 March 2010
Introduction:
Comments:


Contents


Test suite: Installation

Purpose:
Setup:

  1. Install JavaFX Script plugin via installer
    1. Download the NetBeans with JavaFX Script.
    2. Install it.
    • EXPECTED RESULT: NetBeans with JavaFX Script Plugin should be installed without errors.
    • EXPECTED RESULT: It is possible to crate a JavaFX Script project.
  2. Uninstall JavaFX Script plugin
    1. Run the NetBeans with JavaFX Script plugin.
    2. Invoke 'Tools|Plugins' from the main menu bar.
    3. Go to Installed tab.
    4. Type javafx in the Search text field.
    5. Select JavaFX Kit, JavaFX SDK for Linux/OpenSolaris/Mac/windows, JavaFX Weather Sample modules.
    6. Press Uninstall
    7. Uninstall the plugins.
    8. Restart the IDE.
    • EXPECTED RESULT: It is not possible to crate a JavaFX Script project.
    • EXPECTED RESULT: NetBeans installation dir does not contain javafx2 cluster.
  3. Install JavaFX Script plugin via Update Center
    1. Download NetBeans (JavaSE, Ruby, PHP or All).
    2. Install it.
    3. Run the NetBeans with JavaFX Script plugin.
    4. Invoke 'Tools|Plugins' from the main menu bar.
    5. Go to Available Plugins tab.
    6. Type javafx in the Search text field.
    7. Select JavaFX Source Debug, JavaFX 1.0, JavaFX SDK, JavaFX Weather Sample modules.
    8. Install the plugins.
    9. Restart the IDE.
    • EXPECTED RESULT: JavaFX Script Plugin should be installed without errors.
    • EXPECTED RESULT: It is possible to crate a JavaFX Script project.


Test suite: Project

Purpose:
Setup:

  1. Create New Application
    1. Invoke 'File | 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 JavaFXApp.
    6. Click Finish.
    • EXPECTED RESULT: JavaFXApp should be created in the Projects window.
  2. Check Main file
    • EXPECTED RESULT: Main JavaFX file should be opened.
    • EXPECTED RESULT: Check that the Main file contains code:
   
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"
            }
        ]
    }
}  		 
  1. 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.
  2. 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.
  3. 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 {
}
 		 
  1. 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.
  2. 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"
            }
        ]
    }
} 		 
  1. 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 {
}
 		 
  1. 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.
  2. 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.


Test suite: Editor

Purpose:
Setup:

  1. Type Code in Editor
    1. Type the following code in the JavaFX editor:
   
var radius = 10;

function sqr(a:Number):Number{
    return a * a;
}   		 
    • EXPECTED RESULT: The code should be typed without any exception.
  1. Highlighting
    • EXPECTED RESULT: The import statement should be highlighted
    • EXPECTED RESULT: The var statement should be highlighted
    • EXPECTED RESULT: The function statement should be highlighted
    • EXPECTED RESULT: The name of radius variable should be highlighted
    • EXPECTED RESULT: The name of sqr function should be highlighted
  2. Templates
    1. Type sout in the editor.
    2. Type Press Tab key.
    • EXPECTED RESULT: java.lang.System.out.println(""); line should appear in the editor.
    • EXPECTED RESULT: There should not be any error in the editor.
  3. Build Project
    1. Invoke 'Build Project' on the project node.
    • EXPECTED RESULT: The JavaFX application should build without errors.
  4. Run Project
    1. Invoke 'Run Project' on the project node.
    • EXPECTED RESULT: The JavaFX application should build without errors.
  5. Preview
    1. Save the JavaFX file (Ctrl+S).
    2. Enable the Preview.
    3. Wait a few seconds.
    • EXPECTED RESULT: The image of JavaFX application should be shown in the preview panel.
  6. Javadoc
    1. Create Contact JavaFX class:
   
class Contact{
    var firstName: String;
    var lastName: String;
    var eMailAddress: String[];

    public override function toString():String { "{firstName} {lastName}" }
}   		 
    1. Invoke 'Generate Javadoc for Project' on the project node.
    • EXPECTED RESULT: The Javadoc should appear in a browser.
    • EXPECTED RESULT: The Javadoc should contain Contact class.
    • EXPECTED RESULT: The Contact class should contain firstName,lastName and eMailAddress attributes.
    • EXPECTED RESULT: The Contact class should contain toString function.
  1. Palette
    1. Drag and drop Applications|Stage component from the Palette to the editor.
    2. Drag and drop Basic Shapes|Circle component from the Palette to the Scene content.
    3. Run the project
    • EXPECTED RESULT: Frame with circle should appear.
  2. Navigator
    1. Create a new Empty JavaFX file.
    2. Type in the editor:
   
var a = 10;
var b = true;
var c = 20.0;
var d = 30s;

var seq = ["1","2","3"];

var f : function(a:Number,b:String):Boolean;

class A{}  		 
    • EXPECTED RESULT: There should be a:Integer node in the Navigator
    • EXPECTED RESULT: There should be b:Boolean node in the Navigator
    • EXPECTED RESULT: There should be c:Float node in the Navigator
    • EXPECTED RESULT: There should be d:javafx.lang.Duration node in the Navigator
    • EXPECTED RESULT: There should be f:function(:Float,:String):Boolean node in the Navigator
    • EXPECTED RESULT: There should be seq:java.lang.String[] node in the Navigator
    • EXPECTED RESULT: There should be A node in the Navigator
  1. Go to Declaration
    1. Create a new Empty JavaFX file.
    2. Type code:
   
var a = 10;
var b = a + 20;

class C{
    var attr: Number;
    function func(){};
}

var c  = C{}
c.attr = 10;
c.func(); 		 
    1. Hold Ctrl and click mouse a in var b = a + 20; line.
    • {{{1}}}
  1. Go to Source
    1. Type code:
   
import javafx.animation.Timeline;
var timeline = Timeline{};  		 
    1. Hold Ctrl and click mouse Timeline.
    • EXPECTED RESULT: Timeline.fx class should be open.
  1. Fix Imports
    1. Create a new Empty JavaFX file.
    2. Type code:
   
Stage {
    title: "Application title"
    width: 250
    height: 80
    scene: Scene {
        content: Circle {
            centerX: 100,
            centerY: 100
            radius: 40
            fill: Color.BLACK
        }
    }
}
 		 
    1. Fix imports (Invoke Fix Imports popup menu or press Ctrl+Shift+I)
    • EXPECTED RESULT: Imports should be fixed.
    • EXPECTED RESULT: Code should be compilable.
  1. Code Formatting
    1. Type code:
   
import javafx.stage.*;
import javafx.scene.*;
import javafx.scene.paint.*;
import javafx.scene.shape.*;

Stage {
title: "Application title"
width: 250
height: 80
scene: Scene {
content: Circle {
centerX: 100,
centerY: 100
radius: 40
fill: Color.BLACK
}
}
}
 		 
    1. Format code (Invoke Format popup menu or press Alt+Shift+F)
    • EXPECTED RESULT: Code should be formatted.
    • EXPECTED RESULT: Code should be compilable.
  1. Code Completion
    1. Type code:
   
import javafx.animation.Timeline;

var timeline = Timeline{};
 		 
    1. Press Ctrl+Space
    2. Select timeline variable from the list.
    3. Type . after the timeline variable.
    4. Press Ctrl+Space
    5. Select play() function from the list.
    • EXPECTED RESULT: Code Completion should work.
    • EXPECTED RESULT: Code should be compilable.


Test suite: Debug

Purpose:
Setup:

  1. Debug Project
    1. Create a JavaFX Script project.
    2. Press Debug Main Project button.
    3. Press Finish Debugger Session button.
    • EXPECTED RESULT: Debugger should start.
    • EXPECTED RESULT: Debugger should stop.
  2. Set Breakpoints
    1. Create a JavaFX Script project.
    2. Copy the code to the Main file:
   
var a = 10;
var b = 20.5;

var c = a + b;
  		 
    1. Set breakpoints (click on the Glyph Gutter in the editor) for a, b and c variables
    2. Debug the project (press <Ctrl+F5>).
    3. Continue debug the project (press <F5>) for each variable.
    • EXPECTED RESULT: Debugger should stop on each breakpoint.
    • EXPECTED RESULT: Debugger should stop after end of the project.
  1. Watches Window
    1. Create a JavaFX Script project.
    2. Copy the code to the Main file:
   
var a = 10;
var b = 20.5;

var c = a + b;
print(c);
 		 
    1. Set breakpoints for print(c); line
    2. Debug the project (press <Ctrl+F5>).
    3. Go to Watches window.
    4. Right-click and select New Watch...
    5. Type a + 10 for the watch expression.
    6. Right-click and select New Watch...
    7. Type c * 2 for the watch expression.
    • EXPECTED RESULT: There should be 20 value for the a + 10 expression.
    • EXPECTED RESULT: There should be 61.0 value for the c * 2 expression.
  1. Local Variables Window
    1. Create a JavaFX Script project.
    2. Copy the code to the Main file:
   
var a = 10;
var b = 20.5;

var c = true;

class D{
    var attr: Number;
}

var d = D{ attr: 22 }
println(d);
 		 
    1. Set breakpoints for println(d); line
    2. Debug the project (press <Ctrl+F5>).
    3. Go to Locale Variables window.
    • EXPECTED RESULT: There should be a
    • EXPECTED RESULT: There should be b
    • EXPECTED RESULT: There should be c
    • EXPECTED RESULT: There should be d
    • EXPECTED RESULT: There should be attr
  1. Call Stack
    1. Create a JavaFX Script project.
    2. Copy the code to the Main file:
   
var a = 10;
var b = 20.5;

var c = a + b;
  		 
    1. Set breakpoints for a, b and c variables
    2. Debug the project (press <Ctrl+F5>).
    3. Go to Call Stack window.
    • EXPECTED RESULT: The current program call stack should be shown.
  1. Breakpoints Window
    1. Create a JavaFX Script project.
    2. Copy the code to the Main file:
   
var a = 10;
var b = 20.5;

var c = a + b;
  		 
    1. Set breakpoints for a, b and c variables
    2. Debug the project (press <Ctrl+F5>).
    3. Go to Breakpoints window.
    • EXPECTED RESULT: The Breakpoints window should show set berakpoints.
  1. Step Into
    1. Create a JavaFX Script project.
    2. Copy the code to the Main file:
   
function a (){
    println("a");
}

function b(){
    a();
}

b();    
    1. Set a breakpoint for the b() call on the last line
    2. Debug the project (press <Ctrl+F5>).
    3. Press Step Into button (press <F7>) on the toollbar.
    • EXPECTED RESULT: The green line should point to the b function body.


Test suite: Profile

Purpose:
Setup:

  1. CPU mode
    1. Create a JavaFX Script project that contains a Stage.
   
import javafx.stage.*;

import javafx.scene.*;
import javafx.scene.text.*;
import javafx.scene.paint.*;
import javafx.scene.effect.*;


Stage {
    title: "Hello World"
    width: 250
    height: 80
    scene: Scene {
        content: Text {
            x: 10  y: 30
            font: Font { size: 24 }
            fill: Color.BLUE
            effect: DropShadow{ offsetX: 3 offsetY: 3}
            content: "Hello World!"
        }
    }
}   
    1. Press Profile Main Project... toolbar button.
    2. Press OK on Enable Profiling dialog if it appears.
    3. Select CPU.
    4. Press Run.
    • EXPECTED RESULT: The application should start.
    1. Close the application.
    • EXPECTED RESULT: The application should stop.
  1. Live results
    1. Profile the Project from test case 5.1 (Do not close it).
    2. Press Live Results button on the Profiler Control Panel in NetBeans.
    3. Type run in the filter text field.
    4. Select javafxapplication.Main.javafx$run$(com.sun.javafx.runtime.sequence.Sequence) method and invoke Go to source.
    • EXPECTED RESULT: Main.fx file should open.
  2. Take Snapshot
    1. Profile the Project from test case 5.1 (Do not close it).
    2. Press Take Snapshot button on the Profiler Control Panel in NetBeans.
    3. Select Main.main(String[]) method and invoke Go to source.
    4. Check Call Tree, Hot Spots, Compined and Info tabs.
    • EXPECTED RESULT: Main.fx file should open.
  3. Memory mode
    1. Create a JavaFX Script project.
    2. Press Profile Main Project... toolbar button.
    3. Press OK on Enable Profiling dialog if it appears.
    4. Select Memory.
    5. Press Run.
    • EXPECTED RESULT: The application should start.
    1. Close the application.
    • EXPECTED RESULT: The application should stop.
  4. Monitor mode
    1. Create a JavaFX Script project.
    2. Press Profile Main Project... toolbar button.
    3. Press OK on Enable Profiling dialog if it appears.
    4. Select Monitor.
    5. Press Run.
    • EXPECTED RESULT: The application should start.
    1. Close the application.
    • EXPECTED RESULT: The application should stop.
  5. Threads
    1. Profile the Project in CPU mode.
    2. Press Threads button on the Profiler Control Panel in NetBeans.
    3. Press the icon to enable threads on the Threads window.
    • EXPECTED RESULT: Threads should be shown on the Threads window
  6. VM Telemetry
    1. Profile the Project in CPU mode.
    2. Press VM Telemetry button on the Profiler Control Panel in NetBeans.
    • EXPECTED RESULT: The VM Telemetry window should open.


Test suite: Web Deployment

Purpose:
Setup: Check that JRE plugin is installed in FireFox (Ubuntu and others OSes)

  1. Applet
    1. Invoke Properties on project node.
    2. Select Run under categories.
    3. Select Run in Browser check box.
    4. Press OK .
    5. Invoke Run Project on the project node.
    • EXPECTED RESULT: Applet should be started in Browser.
  2. Java Web Start
    1. Invoke Properties on project node.
    2. Select Run under categories.
    3. Select Web Start Execution check box.
    4. Press OK .
    5. Invoke Run Project on the project node.
    • EXPECTED RESULT: Application should be started under Java Web Start.
  3. Mobile Emulator (Windows only)
    1. Invoke Properties on project node.
    2. Select Run under categories.
    3. Select Run in Mobile Emulator check box.
    4. Press OK .
    5. Invoke Run Project on the project node.
    • EXPECTED RESULT: Application should be started in the Mobile Emulator.
  4. Applet parameters
    1. Invoke Properties on project node.
    2. Select Application under categories.
    3. Set width to 450.
    4. Set height to 450.
    5. Set Draggable Applet check box.
    6. Select Run under categories.
    7. Select Run in Browser check box.
    8. Press OK .
    9. Invoke Run Project on the project node.
    10. Click <Alt> and drag the applet from a browser (Works only with Firefox 3.0 and JDK 6u12 or later).
    • EXPECTED RESULT: Applet should be started in Browser.
    • EXPECTED RESULT: Applet should be dragged from Browser (Works only with Firefox 3.0 and JDK 6u12 or later).
  5. Self Signed Jar
    1. Invoke Properties on project node.
    2. Select Application under categories.
    3. Set Self Signed Jar check box.
    4. Select Run under categories.
    5. Select Run in Browser check box.
    6. Press OK .
    7. Invoke Run Project on the project node.
    • EXPECTED RESULT: Applet should be started in Browser.
  6. Pack200 Compression
    1. Invoke Properties on project node.
    2. Select Application under categories.
    3. Set Pack200 Compression check box.
    4. Select Run under categories.
    5. Select Run in Browser check box.
    6. Press OK .
    7. Invoke Run Project on the project node.
    • EXPECTED RESULT: Applet should be started in Browser.


Test suite: Samples

Purpose:
Setup:

  1. WeatherFX Application
    1. Invoke 'File | New Project...' from the main menu bar.
    2. Select Samples|JavaFX under Categories.
    3. Select JavaFX Weather Application sample.
    4. Run the sample.
    • EXPECTED RESULT: The sample should start.
  2. Best Practices
    1. Invoke 'File | New Project...' from the main menu bar.
    2. Select Samples|JavaFX|Building Blocks under Categories.
    3. Select a sample.
    4. Run the sample.
    • EXPECTED RESULT: The sample should start.
  3. SDK Samples
    1. Invoke 'File | New Project...' from the main menu bar.
    2. Select Samples|JavaFX under Categories.
    3. Select a sample.
    4. Run the sample.
    • EXPECTED RESULT: The sample should start.
  4. Meadi Box Samples
    1. Invoke 'File | New Project...' from the main menu bar.
    2. Select Samples|JavaFX under Categories.
    3. Select Media Box sample.
    4. Run the sample.
    • EXPECTED RESULT: The Media Box sample should show a movie.


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