-
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
throwing SkipException sets iTestResult status to Failure instead of Skip #1632
Comments
Setting the iTestResult.setStatus(TestResult.SKIP) before throwing the SkipException in the #beforeInvocation method causes me to see failures if the method is a BeforeXXX. |
Is there a plan to fix this, or provide a mechanism that would allow skipping tests via configuration method? Above workaround seems to not work (I'm currently on version 7.0.0). |
Hi I see this was fixed, and merged to master. Any chance this get's released anytime soon? |
ping @cbeust - Please chime in. |
@krmahadevan Can I get a confirmation this is fixed in 7.3.0 release? |
@klubi - Are you seeing this not working in |
@krmahadevan I'm on When gradle logging is enabled I see something like this:
and then I see two records for same method in html test report |
@klubi - Do you have a sample that you can share so that we can investigate on this ? |
@krmahadevan let me prepare one |
@krmahadevan I re-used sample project I created for issue with VS Code. |
@krmahadevan any update on this? |
I believe this is effectively a duplicate of spring-projects/spring-framework#26387. See spring-projects/spring-framework#26387 (comment) for further details. |
@klubi - I haven't gotten around to looking at this issue yet. The last few months have been extremely hectic at work front. I hope to get things sorted out at work front in a couple of weeks after which I should have some breather time. Transitioning into a full fledged backend developer at work with zero knowledge on Spring is taking a toll on my time, while still juggling the current role's responsibilities. |
@krmahadevan No need to learn Spring. You can have a look at the test cases I added at #2455. They are based on the sample provided by @sbrannen |
@juherr - Lol.. NO that was not what I meant. I was meaning to say that since at work, I am trying to transition into a backend developer, I am having to invest a lot of time trying to figure out things in Spring etc., and hence I haven't been able to find a lot of time to get to take a look at this issue. btw thanks for adding that sample. I will take it up from there hopefully over this weekend. |
@krmahadevan Oops, sorry I didn't catch it. BTW I've just added some new test cases. I think there are some relations with #2423 too. |
@krmahadevan, thanks for pushing the fix for this! I don't see a milestone assigned. Is this expected to be included in a 7.3.x release? |
@sbrannen - @juherr - I think we should start leveraging the milestone capability in github so that our users exactly know as to when would a fix be available. Any thoughts on how to go about doing this ? |
@sbrannen - Thank you for bringing up this. I will start adding this milestone for all the issues that would be part of |
@krmahadevan Good idea 👍 |
@juherr - As a first step, i went ahead and added 7.4.0 as a milestone to all defects that we have fixed so far after we released 7.3.0. Going forward when we close an issue, we should ensure we update the milestone to whatever is the current upcoming version. That way this mapping would be there all the time. |
Glad to you see adopting GitHub milestones. The community thanks you! 👍 |
TestNG Version 6.13.1
Expected behavior
previously I had in beforeInvocation:
So I have TestResult.SKIP in afterInvocation.
Discussion started here: #1611
Actual behavior
After upgrading to 6.13.1 it stopped working, because
iTestResult.getStatus()
is nowTestResult.FAILURE
instead ofTestResult.SKIP
in afterInvocation.to workaround this I'm setting status explicitly before throwing SkipException:
Is the issue reproductible on runner?
Test case sample
The text was updated successfully, but these errors were encountered: