Comments (3)
👍 I also run into this issue -- I copy pasted my test code in the describes
while experimenting with the library, but then was seeing that no tests run on the output, which was a bit confusing.
from specnaz.
I've done some research on this topic, and what I found is that the behavior is different between JUnit and TestNG.
The following code:
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
@RunWith(JUnit4.class)
public class ExampleTest {
}
fails a build with a "no runnable methods" error - the BlockJUnit4ClassRunner validates whether a class has any test methods (see code here).
However, this code:
import org.testng.annotations.Test;
@Test
public class ExampleTest {
}
works completely fine in TestNG, and does not cause the build to fail.
I think the Specnaz integrations should behave similarly to the framework their integrating with - so, my instinct is to fail the build in the JUnit Runner if no tests were found, but ignore it in the TestNG Factory.
Thoughts on this approach?
from specnaz.
Related Issues (10)
- Better Mockito integration HOT 2
- Specnaz TestNG runner fails, by trying to run *describes lambdas as test (and failing at it) HOT 3
- When we get an unexpected exception Specnaz should print full message/stacktrace for it HOT 6
- Problem with Maven HOT 3
- formatParamsDesc not sanitizing input HOT 3
- Support tests expecting Exceptions HOT 2
- Top-level description missing from terminal output when running tests HOT 2
- Support for top-level `fdescribes`? HOT 3
- Testing multiplatform code? HOT 13
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 specnaz.