cornercorner
FeaturesPluginsDocs & SupportCommunityPartners

Clazz Module Test Specification

Author: Marek Grummich
Version: 3.6
Last update: 2004/01/06
Introduction: This is test specification for clazz module. The Clazz module provides read-only object model of sourceless classes. It is based on classfile - the class parsing library.
Comment:

Table of Contents

Test suite 1: Elements recognition

Purpose: This test suite checks, if all elements of .class file are correctly recognized.
Setup: Mount clazztest.jar to repository. Source code of this class is here.

#Test caseDescription
1Recognition of class
1. Expand ClazzTest.class
RESULT: There is one class under the ClazzTest: public class ClazzTest extends javax.swing.JPanel
2Recognition of inner classes
1. Expand the class node
RESULT: There is one inner class in the ClazzTest: public static class InnerClass.
3Recognition of inner interfaces
1. Expand the class node
RESULT: There is one inner interface in the ClazzTest: public interface InnerInterface
4Recognition of methods
1. Exapand methods node
RESULT: There are 4 methods in ClazzTest:
1. private void initComponents()
2. public boolean isOk()
3. public void setOk(boolean ok)
4. protected static void testMethod(java.lang.String name) throws java.io.IOException
5Recognition of fields
1. Expand fields node
RESULT: There are 3 fields in the class:
1. public static final char CONSTANT = 0
2. private Object testField = null
3. private boolean ok
6Recognition of constructors
1. Expand constructors node
RESULT: There are two constructors
1. public ClazzTest()
2. public ClazzTest(final java.lang.String name) throws java.io.IOException
Teardown:



Test suite 2: Copy/Paste

Purpose: This testsuite checks copy/paste feature. Note that serialize feature works with beans only.
Setup: Mount clazztest.jar to repository. Source code of this class is here.

#Test caseDescription
1Copy/Paste | Copy
1. Select ClazzTest
2. Perform Copy
3. Select different package
4. Perform Paste | Copy
RESULT: Class is copied to target folder. Red x appears, but this the class is still parsable.
2Cut/Paste
1. Select ClazzTest
2. Perform Copy
3. Select different package
4. Perform Paste
RESULT: Class is moved from source to target folder. Red x appears, but this the class is still parsable.
3Copy/Paste | Create Link
1. Select ClazzTest
2. Perform Copy
3. Select different package
4. Perform Paste | Create Link
RESULT: New link is created
4Copy/Paste | Serialize
1. Select ClazzTest
2. Perform Copy
3. Select different package
4. Perform Paste | Create Serialize
RESULT: New .ser file is created in target folder. Check if all elements java are visible in Explorer by browsing the .ser file. Use Element Recognition Suite. Together with class node, there is another node within the class file: serialized strem, which holds instance of org.netbeans.test.ClazzTest and it's serialized data.
5Copy/Paste | Default Instance
1. Select ClazzTest
2. Perform Copy
3. Select different package
4. Perform Paste | Default Instance
RESULT: New default instance is created in target folder.
Teardown:



Test suite 3: Default Services

Purpose: Tests if clazz data object has correct executor/debugger.
Setup: Unjar clazztest.jar and mount target as a local directory. Source code of this class is here.

#Test caseDescription
1Executor
1. Check executor
RESULT: Default executor is External Execution
2Debuggger
1. Check debugger
RESULT: Default debugger is Default debugging
Teardown:




Generated: Fri Jan 09 11:54:16 CET 2004
Companion
Projects:
MySQL Database Server   GlassFish Community: an Open Source Application Server   Open Solaris  Open JDK: an Open SourceJDK   Mobile & Embedded Community     Sponsored by 
Sponsored by Sun Microsystems