-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Tests always pass in combination with Arquillian #1513
Comments
@linex83 - I am not familiar with I found only Can you please help add some detailed instructions on how to get this going in an IDE ? |
Could you just try with 6.12 from jcenter? It contains a fix asked by arquillian and it may be this one. |
Thank you very much for the quick responses! @juherr I tried version 6.12, it didn't solve the problem, though. @krmahadevan You can run the tests from the shell with |
Just to add further details: I tried running testng with arquillian and WildFly (instead of GlassFish) and got the same results. |
We've been stuck at v6.10 for awhile due to this problem. I didn't try v6.12 yet, but I'm guessing that the issue has not been resolved yet. |
@phillipross - Yes I guess this is still a problem. I had a go at this issue in the recent past, and still haven't figured out the overall flow that |
@krmahadevan - I'm not familiar with any Arquillian documentation outside of the guides published on their site. I can try to put together a very minimal test case that illustrates proper behavior when testng v6.9.10 is used and improper behavior when anything later than 6.9.10 is used. I still have to test v6.12 myself which I'm about to do right now. |
@krmahadevan I've verified that v6.12 still suffers from the same problem. I'm attaching a test case that hopefully helps troubleshoot the problem. The zip file contains a self-contained maven project. If you run You can control the TestNG version by setting the
I'm not an Arquillian expert, but I'm familiar with the basics and can attempt to answer any questions you might have. I appreciate the attention to this issue! |
@krmahadevan when you said you dealt with this issue in the past, was it a separate github issue that was already reported, seemingly fixed, and then closed? Or did you mean you tried tracing through in an effort to address this github issue? thanks! |
@phillipross - I was attempting at trying to reproduce this issue so that I may try to fix this. There's no previous issue that I am aware of which talks about the same problem. I still haven't gotten around to this issue. Kind of stuck with stuff at the personal front and things are a bit hectic at the work front as well. So please bear with the delay. |
I'm happy to report that the as of testng v6.13.1 and arquillian-core v1.1.15.Final this issue seems to have been addressed. I'll update the test case code and attach it to this issue for posterity. |
|
@phillipross Thank you so much for taking the time to revisit this issue and confirm that this is now working. |
I'm also experiencing a similar issue. For me, the tests run properly when using TestNG version 6.9.10 and Arquillian 1.1.13.Final. However, the tests fail to run with TestNG 6.13.1 and Arquillian 1.1.15.Final. I've also tried TestNG 6.13.1 and Arquillian 1.2.0.Final, but the tests also fail to run. |
@chyt But what is the expected behavior? Failed or succeed tests? |
@juherr Sorry for being ambiguous in my previous post, when I said "fail" I meant "fail to execute." Similar to OP, I'm experiencing that TestNG is telling me that the tests are succeeding, when in fact they did not run. I've updated my previous post to clarify this. |
The issue may be related to arquillian/arquillian-core#134 but it should work with TestNG 6.13+ + Arquillian 1.1.15+. Ping @bartoszmajsak Any idea before I try to digg? |
I'm using Maven to run TestNG with Arquillian using the WLP managed container. There's no stacktrace, only standard Arquillian output:
As you can see, the test application I've attached my sample project where you can replicate the issue. Just run |
@chyt: I tried to run I tried with running Can you give a try on your end and provide me working reproducer? |
@chyt: I have resolved configuration issue for <dependencies>
<dependency>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-http</artifactId>
<version>2.8</version>
</dependency>
</dependencies> Now looking into the issue. |
@dipak-pawar That's strange. I just ran the build again in a clean directory after deleting my Maven cache, and it is still working for me. Can you run |
@chyt Don't worry about the issue which I was facing in the morning. I made it workable. If you still want it, I will give you :) I found root cause of your failure. testng is not added inside container by arquillian as a part of For the time being to unblock you, just add @Deployment
public static WebArchive createDeployment() {
final PomEquippedResolveStage pomEquippedResolveStage = Maven.resolver().loadPomFromFile("pom.xml");
File[] mavenFiles = pomEquippedResolveStage.importRuntimeDependencies().resolve()
.withTransitivity().asFile();
return ShrinkWrap.create(WebArchive.class).addPackage("application.rest").addPackage("application")
.addAsLibraries(mavenFiles)
.addAsLibraries(pomEquippedResolveStage.resolve("org.testng:testng").withTransitivity().asFile());
} I will submit PR for this in arquillian-core tomorrow, so you don't have to add testng explicitly as lib dependency which means arquillian will take care of it. |
I'm not sure if this is a TestNG or an arquillian issue. However, downgrading TestNG solves the problem, so I'm attributing it to TestNG.
In TestNG version 6.9.13.3 to 6.11 arquillian always shows my tests as passed, even if I do assertTrue(false). Downgrading to TestNG version 6.9.10 solves the issue. I also found this, proving that I'm not the only one:
https://stackoverflow.com/questions/42558563/no-failure-with-it-tests-when-exception-is-thrown-arquillian-testng-maven
Here's a minimal example (full eclipse 4.7 project):
test.zip
Just run the only TestNG class. The test will pass, even though it shouldn't. Then change the TestNG version in the pom.xml to 6.9.10, run the test again, and it will fail.
Here goes the list of my project dependencies, so you know my configuration:
The text was updated successfully, but these errors were encountered: