-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Testrunner does not like Spock 1.0 #18
Comments
Thanks for the detailed report. It seems that Sputnik runner has been changed. I will take a lookt at it. |
Well, actually the Spock API has changed too between 0.7 and 1.0, e.g. the lifecycle methods are now no longer single instances but collections. I.e. I tried to change method
It compiles, but obviously it leads to follow-up problems. Furthermore, your POMs are unclean as well. I needed to change a few things in order to make the project compile. Anyway, the tests are not running because there are follow-up problems, probably with the lifecycle method interceptors. Someone knowing the code base needs to fix it, I could not when taking a quick look. One more thing with Spock 1.0 is that it no longer supports Groovy 1.x, i.e. the example project for 1.x should be deleted when upgrading to Spock 1.0. Should I issue a pull request with my half-baked changes, i.e. with a compiling project but with failing tests? I am unsure if it does you any good. |
Thanks, please make a PR so I can continue based on the work you have already done. Otherwise I would re-do the same ;) |
Ping. Can you say anything about when you can fix this? Not that it is your problem, but for my Scrum team this is a blocker. I am just saying this FYI. |
Pong, sorry for being silent lately. I've been busy with my regular job. I am on holidays now so cannot really dive into this, but I will be back first weekend of May and this is one of the first things for me to look at. With batteries fully re-charged I should be able to help you promptly :) Cheers, |
Ping reloaded - 2.5 months. ;-) |
Did your brain actually burst? :-P |
I was soaked in other stuff (regular work) + conference thing. I know it's just an excuse for being lazy, but that was holding me back from releasing it. I am coming back this weekend so except to have it released by the end of next week. You have my word. |
Besides this crazy heat outside I spent quite a bit of time analyzing this problem :) It seems that for some reason in-container bits of Spock-Arquillian integration are triggered on the client side which results in pretty meaningless NPE in the logs. I hope to have a solution for that within next few days. |
Hey, I've forked kriegaex's fix, and run some tests using Travis. Seems that on Oracle Java 1.7 it seems to throw the NPE's. It seems to not like Inject annotation. Oracle Java 1.8 seems to pass those tests though. |
@nate9: I am not sure my PR is really a fix. As I said, it only makes the project compile. I cannot even remember the exact type of follow-up problem it caused, but I am pretty sure it did cause runtime problems. Someone knowing the code base (probably Bartosz) needs to fix it. |
I tried the PR, and it failed on NullPointerExceptions when running Spock-Arquillian tests. I was using Java 1.7 and Groovy 2.4 if that is of any help. |
Actually Java 8 doesn't pass the tests, the container runs, but the tests don't seem to do anything :/. They timed out after 10 minutes. Perhaps the container configurations for those tests are outdated? |
That is good to know. I was actually trying to run tests from my application's project with the fix. No dice. I just rolled Spock back to 0.7-groovy-2.0, but I was hoping to use 1.0. I think we can wait for a fix for now. |
I repeat: the PR is not a fix, just a starting point for the maintainer to get it fixed a little bit easier than by starting from scratch. |
1/2 year anniversary. @bartoszmajsak, is there any hope left for me? Or can you tell me how to repair it by myself and provide a better PR? |
Let's crack open the champagne! As Spanish say
;) I have had a closer look at this issue in the past but I do not have any conclusions as of yet :( So I cannot really provide any guidance at the moment. I will try to go back to it over the weekend and hopefully fix it or at least give you some hints if you are willing to take over. Apologies. |
Maybe you can ask the Spock people for guidance in the other ticket I opened and linked to this one a while ago. Probably I am not a big help here. Crossing my fingers and keeping the hope alive for a little longer. P.S.: Germans say the same, even literally. |
As far as I know it's not really related to Spock per se, rather how the integration with Arquillian runner is implemented. Somehow it's executed on the client side, which should not be the case. And hence NPEs. If I hit the wall I will scream and shout here :) |
Are you in contact with any Arquillian devs? Maybe someone can lend a hand or at least another pair of eyes. My old chemistry teacher used to say: "Knowledge is to know where to find it." |
Sure. Thanks for your patience. |
Hi @bartoszmajsak any good news about this issue? |
Yes. I almost have it running :) |
@bartoszmajsak please tell me you have good news about this :) |
Ping. :-) |
@kriegaex - I get the same error with your fork:
|
@Steve973: Sorry, I deleted my previous comment when I noticed that your problem was not a build, but a runtime problem. My fork only fixes the Maven build, no actual functionality. Maybe you want to share a testcase for @bartoszmajsak in order to help him reproduce the problem. |
Sorry for the false alarm. The problem was a conflicting version of spock in my dependency chain. |
Is there any reason why ArquillianSputnik would not be present in my container? I am assuming user error again, but I don't see a whole lot of difference between my project's testing setup and that of the examples. But I am using Karaf-remote as my container. |
If you run JBoss version older than wildfly with Java 8 this is the very Now, can I go back to beer? 😂 Cheers!
|
I haven't tested with Karaf. Can't really help you much with mobile only 😩 I will be back home Saturday so if you won't be able to fix the problem
|
@bartoszmajsak -- I'm working on an example right now. I'm having a bit of trouble with something unrelated to the arquillian spock library because I'm trying to start a managed karaf container and run the tests in there. My use case is to connect to a custom distro that is already running, but the test would be better, of course, if it was more basic and used a fresh distro of karaf. I'll give you a link to my github repo when it's done. If the problem exists only with my particular configuration, at least you could add it (or part of it) to your examples to provide some karaf-specific instructions if they differ at all from the other examples that you have. |
Are any of you getting this either while building the project, or when building against this project's artifacts as dependencies:
|
Where should i find arquillian-spock-container 1.0.0.Final-SNAPSHOT repository. https://repository.jboss.org/nexus/content/repositories/snapshots/ don't have it anymore. |
Looks like the trail is running cold on this. Is there going to be any movement towards Spock 1.0 and this Arquillian Test Runner? |
:) At least I'm responding promptly. I didn't have time over last few months to spend time on this, but I hope to make a release early December. |
oh wow....good to know.... I am tinkering with the spock_1.0 branch -- do you know if that works? |
Any update here? :) |
This works for me only when I pull the project and create a SNAPSHOT locally. Thanks, Jon |
Some things work with Spock 1.0, others do not. So the product is not ready for a release yet. P.S.: With 1.1-rc3 being around for a while I guess 1.1-final will soon be available. |
Does Spock 1.1 final make any difference? |
I get the impression that momentum on this has dried up, but is it likely that this runner will no longer be required anyway once arquillian/arquillian-core#147 is complete? |
I was curious as to whether the support for running Arquillian via test rules rather than test-runner may work in combination with Spock (and its default Sputnik runner rather than the ArquillianSputnilk runner), and I managed to get quite close...
The only problem is that the 'feature' descriptions mismatch at run time, a SpecInfo is created and its features filtered in org.spockframework.runtime.model.SpecInfo#filterFeatures, which boils down to desiredDescription: "$spock_feature_0_0(test.TestSpec)" so 'excluded' gets set to true on the feature and skipped. I'm not sure if anything further can be done from this, i'm not all that familiar with Spock or the internals of JUnit - but I hope it may be of use to anyone else thinking of pursuing this route. Sorry if this is an in appropriate place to post this, but I really wasn't sure where else I could effectively pass this onto other folks interested in Spock+Arquillian integration. |
@bartoszmajsak, is this product dead? I still love Spock & Geb and the next one of my clients is considering using it in connection with Liferay (LR). There is a special Arquillian extension for LR, so there is always the option to use Drone for browser testing, but I would very much prefer to use Spock & Geb instead of JUnit + Drone because I just have much more experience with the former pair and zero with the latter. Is there anything I can do to move this forward? Is there anyone whom you can hand this project over to or who can at least support you? |
So, my colleague (and Geb's very own) Marcin Erdmann has taken the reins on this and submitted a PR to arquillian-core to allow Spock test methods to be executed correctly by Arquillian. |
@jollytoad, can you please elaborate on what exactly that means and how it solves this and other Spock-related problems? Does is mean that
Or is is neither of the above and I need to do something else? |
So, if the PR is accepted and merged, the ArquillianSputnik testrunner would not be necessary. You'd be able to use the standard spock Specification and the Arquillian rules instead (see my example above), although you still need to include various extras into the deployment archive, and an ArquillianSpecification (extending the Spock Specification class) for convenience - so we'd probably need some kind of Arquillian Spock extension still, to provide these without everyone having to duplicate stuff, but it should be a whole lot simpler than the current ASR solution. None of this has been released, it's currently just the PR i've linked to above. |
Hm, okay. So for now it would not be helpful to compile and run Arquillian with the PR because there would be missing pieces in the jigsaw puzzle. This has been going on for 4 years, so I would like to help this move forward by testing and providing feedback. Your explanation sounds like this is not possible yet. |
Closing this gives me a weird mix of feeling relieved, excited and embarrassed at the same time. I really want to thank you all folks for providing input and nagging me to do something with this project (note: it's not a product, but opensource library and never been otherwise). Please give it a try building from master if you wish, but I will cut the release today too so the new version is out. |
@jollytoad that's correct and should be easy to use when you are mainly focusing on blackbox tests (such as those with Geb). As soon as you want to run that in some sort of application container this extension will help you bundling all required deps. |
1.0.0.CR1 has been released. Hopefully arrives in Maven Central tonight. |
Thank you. Looks like some of the tickets you closed are fixed while others are not. See my feedback there. |
We use this in our project:
Obviously the Spock container does not like Spock 1.0. It says:
Update: I also tried this, to no avail:
The text was updated successfully, but these errors were encountered: