Hi Renaud,

On 14-08-18 05:30 PM, Renaud Richardet wrote:
Hello,

What are best practices for writing unit tests for Ruta?

Ideally, I would like to have 1) tests that can be run on the command line
(so as to automate them in Jenkins), and
We use JUnit and it works quite well for us. I have a small example project on github with a RUTA script and its unit test (https://github.com/apatry/ruta-with-maven). You can also look at RUTA test suite if you want more examples (http://svn.apache.org/viewvc/uima/ruta/trunk/ruta-core/src/test/java/org/apache/uima/ruta/).
2) where input and expected output
can be edited in a text editor (meaning: not xmi's or java code).
Is there a reason why you want to avoid Java code for unit tests? Building and inspecting CAS in Java for each test allow a lot of flexibility and makes it possible to test each analysis engine outside of its pipeline. And uimaFIT is an excellent tool for that (http://uima.apache.org/uimafit.html).

Hope this help,

Alexandre

--
Alexandre Patry, Ph.D
Chercheur / Researcher
http://KeaText.com

Reply via email to