Java tests for OpenCV 3.1 desktop
Are there any automated tests included in nightly builds for testing java wrappers? What is the process of contributing tests to OpenCV?
Are there any automated tests included in nightly builds for testing java wrappers? What is the process of contributing tests to OpenCV?
Here is what I found but I'm not sure if this is the right way or not. The make process actually prints out the jar name of the junit tests for OpenCV java wrappers (opencv-test.jar). Here is how to run it.
Navigate to /opencv/build folder and run the following command:
java -cp ./modules/java/pure_test/.build/lib/junit-4.11.jar:./modules/java/pure_test/.build/build/jar/opencv-test.jar:./bin/opencv-310.jar -Djava.library.path="./lib" junit.textui.TestRunner org.opencv.test.opencv-package-name.test-class-name
opencv-package-name stands for the name of the corresponding opencv module, for example calib3d, core, features2d, highgui, imgproc, objdetect, photo, utils, video etc.
test-class-name can be any class from that package, which inherits from OpenCVTestCase. For example:
java -cp ./modules/java/pure_test/.build/lib/junit-4.11.jar:./modules/java/pure_test/.build/build/jar/opencv-test.jar:./bin/opencv-310.jar -Djava.library.path="./lib" junit.textui.TestRunner org.opencv.test.utils.ConvertersTest
will produce the following output:
.........................................
Time: 0.295
OK (41 tests)
UPDATE: as expected things are much more simple than we think of them initially )) OpenCV good team did great job already - all tests including java tests can be run from the build directory by this command:
python ../modules/ts/misc/run.py
more information is here. The only confusing part of documentation - seems like this command actually runs all tests so it can be used not only for performance control.
Asked: 2016-10-08 00:40:47 -0600
Seen: 860 times
Last updated: Oct 11 '16
Unresolved inclusion in OpenCV+Android tutorial
How to convert Floating point image to 32-bit single-channel?
How to translate this to Java?
android: how to put a column into Mat
OpenCV Tutorial 1 - Add OpenCV on API 8
Running the OpenCV4Android application on my PC
Using OpenCV as a stress detector