Comments (5)
Two more things that I have noticed:
The highest version which still works is 3.0.0-M3. When running with versions 3.0.0-M4 and 3.0.0-M5 I get an error:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5:test (default-test) on project scalatest-junit-runner-maven-example: No tests were executed! (Set -DfailIfNoTests=false to ignore this error.) -> [Help 1]
But when running with versions 3.0.0-M6/7 I don't get any error:
CustomListener: execution FINISHED: SomeCodeTest with result: SUCCESSFUL
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.069 s - in co.helmethair.scalatest.example.SomeCodeTest
CustomListener: execution FINISHED: scalatest with result: SUCCESSFUL
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.620 s
[INFO] Finished at: 2022-09-22T21:56:15+03:00
[INFO] ------------------------------------------------------------------------
from scalatest-junit-runner.
Thank you for the report and the patience!
The highest version which still works is 3.0.0-M3. When running with versions 3.0.0-M4 and 3.0.0-M5 I get an error:
The cause of this is that there is no really good way (or I did not figured out) to report tests which are not strictly functions:
executionFinished(TestIdentifier [uniqueId = '[engine:scalatest]/[suite:co.helmethair.scalatest.example.SomeCodeTest]/[test:someFunc in SomeCode calculates square]', parentId = '[engine:scalatest]/[suite:co.helmethair.scalatest.example.SomeCodeTest]', displayName = 'someFunc in SomeCode calculates square', legacyReportingName = 'someFunc in SomeCode calculates square', source = MethodSource [className = 'co.helmethair.scalatest.example.SomeCodeTest', methodName = 'someFunc in SomeCode calculates square', methodParameterTypes = null], tags = [], type = TEST], TestExecutionResult [status = SUCCESSFUL, throwable = null])
The important part here is the methodParameterTypes
which is null
because when create the TestSource object I call MethodSource.from(containingSuite.getSuiteId(), testName));
which sets the methodParameterTypes
to null
. Passing a third parameter (an empty string) seems to solved the problem for M4, M5, M6 and M7.
It is unfortunate that M6/M7 even swallowed the exception, thank you very much for the additional report it helped to track down the problem a lot.
Expect a minor version released with the fix soon.
from scalatest-junit-runner.
0.1.12 released, should be available on Maven Central soon
from scalatest-junit-runner.
@giurim thank you! I appreciate that.
from scalatest-junit-runner.
Thank you! This solves the issue.
from scalatest-junit-runner.
Related Issues (20)
- Test discovery breaks when running into classes/objects which are not valid Tests HOT 1
- Support discovery of suites with failed initialization by `UniqueId` HOT 4
- test extending BeforeAndAfterAll does not run beforeAll() and afterAll()
- Tests not extending from scalatest classes are not discovered
- Wrong JUnit reporting makes failed test to be treaded as passing HOT 8
- MalformedClassName exception during discovery
- Specifying reporters HOT 9
- Exception-induced RunAborted event is not reported as fail
- Kotlin DSL example HOT 1
- RunAborted events are not reported HOT 3
- Nested tests represented as properly nested rather than individual tests HOT 1
- Correctly handle Scalatest TagAnnotations HOT 1
- failed assertions in future context show as passing HOT 3
- Scala 3 support
- tag filtering ignores "failed to init" test classes HOT 5
- Test suite throws "org.junit.platform.commons.PreconditionViolationException: The discover() method for TestEngine with ID 'scalatest' returned a cyclic graph." error HOT 10
- Can we add support for running tests in parallel? HOT 1
- scalatest-junit-runner does not work with Gradle Test Distribution HOT 5
- Add support for UniqueId selectors
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 scalatest-junit-runner.