UtilityUnitTests > testReadFromJson() FAILED org.opentest4j.AssertionFailedError at UtilityUnitTests.java:66 UtilityUnitTests > testWriteToJson() FAILED org.opentest4j.AssertionFailedError at UtilityUnitTests.java:59
The above errors are showing on my GitLab CI pipeline run.
The automatic build works, and 9 other test cases work.
Does anyone have an idea on these errors?
Related
I am running cucumber test cases in bulk.
Suppose I have 5 feature files to run in bulk and one failed out of it.
So in next execution I'm trying to run failed test cases, for that I'm trying to use Intellij provided feature, i.e. Rerun failed Test. So when I click on it, it gives me below error.
Error:
0 test classes found in package 'test.java'
Picked up JAVA_TOOL_OPTIONS: -'path of JAVA_TOOL_OPTION'
Process finished with exit code -2
Empty test suite.
I have about 550 tests in my project and it is usually time consuming to locate these in a very lengthy debug log.
A typical error message from a test is like
build 08-Oct-2018 15:17:18 com....IntegrationTest > testGetFilteringByMetadata FAILED
build 08-Oct-2018 15:17:18 java.lang.AssertionError at IntegrationTest.java:148
Is it possible to collect failed test outpit somehow and produce a summary of the failed tests at the end of the build scenario? At least, what test failed and on which line, and ideally full log output for each of failed tests.
I use JUnit and gradle.
You can turn on logging for failed events as follows:
test {
useJUnitPlatform()
testLogging {
events "failed" // "passed", "skipped", "standardOut", "standardError"
}
}
I'm new to IntelliJ IDEA and can't understand the cause for the following error when trying to debug unit tests:
Error:gradle-resources-test:StorageService_test: java.lang.NoClassDefFoundError: org/apache/tools/ant/util/ReaderInputStream when debugging tests in IntelliI IDEA
although the code is building fine I can't debug because the debugger give me this error and fail to start.
I'm running sbt test in a multi-project build, and the tests keep failing randomly with a "double free or corruption" error.
Example (truncated) output:
[info]
[info] Passed: Total 9, Failed 0, Errors 0, Passed 9
*** Error in `java': double free or corruption (!prev): 0x00007faac8027d70 ***
/usr/share/sbt-launcher-packaging/bin/sbt-launch-lib.bash: line 41: 8420 Aborted (core dumped)
"$#"
The command fails every time I run the tests, but always at a different point.
I've found another StackOverflow question that suggests that this could be about multi-threaded access to a native library, but I'm at a loss on how to begin to figure out which part of the code might be causing this. (It's a fairly large project with about twenty external dependencies (not counting transitive ones).)
Could you point me towards how to best debug this?
Extra steps I've tried:
running sbt clean test and then sbt test-quick means the second command passes, even if the first one failed with the strange error. (It still fails if there's a bug caught by the unit tests.)
running sbt clean test for each project individually doesn't reproduce this error
When I run my testcase using righclick on project Run as Junit test Its running fine.
But when I try to run with maven(maven clean install)
I am getting timeout exception.
[![INFO 2016-02-01 16:48:28,900 \[Thread-5\] org.mule.module.xml.filters.SchemaValidationFilter: Schema factory implementation: com.sun.org.apache.xerces.internal.jaxp.validation.XMLSchemaFactory#3074311d][1]][1]
I am getting continuous above log.