Comments (3)
@lefou
Looks like running JUnit tests from SBT produces correct reports if there are any failed tests.
Are you sure that the issue is with junit-interface
and not with Mill
or LambdaTest
?
If you are sure, then what exactly is wrong with the reports?
from junit-interface.
The same example test suite is not detected to fail by sbt (which uses junit-interface). But it is properly detected to fail when run with Maven and Junit.
So, Junit properly runs the tests in all three build tools and also always detects one failure. But when junit-interface is used, the failure is not property reported. I think junit-interface is loosing some information, e.g. by ignoring some part of the test name.
Here are the build scripts I used:
sbt:
name := "Example"
libraryDependencies += "com.novocode" % "junit-interface" % "0.11"
libraryDependencies += "de.tototec" % "de.tobiasroeser.lambdatest" % "0.7.0"
libraryDependencies += "org.slf4j" % "slf4j-api" % "1.7.30"
Maven:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.example</groupId>
<artifactId>jpademo</artifactId>
<version>1.0</version>
<packaging>jar</packaging>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>de.tototec</groupId>
<artifactId>de.tobiasroeser.lambdatest</artifactId>
<version>0.7.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.30</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
from junit-interface.
Fixed in release 0.12
.
from junit-interface.
Related Issues (20)
- Add JUnit4 version description corresponding to junit-interface 0.13.3 in READEME
- How to run all tests without certain tags?
- Tests annotated using @RunWith not picked up by sbt HOT 7
- running tests against exportJar never close the file handlers HOT 4
- Tests annotated in super class with RunWith are ignored
- Only one test is found / run HOT 2
- support opening and closing quotes in --tests HOT 2
- Doesn't support scala 2.11 HOT 1
- Junit 5 Compatibility HOT 14
- SBT 0.13.13 compatibility HOT 1
- Memory Leak in regard to TestClassLoader / Metaspace HOT 1
- JUnit Tests Ignored when Forking is Enabled
- Jenkins Pipeline Parallel test execution with SBT
- Does not report failures in cucumber scenario outline results HOT 4
- Compatibility with Spring 4.3 and above HOT 2
- support multiple junit --run-listener
- SBT 1.3. and junit-interface 0.11 not running JUnit tests HOT 1
- Publish a new release of junit-interface? HOT 11
- can't run tests with same name multiple times HOT 1
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 junit-interface.