-
1. Re: Source code lookup for Arquillian tests
maxandersen Sep 24, 2014 5:31 PM (in response to papegaaij)sounds weird.
I tried a few things but couldn't reproduce.
Any chance you can make a minimal project showing the issue ?
-
2. Re: Source code lookup for Arquillian tests
papegaaij Sep 25, 2014 3:15 AM (in response to maxandersen)Sure. I've created a very simple example at papegaaij/source-lookup · GitHub
Import this project into eclipse 4.4 with JBoss Tools Source Lookup 1.6 CR1. Create a server for Wildfly 8.1.0.Final and start it in debug mode. Add a breakpoint to the doGet method in the servlet and run the test.
If you need more information, please let me know. With this very simple testcase, I'm able to reproduce it every time.
-
3. Re: Source code lookup for Arquillian tests
snjeza Sep 25, 2014 12:30 PM (in response to papegaaij)You also have to start your test in the debug mode. Could you write any classes for which you can't find source code?
-
4. Re: Source code lookup for Arquillian tests
papegaaij Sep 25, 2014 12:50 PM (in response to snjeza)Running the test in debug mode makes no difference. The class eclipse can't find the source for, is the servlet itself. Eclipse can't find the source for all classes deployed in WildFly. It does find the source for the code running in the client.
-
5. Re: Source code lookup for Arquillian tests
snjeza Sep 25, 2014 12:51 PM (in response to papegaaij)Try to deploy your project to the server.
-
6. Re: Source code lookup for Arquillian tests
papegaaij Sep 25, 2014 2:01 PM (in response to snjeza)That's what I described as a workaround. When the application is deployed to the server, the source is found. However, our testcases deploy major parts of our application, and some of the resources conflict if deployed twice. So, it's not an option to have the application deployed while running the tests. Deploying the application and stopping it, frees the resources, keeping the source lookup working, but it's a very cumbersome way of working.
Also, this way, classes that are not on the classpath of the client side of testcase nor part of the application, but are deployed on the server, still have no source. My showcase does not have such classes because it complicates the code quite a lot.
-
7. Re: Source code lookup for Arquillian tests
snjeza Sep 25, 2014 2:51 PM (in response to papegaaij)1 of 1 people found this helpfulI think you have faced the issue described in https://issues.jboss.org/browse/JBIDE-13852.
-
8. Re: Source code lookup for Arquillian tests
papegaaij Sep 25, 2014 3:32 PM (in response to snjeza)Ok, it seems the Java Project Source Container does help. After restarting the testcase, the source is found for my simple example. Will this be part of JBoss Tools any time soon? And will JBoss Tools perform any form of auto configuration for this (like you can do with JBoss Source Lookup)?
-- previous post, I'm unable to reply for some reason
The linked issue does seem similar to what I described, but the 'JBoss Java Project Source Container' does not help. The source is still not found, as you can see in this screenshot:
My source lookup is:
-
9. Re: Source code lookup for Arquillian tests
snjeza Sep 25, 2014 3:40 PM (in response to papegaaij)https://issues.jboss.org/browse/JBIDE-13852 hasn't been fixed yet. You have added a container that finds source within an application server.
I have fixed JBIDE-13852 in the old Arquillian code (https://github.com/snjeza/arquillian-eclipse/commit/ed5df4a5406d39d53ebc142d3f4b8a6aff0381b9), but the fix hasn't been moved to JBT/JBDS.
-
10. Re: Source code lookup for Arquillian tests
papegaaij Sep 26, 2014 4:44 AM (in response to snjeza)So the plugin on the update site linked in the ticket is not yet functional? Because I did get a new source container and it also seems to help with resolving the source.
-
11. Re: Source code lookup for Arquillian tests
snjeza Sep 26, 2014 2:44 PM (in response to papegaaij)> So the plugin on the update site linked in the ticket is not yet functional?
There is only one source container related to debugging tests - JBoss Maven Source Container.
The "JBoss Java Project Source Container", described in JBIDE-13852, hasn't been implemented yet.
> Because I did get a new source container and it also seems to help with resolving the source.
I suppose, you have deployed the project or Eclipse/JVM uses some cached artifacts.
JBoss Maven Source Container you have added, finds only classes placed in the AS's JVM and doesn't fix the issue you have described.
-
12. Re: Source code lookup for Arquillian tests
papegaaij Sep 26, 2014 3:06 PM (in response to snjeza)But the update site you linked in the issue (http://snjeza.github.com/jbosstools-central) does give me the 'JBoss Java Project Source Container' (see screenshot below). Is this a stub implementation? Anyway, I've voted for the issue, because it does describe what we need. Hopefully this can be added to JBoss tools soon.
-
13. Re: Source code lookup for Arquillian tests
snjeza Sep 26, 2014 4:14 PM (in response to papegaaij)I have created an example of JBoss Java Project Source Container that hasn't been included in JBT yet.
You can use it as a workaround for now.