[jbosstools-dev] Problem with JUnit test execution with maven

Alexey Kazakov akazakov at exadel.com
Fri May 16 13:24:23 EDT 2014


It's easy to verify if your test project is missing some soft 
dependencies. In your dev environment, in Run Configuration of your test 
-> Plugins Tab:
1. select plug-ins selected below only
2. Deselect All
3. In filter field, type your test plug-in ID to find it in the list of 
plugins.
4. Select this plug-in.
5. Clean up the filter.
6. Press Add Required Plug-ins
Here we go. Now you can run the test and see if it fails since now your 
test environment includes the same set of plugins which you have in your 
maven build.

On 05/16/2014 10:02 AM, Rob Cernich wrote:
> Hey Xavier,
>
> This is a shot in the dark, but you might verify that the plugins 
> providing the model provider are listed as dependencies for the test 
> plugin.  My experience has shown that the test environment only 
> includes hard dependencies, so if you're relying on something that has 
> a soft link (e.g. anything contributed through an extension point), 
> you need to make sure the plugin making the contribution (e.g. 
> implementing the extension point) is included in the dependencies list 
> for your test plugin.  It probably works fine in your dev env because 
> Eclipse is using the entire set of plugins available (i.e. target 
> platform + workspace plugins).
>
> Good luck.
>
> Rob
>
>
> ------------------------------------------------------------------------
>
>     Hello,
>
>     I just got a NPE with tests running from Maven (they run fine from
>     PDE, though):
>     '*org.eclipse.jst.j2ee.model.ModelProviderManager.**ModelProviderManager.getModelProvider(project)*'
>     returns '*null*' in the WizardPages that I'm trying to test.
>
>     For the moment, I'll skip those tests on maven to avoid build
>     failures on Jenkins, but if anyone has a clue what I should do to
>     get them pass on maven/Jenkins (i.e., initialise the
>     ModelProviderManager ?), please let me know ;-)
>
>     Thanks !
>     Best regards,
>     /Xavier
>
>
>
>
>     _______________________________________________
>     jbosstools-dev mailing list
>     jbosstools-dev at lists.jboss.org
>     https://lists.jboss.org/mailman/listinfo/jbosstools-dev
>
>
>
>
> _______________________________________________
> jbosstools-dev mailing list
> jbosstools-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jbosstools-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jbosstools-dev/attachments/20140516/7152cc65/attachment-0001.html 


More information about the jbosstools-dev mailing list