[ 
https://issues.apache.org/jira/browse/MRQL-34?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13940589#comment-13940589
 ] 

Leonidas Fegaras commented on MRQL-34:
--------------------------------------

Thanks for doing this Lee moon soo.
I don't think is necessary to hardwire the queries inside the Java test files 
as strings. There are hundreds of queries and some of them must be processed 
together. Also it would be hard to add new test cases.
What we can do is keep the directories tests/queries/, tests/data/, and 
tests/results/ and make the Junit test file very generic: It can go through 
each query in tests/queries/ using a loop, read it, evaluate it, and use 
assertEquals to compare the result of the query with the expected result in 
tests/results. We may have to remove tracing info from the output, such as 
"total time" etc. The only difference from the current testing would be that it 
will use Junit assertions to do the testing instead of using diff. We can also 
organize tests/queries/ into subdirectories, one for each category (eg 
basic-tests, loops, etc).

> Introduce junit for testing
> ---------------------------
>
>                 Key: MRQL-34
>                 URL: https://issues.apache.org/jira/browse/MRQL-34
>             Project: MRQL
>          Issue Type: Improvement
>            Reporter: Lee moon soo
>         Attachments: MRQL-34.patch
>
>
> MRQL has testcase and it's run as java standalone application by 
> org.apache.mrql.Test. 
> The Test class Invoked by maven antrun plugin at test phase
> and then load the queries and generate result and compare with the previous 
> result (if result exists)
> If junit runs those test case instead of antrun, it'll give some advantages
> 1. More common ways to adding / running test in Java
> 2. Once CI is setup, junit produces information for CI about details of test.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to