Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [recommenders-dev] [GSoC 2013] SnipMatch Development

Thank you very much Johannes.
Its works fine now.


On Tue, Jun 25, 2013 at 8:15 PM, Johannes Dorn <johannes.dorn@xxxxxxxxxxxxxx> wrote:
Hi Madhuranga,

please write these kinds of questions to the recommenders-dev mailing list. That will increase your chances of a quick answer.

The problem is, that you project has a GUI that your test requires. You need to adjust the pom.xml of your test project.

Have a look at the pom.xml of the org.eclipse.recommenders.tests.completion.rcp project. Try to copy the <build> part of that to your POM. You propably won't need the <profile> part.

You may need to play around with the settings a bit.

I hope this helps.

bye
Johannes


Madhuranga Lakjeewa schrieb:
Hi,
I wrote some test cases. It gives the expected results when i run it as a JUnit plug-in test using Eclipse IDE. But, when i run it with Maven (mvn clean install -P e42 -e) the test cases fail. What would be the reason?
Following is the console output form the test cases execution.

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running org.eclipse.recommenders.test.snipmatch.handlers.CommandHandlerTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.047 sec
Running org.eclipse.recommenders.test.snipmatch.rcp.UserEnvironmentTest
Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 0.044 sec <<< FAILURE!

Results :

Tests in error:
  testIsJavaEditor(org.eclipse.recommenders.test.snipmatch.rcp.UserEnvironmentTest): Workbench has not been created yet.
  testGetSearchBoxAnchor(org.eclipse.recommenders.test.snipmatch.rcp.UserEnvironmentTest): Workbench has not been created yet.

Tests run: 3, Failures: 0, Errors: 2, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] org.eclipse.recommenders.snipmatch.rcp ............ SUCCESS [14.087s]
[INFO] org.eclipse.recommenders.tests.snipmatch.rcp ...... FAILURE [12.661s]
[INFO] org.eclipse.recommenders.feature.snipmatch.rcp .... SKIPPED
[INFO] snipmatch-aggregator .............................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:26.893s
[INFO] Finished at: Tue Jun 25 19:32:30 IST 2013
[INFO] Final Memory: 111M/255M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.eclipse.tycho:tycho-surefire-plugin:0.18.0:test (default-test) on project org.eclipse.recommenders.tests.snipmatch.
rcp: There are test failures.
[ERROR]
[ERROR] Please refer to E:\GSoC\EclipseRCP\git\SnipMatch\tests\org.eclipse.recommenders.tests.snipmatch.rcp\target\surefire-reports for the individual
 test results.
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.eclipse.tycho:tycho-surefire-plugin:0.18.0:test (default-test) on p
roject org.eclipse.recommenders.tests.snipmatch.rcp: There are test failures.

Please refer to E:\GSoC\EclipseRCP\git\SnipMatch\tests\org.eclipse.recommenders.tests.snipmatch.rcp\target\surefire-reports for the individual test re
sults.
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoFailureException: There are test failures.

Please refer to E:\GSoC\EclipseRCP\git\SnipMatch\tests\org.eclipse.recommenders.tests.snipmatch.rcp\target\surefire-reports for the individual test re
sults.
        at org.eclipse.tycho.surefire.TestMojo.runTest(TestMojo.java:800)
        at org.eclipse.tycho.surefire.TestMojo.execute(TestMojo.java:560)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
        ... 19 more
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :org.eclipse.recommenders.tests.snipmatch.rcp
E:\GSoC\EclipseRCP\git\SnipMatch>


On Sun, Jun 23, 2013 at 1:21 PM, Marcel Bruch <marcel.bruch@xxxxxxxxxxxxxx> wrote:
Johannes,

to put put back in the loop. solved.



On Jun 23, 2013, at 9:50 AM, Madhuranga Lakjeewa <lakjeewadmm@xxxxxxxxx> wrote:

Thank you very much. That is the solution. :)


On Sun, Jun 23, 2013 at 12:59 PM, Marcel Bruch <marcel.bruch@xxxxxxxxxxxxxx> wrote:
what does "cannot resolve" mean? Did you add the dependency to o.e.jdt.ui in your manifest's required bundle?


On Jun 23, 2013, at 9:28 AM, Madhuranga Lakjeewa <lakjeewadmm@xxxxxxxxx> wrote:

Yeah i had a look. It uses org.eclipse.jdt.internal.ui.javaeditor.JavaEditor. The problem is my editor cannot resolve that import. 


On Sun, Jun 23, 2013 at 12:52 PM, Marcel Bruch <marcel.bruch@xxxxxxxxxxxxxx> wrote:
Hi Madhuranga,

did you have a look at the old code? It certainly does what you need to do. I think you don't have to reinvent everything from scratch here :)

Marcel


On Jun 23, 2013, at 9:20 AM, Madhuranga Lakjeewa <lakjeewadmm@xxxxxxxxx> wrote:

> Hi,
> I am trying to get the caret location in the java editor. I could find several ways like org.eclipse.jdt.internal.ui.javaeditor.JavaEditor and org.eclipse.ui.texteditor.ITextEditor.
> But those dependencies can not be resolved in my IDE. I am using 'Eclipse for RCP and RAP Developers' IDE. Please can you point out a way to go through this?
>
> In my key binding (M1+Enter) in extensions, i have given the context id as "org.eclipse.jdt.ui.javaEditorScope". But this key binding responses even out of the java editor. What would be the reason?
>
> Thank you,
> Madhuranga Lakjeewa

--
Codetrails UG (haftungsbeschränkt)
The knowledge transfer company

Robert-Bosch-Str. 7, 64293 Darmstadt
Mobile: 0179 131 77 21
http://www.codetrails.com

Managing Director: Dr. Marcel Bruch
Handelsregister: Darmstadt HRB 91940



-- 
Codetrails UG (haftungsbeschränkt)
The knowledge transfer company

Robert-Bosch-Str. 7, 64293 Darmstadt
Mobile: 0179 131 77 21
http://www.codetrails.com

Managing Director: Dr. Marcel Bruch
Handelsregister: Darmstadt HRB 91940



-- 
Codetrails UG (haftungsbeschränkt)
The knowledge transfer company

Robert-Bosch-Str. 7, 64293 Darmstadt
Mobile: 0179 131 77 21
http://www.codetrails.com

Managing Director: Dr. Marcel Bruch
Handelsregister: Darmstadt HRB 91940



--
Johannes Dorn

Codetrails UG (haftungsbeschränkt)
The knowledge transfer company

Robert-Bosch-Str. 7, 64293 Darmstadt
Tel: +49 6151 2767092
http://www.codetrails.com

Managing Director: Dr. Marcel Bruch
Handelsregister: Darmstadt HRB 91940




Back to the top