eclipse/lyo.testsuite — pull request #4 by yyin (2012-01-10 15:24:45+00:00)
Title: Bug 367036 - Add JSON to the testsuite

I added ChangeRequestJsonTests.java to the oslc2 testsuite. There are 16 new tests to cover application/json requests and responses. The work also involves adding helper methods in TestBase.java.

I tested the work against RTC 3.0.1.1 and CQ 8.0.0.2. There are subtle differences in responses between them in some requests. But both worked well.

The tests failed against RIO-CM which is expected.

There are some work left to do:
1) I am seeking a more effectively way to parse JSON response (I am not very familiar with whether there is XML xpath type method in some library that allows me to get to the leaf key/value more effectively

2) right now, the calls in the constructor ChangeRequestJsonTests get called before each individual test methods which is very unnecessary - they should be moved to @Before as part of set up code. The reason I did not change this is that other classes do the same thing and I am not sure whether there is a particular reason to do things this way. I am just making a note here so we can enhance later.

Thanks

- Yuhong