Ask Your Question

How to do tests in Java program

asked 2019-06-07 03:21:18 -0500

Rafutek gravatar image

Hey, I want to do testing on my OpenCV 3.6 java program and I don't know how to do that. Is there a specific module? If there is, how should I use it? If not, is there a java framework for that?

I am really new to Java and Java testing... Thank you in advance !

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2019-06-07 03:29:24 -0500

berak gravatar image

ofc. there is a framework for that, please have a look here and the builtin unit tests, e.g. here or here, hope you get the pattern: some_module/misc/java/test

edit flag offensive delete link more


Thanks a lot, I will have a look. When installing the library, do I have to enable specific options to be able to do tests?

Rafutek gravatar imageRafutek ( 2019-06-07 03:46:34 -0500 )edit

do I have to enable specific options ?

you have to build the libs from src, using cmake -DBUILD_TESTS=ON (else the tests don't get compiled), then it is:

python opencv/modules/ts/misc/ . -t java
berak gravatar imageberak ( 2019-06-07 04:21:28 -0500 )edit

Okey perfect. Do OpenCV has a framework for UI testing? Like interactions with OpenCV window, or giving a certain UI context for example...

Rafutek gravatar imageRafutek ( 2019-06-07 10:32:33 -0500 )edit

^^ most probably not so, remember the focus here is on computer-vision.

berak gravatar imageberak ( 2019-06-07 13:10:40 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2019-06-07 03:21:18 -0500

Seen: 30 times

Last updated: Jun 07