Re: [xwiki-users] On Which Features Should I Focus When Testing?
Hi Ian, Thanks for the clarification. On 6/12/07, Ian Bamsey <ian.bamsey@certus-tech.com> wrote:
The XML-RPC is a useful way to integrate Wiki content into other applications. Currently the update-page RPC is broken. You can successfully change the page, but you don't see the results via the browser HTML view. The page update will show only once you restart Tomcat. So my point is that a unit test which picks up this bug would be useful, once the bug has been resolved to prevent regression.
You are right that this is an annoying bug (see also http://tinyurl.com/2e69xj) and before fixing such bugs it would make a lot of sense to build a test that prevents regression in the future. XWiki developers have a lot to learn once it comes to testing, but we hope that things will only get better in the future. For now all I can advise you to do is to make sure that the bug is reported properly on the JIRA (http://jira.xwiki.org) (couldn't check since the JIRA is temporarily unavailable). If you want to discuss more about this bug then please use the thread I gave you: http://tinyurl.com/2e69xj
My point about code structure is that the code which updates a page from a RPC should be the same code which updates the page from anywhere else. One problem I see in XWiki is that functions are repeatedly coded in all different places, giving rise to these types of problems.
As Sergiu suggests this is most likely related to caching. Don't think that XWiki functionality is coded twice, but if have a concrete example in the code then we would like to know about it. Regards, Catalin
Catalin Hritcu wrote:
Hi Ian,
And thank you for the feedback.
On 6/11/07, Ian Bamsey <ian.bamsey@certus-tech.com> wrote:
A useful set of unit tests would exercise the XML-RPC interfaces and verify the effect in the HTML view.
For example:
1. Use XML-RPC to create/modify a page 2. Assert the page changes via the HTML view.
Sorry, but I don't understand why such a use case would be relevant when functional testing. I think hardly any end-user uses XML-RPC directly. And if I was to test the XML-RPC API, I don't understand why would I need to check the results in a web browser (assuming this is what you mean by "the HTML view?"). Maybe you can explain better why this would be useful.
In milestone 1, this does not work and I don't think it has been corrected.
Can you give more details of this issue? Is it related to this JIRA issue http://jira.xwiki.org/jira/browse/XWSUP-1688 ? Do the others know more about this?
The important point here is that well structured code would have the RPC call use the same function call as the HTML call.
What exactly do you mean by HTML call? I'm confused.
The UT would then verify the underlying call, then supplementary UTs would check the HTML, XML-RPC alone, then further tests check there interaction.
Sorry, but I don't understand what you mean. Can you please explain better?
Regards, Catalin
-- Certus Technology Associates Limited. http://www.certus-tech.com Tel: +44 (0)1392 270930
participants (1)
-
Catalin Hritcu