TS 73 GroovyGrails Sanity

(Difference between revisions)
Line 1: Line 1:
=='''Sanity''' Test Specification for NetBeans Groovy and Grails Support Functionality==
=='''Sanity''' Test Specification for NetBeans Groovy and Grails Support Functionality==
-
'''Author:''' [mailto:jose.galaviz@perroazul.net Jose Galaviz]<br>
+
'''Author:''' [mailto:jose.galaviz@perroazul.net Jose Galaviz], based on [http://wiki.netbeans.org/GroovyGrailsTests GroovyGrailsTests]<br>
'''Last update:''' October 18, 2012 <br>
'''Last update:''' October 18, 2012 <br>
'''NetBeans version:''' NetBeans 7.3 <br>
'''NetBeans version:''' NetBeans 7.3 <br>
Line 30: Line 30:
Purpose: Test verifies that the integration of Groovy on a JDK project will work correctly<br>
Purpose: Test verifies that the integration of Groovy on a JDK project will work correctly<br>
Expected time: 5 minutes<br>
Expected time: 5 minutes<br>
-
# {{testcase|Create a new JDK project}}
+
# {{testcase|Create a new ant-based JDK project}}
 +
## From the menu, select ''File'' → ''New Project''
 +
## On ''Categories'', select ''Java'' and in ''Projects'' select ''Java Application'', then click on ''Next''
 +
## Leave the default project name and settings
 +
## Click on ''Finish'' (it will take a while also)
 +
## Right-click on the created package and select ''New'' → ''Other''
 +
## On the ''New File'' dialog window, select ''Groovy'' in ''Categories'' and ''Groovy Class'' as ''File type''
 +
## Leave the default name and settings and click on ''Finish''
 +
## Within the newly created class, we must create a new method that sould look as follows:
 +
<pre>
 +
class NewGroovyClass {
 +
   
 +
    def runIt() {
 +
        println 'groovyshly'
 +
    }
 +
   
 +
}
 +
</pre><br/>
 +
## We now go to the default main class, and we create an instance of the Groovy class and call the method from the Java main class. The Java class must be as follows:
 +
<pre>
 +
public static void main(String[] args) {
 +
    NewGroovyClass ngc = new NewGroovyClass();
 +
    ngc.runIt();
 +
}
 +
</pre><br/>
 +
## Press ''F6''
 +
#* {{result|EXPECTED RESULT: The output window shows the text "Groovyshly".}}
 +
# {{testcase|Create a new maven-based JDK project}}
 +
## From the menu, select ''File'' → ''New Project''
 +
## On ''Categories'', select ''Maven'' and in ''Projects'' select ''Java Application'', then click on ''Next''
 +
## Leave the default project name and settings
 +
## Click on ''Finish'' (it will take a while also)
 +
## Right-click on the created package and select ''New'' → ''Other''
 +
## On the ''New File'' dialog window, select ''Groovy'' in ''Categories'' and ''Groovy Class'' as ''File type''
 +
## Leave the default name and settings and click on ''Finish''
 +
## Within the newly created class, we must create a new method that sould look as follows:
 +
<pre>
 +
class NewGroovyClass {
 +
   
 +
    def runIt() {
 +
        println 'groovyshly'
 +
    }
 +
   
 +
}
 +
</pre><br/>
 +
## We now go to the default main class, and we create an instance of the Groovy class and call the method from the Java main class. The Java class must be as follows:
 +
<pre>
 +
public static void main(String[] args) {
 +
    NewGroovyClass ngc = new NewGroovyClass();
 +
    ngc.runIt();
 +
}
 +
</pre><br/>
 +
## Press ''F6''.
 +
#* {{result|EXPECTED RESULT: The output window shows the text "Groovyshly".}}
==== Test suite: Grails plugin ====
==== Test suite: Grails plugin ====
Purpose: Test verifies the Grails plugin manager<br>
Purpose: Test verifies the Grails plugin manager<br>
Line 43: Line 96:
## Right click on the project node and then 'Run''
## Right click on the project node and then 'Run''
#* {{result|EXPECTED RESULT: When the initial page is shown, the selected plugin must be shown on the installed plugins list.}}
#* {{result|EXPECTED RESULT: When the initial page is shown, the selected plugin must be shown on the installed plugins list.}}
 +
# {{testcase|Uninstall a plugin}}
## Right click on the project node and then ''Grails plugins...''
## Right click on the project node and then ''Grails plugins...''
## Stay on the ''Installed'' tab
## Stay on the ''Installed'' tab

Revision as of 20:01, 22 October 2012

Sanity Test Specification for NetBeans Groovy and Grails Support Functionality

Author: Jose Galaviz, based on GroovyGrailsTests
Last update: October 18, 2012
NetBeans version: NetBeans 7.3
Introduction: Test cases for sanity testing of NetBeans Groovy and Grails Support functionality.

Contents

Prerequisites

Tests

Test suite: Create grails project

Purpose: Test verifies that the default project will run and create basic files correctly
Expected time: 5 minutes
Setup: Start IDE with clear userdir

  1. Create a new project
    1. From the menu, select FileNew Project
    2. On Categories, select Groovy and in Projects select Grails Application, then click on Next (this may take a while if is activating the Groovy features)
    3. Leave the default project name
    4. Click on Finish (it will take a while also)
    5. Right click on the project node and then Run
  2. Debug the project
    1. Right click on the project node and then Debug
  3. Test the project
    1. Right click on the project node and then Test
    • EXPECTED RESULT: The output window must show the message " Tests PASSED - view reports in <path>".

Test suite: Groovy on Java Project

Purpose: Test verifies that the integration of Groovy on a JDK project will work correctly
Expected time: 5 minutes

  1. Create a new ant-based JDK project
    1. From the menu, select FileNew Project
    2. On Categories, select Java and in Projects select Java Application, then click on Next
    3. Leave the default project name and settings
    4. Click on Finish (it will take a while also)
    5. Right-click on the created package and select NewOther
    6. On the New File dialog window, select Groovy in Categories and Groovy Class as File type
    7. Leave the default name and settings and click on Finish
    8. Within the newly created class, we must create a new method that sould look as follows:
class NewGroovyClass {
    
    def runIt() {
        println 'groovyshly'
    }
    
}

    1. We now go to the default main class, and we create an instance of the Groovy class and call the method from the Java main class. The Java class must be as follows:
public static void main(String[] args) {
    NewGroovyClass ngc = new NewGroovyClass();
    ngc.runIt();
}

    1. Press F6
    • EXPECTED RESULT: The output window shows the text "Groovyshly".
  1. Create a new maven-based JDK project
    1. From the menu, select FileNew Project
    2. On Categories, select Maven and in Projects select Java Application, then click on Next
    3. Leave the default project name and settings
    4. Click on Finish (it will take a while also)
    5. Right-click on the created package and select NewOther
    6. On the New File dialog window, select Groovy in Categories and Groovy Class as File type
    7. Leave the default name and settings and click on Finish
    8. Within the newly created class, we must create a new method that sould look as follows:
class NewGroovyClass {
    
    def runIt() {
        println 'groovyshly'
    }
    
}

    1. We now go to the default main class, and we create an instance of the Groovy class and call the method from the Java main class. The Java class must be as follows:
public static void main(String[] args) {
    NewGroovyClass ngc = new NewGroovyClass();
    ngc.runIt();
}

    1. Press F6.
    • EXPECTED RESULT: The output window shows the text "Groovyshly".

Test suite: Grails plugin

Purpose: Test verifies the Grails plugin manager
Expected time: 5 minutes

  1. Install a plugin
    1. Right click on the project node and then Grails plugins...
    2. Go to the tab New Plugins and wait for the list to load
    3. Select any of the plugins and then click on the button Install
    4. Click on Close
    5. Go to the Services Window, find the Jetty Server, expand the node and stop the application with the context menu
    6. Go back to the Project window
    7. Right click on the project node and then 'Run
    • EXPECTED RESULT: When the initial page is shown, the selected plugin must be shown on the installed plugins list.
  2. Uninstall a plugin
    1. Right click on the project node and then Grails plugins...
    2. Stay on the Installed tab
    3. Select any of the plugins and then click on the button Uninstall
    4. Click on Close
    5. Go to the Services Window, find the Jetty Server, expand the node and stop the application with the context menu
    6. Go back to the Project window
    7. Right click on the project node and then 'Run
    • EXPECTED RESULT: When the initial page is shown, the deleted plugin must no longer be shown on the installed plugins list.
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