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.
Related
As seen in the image, every time when I run the test, only the test class failed step is displayed in the console. It doesn't display the method step where it failed. I used to get the method failed line number in the console before but not sure what made this go away now.
734 orgPortal.satisfyAllconditionOfSanctions(); step failed is displayed in the console but it is not displayed where it has failed in the method ie satisfyAllcondtionOfSanctions
I have a testing application running as expected when executed on Eclipse IDE.
We want to export it to a jar and execute it via command line.
After executing, and running the application with the following comand, i encounter an error
java -jar testclient.jar -info
Error: Unable to initialize main class testclient.Main
Caused by: java.lang.NoClassDefFoundError: org/junit/runners/model/InitializationError
( -info) is an argument for the main method in the class.
Manifest file is pointing to the correct class.
On research of this topic, i checked whether the required libraries are added to the path. They are correctly added.
Could anyone provide some guidance
I'm running Fitnesse testing tool via Jenkins. Jenkins runs fitnesse after fixed interval. Following is the test page:-Fitnesse Test Page
1.creating script file
2. running it
In this, I'm simply printing message but this test page sometimes thrown an exception:-
java.util.NoSuchElementException
at java.util.LinkedList.removeFirst(LinkedList.java:270)
at com.objectmentor.fixtures.LineGatherer.readLine(LineGatherer.java:42)
at com.objectmentor.fixtures.CommandLineFixture.flush(CommandLineFixture.java:291)
at com.objectmentor.fixtures.CommandLineFixture.flushProcess(CommandLineFixture.java:65)
at com.objectmentor.fixtures.CommandLineFixture.endTable(CommandLineFixture.java:59)
at com.objectmentor.fixtures.CommandLineFixture.doTable(CommandLineFixture.java:48)
at fit.Fixture.interpretFollowingTables(Fixture.java:121)
at fit.Fixture.interpretTables(Fixture.java:107)
at fit.Fixture.doTables(Fixture.java:81)
at fit.FitServer.process(FitServer.java:81)
at fit.FitServer.run(FitServer.java:56)
at fit.FitServer.main(FitServer.java:41)
Exception
This exception thrown sometimes and sometimes it work perfectly. It fail 2 out of 10 times . and I didn't change anything , i am simply running same test after every 30 min.
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
I have an aws instance running with webservices that I want to test with a java application running JUnit. If I have a script that runs the jar during the validate services step of the code deploy process how does the code deployment handle the return value of the jar if a test fails?
Is it required that I catch exceptions thrown by the jar for the failing tests and call system.exit(-1) to have the script terminate the code deployment or does the exception thrown automatically give the return value of non-zero?
If you are running JUnit using JunitCore, it should return a non-zero exit code if any of the tests fail.
main
public static void main(String... args)
Run the tests contained in the classes named in the args. If all tests run successfully, exit with a status of 0. Otherwise exit with a status of 1. Write feedback while tests are running and write stack traces for all failed tests after the tests all complete.
Parameters:
args - names of classes in which to find tests to run
From: http://junit.org/apidocs/org/junit/runner/JUnitCore.html#main%28java.lang.String...%29