Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Plugins automated tests issue
Plugins automated tests issue [message #3200] Wed, 14 May 2008 12:42
Eclipse UserFriend
Originally posted by: le_nemo.yahoo.fr

Hello,

I'm trying to automate JUnit core tests for an eclipse plugin. Tests
classes are packaged into a specific plugin with a test.xml file.

I'm Using eclipse-Automated-tests. I edited the provided test.xml file.
It creates a `test-eclipse' directory, it unzips into it a clean
Eclipse SDK, it unzips eclipse-junit-tests and it copies two files in
the `test-eclipse/eclipse/plugins directory' :
- `com.geensys.treeviewer.jar' (the plugin that need to be tested)
- `com.geensys.treeviewer.tests.jar' (the tests for
com.geensys.treeviewer).

Because the `test.xml' file contained in `my.plugin.tests.jar' has to
be accessible, it unzips
`test-eclipse/eclipse/plugins/com.geensys.treeviewer.tests.j ar' into
`test-eclipse/eclipse/plugins/com.geensys.treeviewer.tests/' .

But it seems that the `test.xml' from com.geensys.treeviewer.tests is
incorrect, because when I launch it I get the exception :
"java.lang.Exception: Could not find plugin
"com.geensys.treeviewer.tests"".

When I try to launch it from eclipse, the Console prints the same
exception.

Has someone any experience with this problem ?
Thank you very much.

--

The test.xml file from com.geensys.treeviewer.tests :

--

<?xml version="1.0"?>
<project name="testsuite" default="run" basedir=".">
<!--
The property ${eclipse-home} should be passed into this script
Set a meaningful default value for when it is not.
-->
<property name="eclipse-home"
value="/mnt/work/ECLIPSE-TESTING/test-eclipse/eclipse"/>

<!--
sets the properties eclipse-home, and library-file
-->
<property name="plugin-name" value="com.geensys.treeviewer.tests"/>
<property name="library-file"
value="${eclipse-home}/plugins/org.eclipse.test/library.xml "/>

<!--
This target holds all initialization code that needs to be done for
all tests that are to be run. Initialization for individual tests
should be done within the body of the suite target.
-->
<target name="init">
<tstamp/>
<delete>
<fileset dir="${eclipse-home}" includes="*.xml"/>
</delete>
</target>

<!--
This target defines the tests that need to be run.
-->
<target name="suite">
<ant target="core-test" antfile="${library-file}"
dir="${eclipse-home}">
<property name="data-dir" value="data-folder"/>
<property name="plugin-name" value="com.geensys.treeviewer.tests"/>
<property name="classname"
value="com.geensys.treeviewer.tests.AllTests"/>
<property name="vmargs" value="-Dbaz=true"/>
</ant>
</target>

<!--
This target holds code to cleanup the testing environment after after
all of the tests have been run. You can use this target to delete
temporary files that have been created.
-->
<target name="cleanup">
</target>

<!--
This target runs the test suite. Any actions that need to happen
after all the tests have been run should go here.
-->
<target name="run" depends="init,suite,cleanup">
<ant target="collect" antfile="${library-file}" dir="${eclipse-home}">
<property name="includes" value="org*.xml"/>
<property name="output-file" value="${plugin-name}.xml"/>
</ant>
</target>

</project>
Previous Topic:Multiple views unlinked across perspectives
Next Topic:Plugins automated tests issue
Goto Forum:
  


Current Time: Thu Apr 25 18:56:24 GMT 2024

Powered by FUDForum. Page generated in 0.02816 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top