-
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
[TestResult] confusion (set / get) methods to obtain the method name #1944
Comments
@juherr, consent to refactoring.
|
So wouldn't the following refactoring be less invasive ?
I believe the confusion is only because |
Agree to rename @shaburov Does it fix the issue too? |
@juherr I do not think it's a good idea. Renaming the API of a method without |
@shaburov But I agree that a deprecation will be more safe and fair. |
@krmahadevan that's what the implementation comment in
So the implementation is wrong, and it should have never used the testName from the Other tools, like IntelliJ has a workaround for this bug, but it's only applied when |
@shaburov - Would you be willing to help raise a PR for this ? That way it would be easier to reason out and then track this to closure ? |
The expected behavior about name is supposed to be covered by tests: https://github.com/cbeust/testng/blob/master/src/test/java/test/name/NameTest.java @danberindei Do you think one or more of the tests should be changed? |
testng-7.0.0-beta1
interface ITestResult contains methods:
However, the implementation class TestResult return:
IInvokedMethod.getTestResult().getName() -> TestName
IInvokedMethod.getTestResult().getTestName() -> null
Not only is the result confusing. The implementation of TestResult is contrary to the contract ITestResult.
Playback Code:
Actual console output:
Expected console output:
In my personal conviction, the implementations of the getName () and getTestName () methods are confused.
The text was updated successfully, but these errors were encountered: