Jazarine Jamal wrote:
Also can anyone help with performing derby tests using netbeans...?

Hi,

I'm not sure what kind of support/features you are looking for, but I don't think the Derby build/test structure is following the "NetBeans conventions" for testing (if there are any).

I played around with this a while ago, and got to the point where I can execute "Run file" on a given class under java/testing to run the test(s). BTW, I'm sure there are better ways of doing this...
Please enlighten me :)

To to this, you have to add the following to your NetBeans project files:

**** ide-file-targets.xml
    <target name="run-selected-file-in-testing">

        <path id="cp">
<!-- TODO configure the runtime classpath for your project here: -->
            <path location="${project.dir}/classes"/>
            <path location="${project.dir}/tools/java/junit.jar"/>
        </path>
        <mkdir dir="${project.dir}/JUNITTEST"/>
<junit dir='${project.dir}/classes' printsummary='true' showoutput='true' fork='true'>
<classpath refid='cp'></classpath>
<formatter type='brief' usefile='false'></formatter>
<formatter type='xml'></formatter>
<test name='${run.class}'></test>
</junit>
    </target>

**** project.xml, under ide-actions
                <action name="run.single">
                    <script>nbproject/ide-file-targets.xml</script>
                    <target>run-selected-file-in-testing</target>
                    <context>
                        <property>run.class</property>
                        <folder>${project.dir}/java/testing</folder>
                        <pattern>\.java$</pattern>
                        <format>java-name</format>
                        <arity>
                            <one-file-only/>
                        </arity>
                    </context>
                </action>


These instructions might be inaccurate, but maybe they can help you.
Personally I prefer to run the tests outside of NetBeans, since I often run them on a different machine. If you plan to work on Derby, you should also make yourself a debug target. Typically it will run either ij (the command line interface for Derby), a JUnit test or a self-made class that runs code you want to debug.


hth,
--
Kristian


On Jan 31, 2008 7:17 PM, Jazarine Jamal <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:

    I've just fixed a source bug on derby but don't quite know how to
    test it..
    The wiki has been telling me that I need to write my own tests to
    test derby..
And do I have to run all the tests: Functional,performance etc..? Please give me an insight into Derby Testing...



Reply via email to