Community
Participate
Working Groups
Hi, Marius, as requested, I've checked in a JUnit test case for searching a Test execution result file using org.eclipse.hyades.models.hierarchy.util.internal.SimpleSearchQueryEngine. It's: org.eclipse.hyades.use.cases\src\org\eclipse\hyades\use\cases\junit\models\test\TestLogSearchTest.java The query was the same one we created together. The QueryResult returned contains one ResultEntry with an empty value. Creating this defect for tracking this. Thanks!
I updated the testcase and the engine, please let me know if it works for all your scenarios. You can add now the required paths through SimpleSearchQueryEngine.getRequiredPaths() (see the example in the testcase), this replaces the special IN expressions.
Just tried version 1.4 of TestLogSearchTest.java. The two test cases there works like a charm! So I just tried search for text and id fields (actually don't need to search fields(id) that's not user visible in my case), haven't tried the new required paths yet. It certainly looks very promising! I'll add more test cases as I try more cases soon. Stay toned. Thanks a ton for the quick turn around, Marius!
I updated TestLogSearchTest.java to version 1.5. It now has 4 test cases. First, I'd like to compliment the new API for required paths. It allows the tuning of the search scope very easily and efficiently. It's a great improvement to the search engine. There are just two little problems I current have and they are reflected in the two test cases: 1) testSearchProperties(). The expected result for it is one verdict event. The search did find the event successfully, but the query results contains two references to the exactly same verdict instance. 2) testSearchInvocationEvent(). The search result would be perfect if it can honor the case sensitive requirement. Maybe I didn't set the case sensitive properly? Please let me know. Thanks!
I've added a way to control the pruning mechanism see an example in testSearchProperties by overriding SimpleSearchQueryEngine.usePruneSubtree() method. You can get distinct values using query.setDistinct(true) althogh it is better if you avoid getting duplicated values in the first place by using the pruning mechanims. Your testcase works fine now (you set case insensitive, used assertEquals with the wrong input), please add more scenarios and let me know if any of them fails.
query.setDistinct(true) also worked for me. Thanks. The the test case for case sensitive is confusing. it is searching for "SUCCESSFUL" and is actually expecting a result of length 0, but 28 results returned. BinaryExpression invocationEventSearch = createBinaryExpression(Common_TestprofilePackage.eINSTANCE.getTPFInvocationEvent_Status(), "SUCCESSFUL"); I've updated it as such.
I'll close this, please reopen if you find any scenario that doesn't work.
As of TPTP 4.6.0, TPTP is in maintenance mode and focusing on improving quality by resolving relevant enhancements/defects and increasing test coverage through test creation, automation, Build Verification Tests (BVTs), and expanded run-time execution. As part of the TPTP Bugzilla housecleaning process (see http://wiki.eclipse.org/Bugzilla_Housecleaning_Processes), this enhancement/defect is verified/closed by the Project Lead since this enhancement/defect has been resolved and unverified for more than 1 year and considered to be fixed. If this enhancement/defect is still unresolved and reproducible in the latest TPTP release (http://www.eclipse.org/tptp/home/downloads/), please re-open.