Comments (5)
@youming-lin - This seems to be a problem specific to TestNG eclipse plugin perhaps?
Can you please run the below sample and tell me what you see? I dont see issue that you are experiencing.
import org.testng.IInvokedMethod;
import org.testng.IInvokedMethodListener;
import org.testng.ITestResult;
import org.testng.TestNG;
import java.util.ArrayList;
import java.util.List;
import static org.assertj.core.api.Assertions.assertThat;
public class IssueMain {
public static void main(String[] args) {
TestNG testng = new TestNG(false);
testng.setTestClasses(new Class[]{TestNGEclipseIgnoreBugSample.class});
InvokedMethodListener listener = new InvokedMethodListener();
testng.addListener(listener);
testng.run();
assertThat(listener.invokedMethods).isEmpty();
}
public static class InvokedMethodListener implements IInvokedMethodListener {
final List<String> invokedMethods = new ArrayList<>();
@Override
public void beforeInvocation(IInvokedMethod method, ITestResult testResult) {
invokedMethods.add(method.getTestMethod().getMethodName());
}
}
}
If the problem still exists when running via eclipse, then you should perhaps file this issue on https://github.com/testng-team/testng-eclipse
@missedone - FYI
from testng.
@krmahadevan Thanks for checking!
I created a new project with just this test class and cannot reproduce this any more (neither running mvn test
nor through TestNG Eclipse plugin). Not sure what is going with the original project's configuration.
from testng.
I have same issue with @ignore annotation, individual tests are disabled only when using enabled = false
.
- Gradle 7.6,
- Verified with different versions of testng
-- 7.5.1 and 7.8.0 -@Ignore
annotation at method level is not working in both cases
-- 7.4.0 -@Ignore
annotation disables the test, as expected.
(PS: not using eclipse)
Was there any issue / resolution that was identified? Thanks
from testng.
@ramtech123 - Please share a sample project that can be used to reproduce the problem
from testng.
It is working fine with a plain vanilla gradle project. Need to figure out the difference with my main project as the latter has some additional configurations. Will try to get a reproducer in a few days. Thanks.
from testng.
Related Issues (20)
- How to enable generateTestResultAttributes programatically using Java ? HOT 1
- Should not we use the lock everywhere suiteResult is used? HOT 1
- Associate a unique id with every test class object instantiated by TestNG
- Discrepancy with combination of (Shared Thread pool and Method Interceptor) HOT 1
- IInvokedMethodListener Iinvoked method does not return correct instance during @BeforeMethod, @AfterMethod and @AfterClass
- Please document project's PGP artifact signing keys HOT 2
- Why is my test case not retried but ignored after execution failure? HOT 5
- Possible to merge PR 3067 in 7.9.0 HOT 2
- Super class annotated with ITestNGListenerFactory makes derived test class throw TestNGException on execution HOT 1
- Test cases are being skipped when running in parallel a factory class containing dependent methods HOT 11
- Update from testng 7.9.0 to 7.10.0 break maven build with junit5 HOT 11
- Replacement API for `IClass.getInstanceHashCodes()` and `IClass.getInstances(boolean)` HOT 19
- How come TestNG listeners are global? HOT 3
- Failing while building testng version 7.7.1 using ./gradlew build HOT 3
- ListenerComparator doesn't work HOT 4
- ITestNGListenerFactory is broken and never invoked HOT 3
- can not set custom test method name when using data provider HOT 12
- Update JCommander to 1.83
- [Feature Request] allow multiple groups with AND condition HOT 2
- How to rerun skipped test cases using TestNG? HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from testng.