Open Prakash-Saravanan opened 7 years ago
When running as an XML file, it will run all the methods. Is this an expected behavior with Eclipse runner too?
@Prakash-Saravanan - I think that's the expected behaviour. TestNG resorts to reflection to find methods, but it doesn't differentiate methods based on their signatures, but resorts to finding methods based on ONLY names. So IMO this is not an issue but TestNG is working as designed.
Could be an improvement on test selection or, at least, testng may warn if it found many methods with the same name.
@krmahadevan @cbeust What do you think?
@juherr - I think that makes sense to add a warning (at-least) informing the user of multiple overloaded versions of the same test method.
TestNG Version
Expected behavior
Having more than one methods in a class with same name and different signature (method overloading) and selecting (by double clicking the method name) and running one test method, it should run the selected method alone.
Actual behavior
It executes all the methods with that name.
Is the issue reproductible on runner?
Test case sample