Skip to content
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

Rerun failed tests button is not getting enabled #6199

Closed
Atrament666 opened this issue Jul 14, 2023 · 2 comments · Fixed by #6217
Closed

Rerun failed tests button is not getting enabled #6199

Atrament666 opened this issue Jul 14, 2023 · 2 comments · Fixed by #6217
Labels
kind:bug Bug report or fix UI User Interface

Comments

@Atrament666
Copy link

Apache NetBeans version

Apache NetBeans 18

What happened

I have noticed that when running unit tests, the button for reruning failed tests in Test Results never gets enabled.

How to reproduce

  • Create Java with Maven project
  • Add some unit tests that fail
  • Run tests and check the button - should be enabled but it's not.

Did this work correctly in an earlier version?

No / Don't know

Operating System

Manjaro Linux

JDK

OpenJDK 11

Apache NetBeans packaging

Apache NetBeans binary zip

Anything else

I checked the source code and the problem seems to be in the condition
rerunFailedButton.setEnabled(displayHandler.sessionFinished && rerunHandler.enabled(RerunType.CUSTOM) && !treePanel.getFailedTests().isEmpty());
in netbeans/ide/gsf.testrunner.ui/src/org/netbeans/modules/gsf/testrunner/ui/StatisticsPanel.java

RerunType.CUSTOM doesn't seem to be used anywhere thus the condition is always false. Using RerunType.ALL fixes the issue, but I am not sure if it has any side-effects, I haven't found any yet.

Are you willing to submit a pull request?

Yes

@Atrament666 Atrament666 added kind:bug Bug report or fix needs:triage Requires attention from one of the committers labels Jul 14, 2023
@asbachb
Copy link
Collaborator

asbachb commented Jul 16, 2023

Could reproduce this on NetBean 18, OpenJDK17, Maven Project:

Create Maven Project, Tools -> Create / Update Tests, assertTrue(false);, Right Click Test class -> Test File

Rerun failed button cannot be clicked.

@asbachb asbachb added UI User Interface and removed needs:triage Requires attention from one of the committers labels Jul 16, 2023
@asbachb
Copy link
Collaborator

asbachb commented Jul 16, 2023

Same behavior on master (02dafb2)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug Bug report or fix UI User Interface
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants