My favorites | Sign in
Project Logo
                
Search
for
Updated Jul 24, 2008 by mdukielska
Labels: Featured, Phase-Implementation
unittests  
Unit tests for most important classes

Update

Last update of this page: 15-07-2008

Status of unit tests: COMPLETED

Current results of tests generated by XTest testing environment.

release nb6.5m1 compatible with NB 6.5 m1:

release nb5.5.1 compatible with NB 5.5.1:

Useful information

Configuration

There are two types of tests:

To make functional tests see the tested module two things are needed (example module called MyModule is in repository):
  1. build-qa-functional.xml
  2.     <target name="runidetest">        
       	<executeTests  pluginName="ide" classpath="../build/cluster/modules/org-netbeans-modules-mymodule.jar"/>
        </target>
  3. project.properties
  4. 	test.qa-functional.cp.extra=../build/cluster/modules/org-netbeans-modules-mymodule.jar

Tests for JavaSpaces Netbeans project are all unit tests. However some of them use specific Netbeans API, e.g. Java Model API and are run agains the IDE. These are configured as follows:

  • cfg-unit.xml
  • <mconfig name="Unit config">
    
        <testbag testattribs="stable" executor="ide" name="unit tests">
            <testset dir="unit/src">
                <patternset>
                    <include name="**/*Test.class"/>
                </patternset>
            </testset>
        </testbag>
    
        <compiler name="default-compiler" antfile="build-unit.xml" target="default-compiler" default="true"/>
        <executor name="ide" antfile="build-unit.xml" target="runidetest" default="true"/>
    </mconfig>
  • build-unit.xml
  • <project name="pl.edu.mimuw.md209461.javaspaces.entryeditor/test-unit" basedir="." default="all">
    
        <!-- Imports default-compiler, run-unit-test targets referenced from cfg-unit.xml. -->
        <import file="${xtest.home}/lib/templates/xtest-unit.xml"/>
        
        <target name="runidetest">  
            <property name="module.jar" value="../../build/cluster/modules/pl-edu-mimuw-md209461-javaspaces-entryeditor.jar"/>
            <echo message="Including module ${module.jar}" />  
            <property name="xtest.ide.open.project" location="${xtest.data}/projects/default"/>    
       		<executeTests  pluginName="ide" classpath="${module.jar}"/>
    	</target>
    </project>

Classes to test

Module Class Status Date of completion Comment
Debugger pl.edu.mimuw.md209461.javaspaces.blitzadmin.action.RunOnBlitz COMPLETED 05-06-2008 Lots of mocks for JavaSpaces and Blitz server infrastructure are created.
Debugger pl.edu.mimuw.md209461.javaspaces.blitzadmim.entriesview.EntriesTreeTableModel COMPLETED 06-06-2008
Debugger pl.edu.mimuw.md209461.javaspaces.blitzadmin.jini.* COMPLETED 02-06-2008 These classes come from JavaSpaces in Practice book and won't be tested. Anyway they depend heavily on Jini.
Debugger pl.edu.mimuw.md209461.javaspaces.blitzadmin.nodes.* COMPLETED 02-06-2008 Simple nodes together with their actions, won't be tested because don't contain any interesting logic.
Debugger pl.edu.mimuw.md209461.javaspaces.blitzadmin.server.* COMPLETED 02-06-2008 Some infrastructure based on a Netbeans tutorial. Most work happens in BlitzStartServer class that depends heavily on Blitz.
Debugger pl.edu.mimuw.md209461.javaspaces.blitzadmin.spaces.* COMPLETED 05-06-2008 Mocks for JavaSpacesWrapper, BlitzJavaSpacesManager and most of others were created.
Debugger pl.edu.mimuw.md209461.javaspaces.communication.entry.* COMPLETED 02-06-2008 JavaSpaces entries with no logic inside. These classes won't be tested.
Debugger pl.edu.mimuw.md209461.javaspaces.debugger.DebugManager COMPLETED 10-06-2008 One class to manage them all.
Debugger pl.edu.mimuw.md209461.javaspaces.debugger.Utils COMPLETED 10-06-2008
Debugger pl.edu.mimuw.md209461.javaspaces.debugger.action.* COMPLETED 02-06-2008 Actions. Won't be tested.
Debugger pl.edu.mimuw.md209461.javaspaces.debugger.breakpoint.BlitzBreakpoint COMPLETED 11-06-2008
Debugger pl.edu.mimuw.md209461.javaspaces.debugger.breakpoint.BreakpointsUtils COMPLETED 12-06-2008
Debugger pl.edu.mimuw.md209461.javaspaces.debugger.breakpoint.ToggleBlitzBreakpointAction COMPLETED 12-06-2008
Debugger pl.edu.mimuw.md209461.javaspaces.debugger.breakpoint.ui.* COMPLETED 02-06-2008 View dependent nodes and actions that just call methods of DebugManager. Won't be tested.
Debugger pl.edu.mimuw.md209461.javaspaces.debugger.replay.RecordManager COMPLETED 15-06-2008
Debugger pl.edu.mimuw.md209461.javaspaces.debugger.replay.ReplayManager COMPLETED 16-06-2008
Debugger pl.edu.mimuw.md209461.javaspaces.debugger.replay.ReplayUtils COMPLETED 17-06-2008
Debugger pl.edu.mimuw.md209461.javaspaces.debugger.replay.action.* COMPLETED 02-06-2008 These classes just call methods from ReplayManager and won't be tested.
Debugger pl.edu.mimuw.md209461.javaspaces.debugger.replay.filetype.* COMPLETED 19-06-2008 Similar to xml/multiview tests.
Debugger pl.edu.mimuw.md209461.javaspaces.debugger.replay.model.* COMPLETED 02-06-2008 Schema2beans generated classes that won't be tested.
Debugger pl.edu.mimuw.md209461.javaspaces.debugger.selectentry.SelectEntryManager COMPLETED 19-06-2008
Debugger pl.edu.mimuw.md209461.javaspaces.debugger.selectentry.action.* COMPLETED 02-06-2008 Simple actions using SelectEntryManager that won't be tested.
Debugger pl.edu.mimuw.md209461.javaspaces.debugger.session.BlitzDebuggerSession COMPLETED 18-06-2008
Debugger pl.edu.mimuw.md209461.javaspaces.debugger.session.SessionUtils COMPLETED 18-06-2008
Debugger pl.edu.mimuw.md209461.javaspaces.debugger.session.ui.* COMPLETED 02-06-2008 UI dependent, won't be tested.
EntryEditor pl.edu.mimuw.md209461.javaspaces.entryeditor.model.JavaSpacesEntry COMPLETED 31-05-2008
EntryEditor pl.edu.mimuw.md209461.javaspaces.entryeditor.model.JavaSpacesField COMPLETED 25-05-2008 A simple JavaBeans file, won't be tested.
EntryEditor pl.edu.mimuw.md209461.javaspaces.entryeditor.filetype.JavaSpacesEntryMimeResolver COMPLETED 31-05-2008
EntryEditor pl.edu.mimuw.md209461.javaspaces.entryeditor.filetype.* COMPLETED 02-06-2008 Tested in a smiliar way that was used for xml/multiview. These tests check that the whole editor works correctly.
EntryEditor pl.edu.mimuw.md209461.javaspaces.entryeditor.multiview.* COMPLETED 24-05-2008 These classes are almost the same as in XML Multiview API and won't be tested by themselves. Tests for filetype package using classes from multiview package to be enough.
Annotations COMPLETED 19-06-2008 Simple Java 5.0 annotations and several aspects written in AspectJ, problematic to test.
Blitz * COMPLETED 24-05-2008 Library module, won't be tested.
JINI * COMPLETED 24-05-2008 Library module, won't be tested.
RunJavaSpaceWithName * COMPLETED 24-05-2008 Library module, won't be tested. The code from this module comes from Jini documentation and won't be tested.
SuiteP * COMPLETED 24-05-2008 Library module, won't be tested.
TemplateProject * COMPLETED 24-05-2008 This module doesn't contain any interesting logic and won't be tested.
org-netbeans-api-visual * COMPLETED 24-05-2008 Original Netbeans module, won't be tested.
org-openide-util * COMPLETED 24-05-2008 Original Netbeans module, won't be tested.


Sign in to add a comment
Hosted by Google Code