Ask Your Question
0

How to do tests in Java program

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

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
1

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

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

Comments

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 -0600 )edit
1

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/run.py . -t java
berak gravatar imageberak ( 2019-06-07 04:21:28 -0600 )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 -0600 )edit

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

berak gravatar imageberak ( 2019-06-07 13:10:40 -0600 )edit

Question Tools

1 follower

Stats

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

Seen: 430 times

Last updated: Jun 07 '19