TS 61 SpringSupport

Spring Support Test Specification for NetBeans 6.0

Author: Andrei Badea, Jan Horvath
Version: 1.0
Last update: 18.2.2008
Introduction: This document contains procedures for testing Spring Support
Comments:

Contents


Test suite: Project support (Java SE, EJB, Maven, web project)

  1. Create new project.
    1. Create new project.
    2. Add Spring Framework library.
    3. Create new Spring file:
      1. invoke File - New File - Spring Framework - Spring XML Configuration file
      2. select the source root as the target
      3. select some namespaces
    • EXPECTED RESULT:
      Check that the file was generated correctly (it is a well-formed, namespace declarations are present).
  1. Create another Spring file.
    1. Create a new Spring config file group:
      1. open project customize, select the Spring Framework category
      2. create a new group
      3. add the two Spring config files above
      4. press OK in the customizer
  1. {{testcase|Edit the config file group:
      1. open project customize, select the Spring Framework category
      2. make sure the group is present and it contains the two config files
      3. remove one on the files
      4. press OK
    • EXPECTED RESULT:
      Open the customizer again and make sure the config file group now only contains the second file.

Test suite: Spring Web MVC support in web project

  1. Create new web project with the Spring Web MVC framework
    1. invoke New Web Application wizard
    2. on the frameworks panel select the Spring Web MVC 2.5 framework
    3. insert a different dispatcher name, e.g., "spring", and another dispatcher mapping, e.g., "/app/*"
    4. finish the wizard
    • EXPECTED RESULT: Check the files were generated correctly: web/WEB-INF/applicationContext.xml, web/WEB-INF/spring-servlet.xml, web/WEB-INF/index.jsp (containing a redirect to /app/index), web/WEB-INF/jsp/index.jsp.
    1. Check there is a config file group named "Default" which contains the two files above.
    2. Run the project, check that it displays the contents of web/WEB-INF/jsp/index.jsp.
    3. Invoke the Spring Web MVC controller wizards (Spring Framework - Abstract Controller and Simple Form Controller).

Test suite: Code completion

  1. Test Code completion in configuration file
    1. Create a new org.example.FooService Java class
    2. Check the code completion for Java classes:
      1. in applicationContext.xml insert

    <bean id="fooService" class="

      1. invoke the code completion, select "org", then "example", then "FooService".
      2. alternately, type "FooS", invoke the code completion and select "FooService (org.example)". The whole class name should be completed.
      3. finish the bean definition to
    •  <bean id="fooService" class="org.example.FooService"/> 
    1. Check the code completion for bean names:
      1. in applicationContext.xml insert
    •  <bean id="foo" parent=" 
      1. invoke the code completion, select "fooService". The "fooService" bean name should be completed.
      2. finish the bean definition to
    •  <bean id="foo" parent="fooService"/> 
  1. Test Code completion using EL in JSP file
    1. Create new Java Web project with Spring framework (or use project from previous test cases)
    2. Create new bean class, use the code below:
package foobeans;

import org.springframework.stereotype.Controller;

@Controller
public class FooBean {
    
    private String name;

    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }
}
    1. Open jsp file (redirect.jsp), type "#{f.|" and invoke cc at the place of "|"
    2. "fooBean should be offered by code completion, invoke cc at "#{fooBean.|"
    • Property "name" is offered

Test suite: Hyperlinking

  1. Check that hyperlinking works for
    •  <bean id="fooService" class="org.example.FooService"/> 
  2. {{testcase|Check that hyperlinking works for
    • <bean id="foo" parent="fooService"/> 
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