Tomcat integration Test Specification

Author: Marek Fukala
Version: 1.1
Last update: 15-th Septemter 2005
Introduction: The Tomcat integration module is built on the j2eemodule and together with the web module it integrates a tomcat server installation into the IDE. Besides deployment and execution of webmodules/servlets and JSPs it allows to do a simple server management including working with contexts, logs etc. Note that all debugger functionality and features are not mentioned in this specification since it is a part of web module debugging test specification.
Comment:

  • Changes: Suites Web Project run properties and Edit context file added Petr Blaha
  • Updated by Jaroslav Pospisil.

Table of Contents

Test suite 1: Server registry

Purpose: To verify a tomcat server instance can be easily added/removed and used within the IDE.
Setup: Install the Apache Tomcat 5.0.28 and 5.5.9 server on your system.

#Test caseDescription
1Check the built in tomcat server instance presence and default properties.
1. Go to the Runtime window and expand the Server Registry/Tomcat server instances nodes.
2. Click on the Bundled Tomcat node representing the default server installation(instance).
RESULT: Check if the default instance is present and has set following default properties:
2Remove default instance
1. Perform 'Remove' action on the default tomcat installation node
RESULT: The node should disappear and the server should be stopped.
3Add the default tomcat installation back
1. Perform 'Add New Server...' action on Tomcat Servers node.
2. In the opened dialog fill up Install Directory field with $IDE_HOME/jakarta-tomcat-5.X.YY value.
3. Enable the shared installation checkbox and put there $USER_DIR/jakarta-tomcat-5.X.YY_base value
4. Enter administrator's name (ide) and password (look at $USER_DIR/jakarta-tomcat-5.X.YY_base/conf/tomcat-users.xml).
RESULT: A new subnode representing the default tomcat server should appear under the Tomcat Servers node.
4Add a new server installation
1. Perform 'Add New Server...' action on Tomcat Servers node.
2. In the opened dialog fill up Install Directory field with the path where you installed you tomcat 5 server.Do this with both external Tomcats.
3. Enter administrator's name and password.
4. Leave the other item untouched and click OK.
RESULT: A new subnode representing externally added tomcat server should appear under the Tomcat Server Instancies node.
5Check properties of the added tomcat installation
1. Select the new tomcat node and check its properties.
RESULT: If you haven't made any changes in your tomcat installation, most of the properties values should be the same as in case of the internall tomcat installation.
6Add a new shared server installation
1. Perform 'Add New Server...' action on Tomcat Servers node.
2. In the opened dialog fill up Install Directory field with the path where you installed your tomcat 5 server.
3. Enable the shared installation checkbox and put there your shared directory ($CATALINA_BASE). for more information about shared directory read $TOMCAT_HOME/src/jakarta-tomcat-5/RUNNING.txt document.
4. Enter administrator's name and password.
5. Leave the other item untouched and click OK.
RESULT: A new subnode representing externally added tomcat server should appear under the Tomcat Server Instancies node.
7Check properties of the added shared tomcat installation
1. Select the new tomcat node and check its properties.
RESULT: If you haven't made any changes in your tomcat installation most of the properties values should be the same as in case of the internall tomcat instllation.
8Add a new server installation without http monitor enabled.
1. Perform the same steps as in previous cases but uncheck the Enable HTTP Monitor checkbox in the Add server instance dialog.
RESULT: Check if the monitor filter is not installed by looking into $USER_DIR/jakarta-tomcat-5.X.YY_base/conf/web.xml. You can also try to deploy something and watch if the monitor is opened or not.
9Add a new outdated server version installation.
1. Perform 'Add New Server...' action on Tomcat Servers node.
2. Enter an installation directory of one of the previous versions of Tomcat, for example 4.1 or 4.0. Also try to do the same with a directory wich do not contains Tomcat at all.
3. Leave the other item untouched and click OK.
RESULT: Since versions older than 5.0.x are not supported the IDE should display a warning message reminding you that the installation you are trying to use is not supported/valid.
10Set default server
1. Add a new external tomcat installation.
2. Perform 'Set Default Server' action on the Server Registry node.
3. Select desired tomcat instance in the tree structure in the Select Default Server Target(s) dialog.
4. There should be displayed a tree like nodes structure similar to following:
 Server Registry - Tomcat Servers + default instance + another server instance + ... 

RESULT: The server registry node name should contain the selected instance. Default webmodule deployment should be performed on the selected server instance.
Teardown:

Next tests do for both Tomcats separately

Test suite 2: Tomcat server instance

Purpose: To verify a tomcat server instance is working propertly and all its actions and properties do what they are supposed to do.
Setup:

#Test caseDescription
1Start built-in tomcat server
1. Perform 'Start' action on the default tomcat instance node.
RESULT: The server should be successfully started. Check if there are startup messages in a output window. Verify if the instance node can be expanded and contains a list of deployed webmodules. Try to deploy a webmodule to verify if the server is running properly.
2Stop built-in tomcat server
1. Perform 'Stop' action on the default tomcat instance node.
RESULT: The server should be successfully stopped. You can verify it by opening server URL in your browser (e.g. http://localhost:8084. The browser shouldn't be able to connect.
3Start an external tomcat server
1. Add an external tomcat installation into the IDE
2. Perform 'Start' action on the tomcat instance node.
RESULT: The server should be successfully started. Check if there are startup messages in a output window. Verify if the instance node can be expanded and contains a list of deployed webmodules. Try to deploy a webmodule to verify if the server is running properly.
4Stop an externall tomcat server
1. Perform 'Stop' action on the default tomcat instance node.
RESULT: The server should be successfully stopped. You can verify it by opening server URL in your browser (e.g. http://localhost:8080. The browser shouldn't be able to connect.
5start tomcat server debug
1. Perform 'Start in Debug mode' action on the default tomcat instance node.
RESULT: The server should be successfully started. Check if there are startup messages in a output window. Verify if the instance node can be expanded and contains a list of deployed webmodules. Try to deploy a webmodule to verify if the server is running properly.
6Test command icons in Server Output window
1.Perform previous actions by using command icons in Output window.
RESULT: The results should be the same,as if you used context menu commands.
7View tomcat server logs
1. Start tomcat server .
2. Perform 'View Shared Context Log' and 'View Server Output' actions on the instance node.
RESULT: The corresponding server logs should be opened in the output window and their content should be updated as the server appends something to them.
8Change http connector and admin port from properties
1. Select desired tomcat instance in the runtime tab.
2. In the node properties change 'Server Port' value to for example 9999.
3. Change the Admin Port to 8001
4. Start the server.
RESULT: The server should be running on the specified port. Verify that the changes has been reflected to the configuration file $USER_DIR/conf/server.xml (open it from popup menu on server instance 'Edit server.xml').
9Change http connector and admin port from server.xml
1. On desired tomcat instance node click 'Edit server.xml' popup item.
2. Changed server port value to e.g. 9998.
3. Change the Admin Port to e.g. 8002.
4. Start the server.
RESULT: The server should be running on the specified port. Verify that the changes has been reflected to the properties sheet.
10Change the ports when the server is running
1. Select desired tomcat instance in the explorer.
2. In the node properties try to change 'Server Port' value to something else than the existing value.
RESULT: Since the server is currently running the IDE should warn you about that fact and do not allow to change the property.
11Change manager application user name and password
1. Select desired tomcat instance in the runtime tab.
2. In the node properties change 'User' to another value (12345) and do the some for the password.
3. Start the server.
RESULT: The server should be running on the specified port and a simple login dialog should be displayed. Fill up the original name/password. Than the access to the manager application from the IDE should work properly.
11Disable HTTP monitor
1. Select desired tomcat instance in the runtime tab.
2. In the node properties uncheck the 'Enable HTTP monitor' property.
3. Start the server.
RESULT: The server should be running and no http monitor window should be opened in the IDE. Verify that the conf/web.xml file do not contain the monitor servlet filter (HTTPMonitorFilter filter class).
Teardown:



Test suite 3: Deployed webmodules (contexts) management

Purpose: To verify that the tomcat server contexts management works properly.
Setup:

#Test caseDescription
1View deployed web applications
1. Start default tomcat instance.
2. Expand its node.
RESULT: The instance node should contain 'Web Applications' subnode which has children representing deployed web applications (contexts). There should be these default contexts: /admin /balancer /manager /
2Refresh the web applications list
1. Start default tomcat instance.
2. Start tomcat manager application in you browser by opening http://localhost:8080/manager/html.
3. In the web interface undeploy a web application.
4. Perform 'Refresh' action on Web Applications node
RESULT: The children nodes should be updated according to the changes you have made.
3Undeploy a web application
1. Perform 'Undeploy' action on an web application's node.
RESULT: The node should disappear and the apllication should be undeployed. Verify if the application is really undeployed by opening its context in your browser (http://localhost:8080/WebApplication.
4Stop a webmodule
1. Perform 'Stop' action on an web application's node.
RESULT: The node displayname should ends with (stopped) text.
5Start a webmodule
1. Perform 'Start' action on an web application's node.
RESULT: The (stopped) postfix should disappear.
6Deploy a new webmodule
1. Start tomcat server.
RESULT: Deploy a webmodule from the IDE
Teardown:



Test suite 4: Web Project run properties

Purpose: To verify that Project Properties Panel works properly.
Setup: Create new Project - Web Application with 2 JSP pages locatad in WEB-INF directory, e.g. index.jsp and index2.jsp. Minimal two Tomcat's instances have to installed.

#Test caseDescription
1Change target server per project
1. Go to Projects window
2. Right-click on the root node of your web project
3. Click on Properties
4. Go to Run - Running Project node
5. From Server select box select one server's instance
6. Click OK button
7. Right-Click on the root node of your application
8. Choose Run Project
RESULT: Your application should deploy on selected server
2Change relative URL
1. Go to the Projects tab
2. Select the root node of your web project
3. From contextual menu choose Properties item
4. Go to Run - Running Project node
5. Into Relative URL text box type second page's relative URL, e.g. index2.jsp
6. Click OK button
7. Run project
RESULT: Output window must display correct URL: http://localhost:port/$CONTEXT/Relative URL.
Teardown:

Added by Petr Blaha

Test suite 5: Server Manager

Purpose: To check functionality of Server manager on Tomcat servers
Setup: Install Tomcat 5.0.28 and Tomcat 5.5.9 servers on your computer.

#Test caseDescription
1Add new Tomcat 5 server
1. Open Server Manager from Menu/Tools
2. Click on Add Server
3. Choose Tomcat 5.0 or Tomcat 5.5
4. Wizard opens,so do the same as you do in Test suite 1 and add Tomcat server
RESULT: Server should be normally added as from Runtime tab.Check there,if new Tomcat server node appeared and check its Properties.
1Remove Tomcat server
1. Open Server Manager from Menu/Tools
2. Select Tomcat 5.0 server or Tomcat 5.5 server
3. Click on Removet
RESULT: Server should be normally removed from IDE.Check this in Runtime tab
Teardown:

Added by Jaroslav Pospisil

Test suite 6: Edit context file

Purpose: To verify reload context.xml into built in Tomcat server
Setup: Use same project as in previous suite.

#Test caseDescription
1Add new valid tag into context
1. Go to The Projects tab, expand project node
2. Right-Click on | +--- Web Pages | +--- META-INF | + --- context.xml
3. Choose Edit
4. In editor modify context.xml like this, add Environment Entry: <Context path="/name_your_app"> <Environment name="maxExemptions" value="10" type="java.lang.Integer" /> <Context/>
5. Go to the Project tab.
6. Right-click on the root node of your application
7. Choose Redeploy Project
RESULT: Check this change by looking into $USER_DIR/jakarta_tommcat-5.X.YY_base/conf/Catalina/localhost/name_your_app.xml
Teardown:

Added by Petr Blaha

Test suite 7: Test CVS dependency

Purpose: Test web module project dependencies on CVS
Setup: Create new web project and new versioned directory

#Test caseDescription
1Change context path
1. Go to Files tab
2. Select project node and Add project into CVS tree
3. Right-click on project node
4. On Project Properties Panel change context path
5. Run project
6. Commit project into CVS
7. Close Project
8. Go to Versioning tab and Check Out created project
9. Open project and Run
RESULT: After running Project ,external browser shall load project with correct context path.
2Change relative URL
1. Go to Files tab
2. Select project node and Add project into CVS tree
3. Right-click on project node
4. On Project Properties Panel change target server
5. Run project
6. Commit project into CVS
7. Close Project
8. Go to Versioning tab and Check Out created project
9. Open project and Run
RESULT: After running Project ,external browser shall load source found on Full URL.
Teardown:

Added by Petr Blaha


Generated: 2005 02 04 03:49

Project Features

About this Project

QA was started in November 2009, is owned by Jiří Kovalský, and has 97 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20160708.bf2ac18). © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close