On Thu, Mar 19, 2015 at 10:08 AM, vincent(a)massol.net <vincent(a)massol.net>
wrote:
Hi Caty,
See below.
On 18 Mar 2015 at 19:29:17, Ecaterina Moraru (Valica) (valicac(a)gmail.com
(mailto:valicac@gmail.com)) wrote:
Hi,
I want to write automated tests for some contrib applications, but I need
you help on some questions.
== Prb 1. Folder Structure + Changing IDs ==
Currently the majority of applications don't have modules.
You mean submodules I guess since they’re a module (maven module)
themselves.
Also some applications have IDs that don't
correspond with the contrib
standard: sometimes wrong groupId like 'org.xwiki.contrib.forum',
sometimes
random artifactId.
Why would ‘org.xwiki.contrib.forum’ be a wrong group id?
I considered it to be wrong, since from the start forum didn't had module.
The rule is defined here
http://contrib.xwiki.org/xwiki/bin/view/Main/WebHome#HHostingtools and a
module can have org.xwiki.contrib or org.xwiki.contrib.<shortprojetname>.
When wanting to change the groupId for
'org.xwiki.contrib.forum' I was
told
that we should change it only if we have a very
good reason, otherwise
changing the ID will resolve in upgrading problems within the Extension
Manager. Unfortunately I don't remember exactly the problem with the
changing of the ID, I just know I don't need to do it :) (//sorry Thomas)
We support relocation so the extension id (groupId+artifactId) can change.
The only negative effect is that XWiki will not propose an upgrade
automatically when the new version comes out with a new extensionId. (I’d
love to brainstorm about finding ways to handle this with Thomas though).
So the conclusion is:
- use the ui/test/tests+pageobjects structure
- change the ID + use 'properties' relocation
- wait for EM to improve the new ID discoverability
It would be great if we somehow can improve the discoverability of the new
ID, since from an user perspective is kind of bad to be stuck with the
current version. He would need to research it and readd the extension.
Thanks everyone for the answers,
Caty
Example:
https://github.com/xwiki-contrib/application-forum
Theoretically, wanting to add tests I would need to create two modules:
- application-forum-test
- application-forum-ui, and move the current sources here.
Unfortunately this means a change in the ID.
Are 'adding tests' a good reason to change the ID?
Should I not change the ID, and just add a test module?
- application-forum-test
- src/main/resources
I’m in favor of changing the extension id and add relocation (it was done
for this purpose). This is what we did in xwiki-platform for a lot of
modules.
== Prb 2. Naming standards ==
We have some conventions on
contrib.xwiki.org about name of the project.
We should add maybe some more examples on groupId and artifactId.
Also when looking at the test modules names, some applications have:
- {{full-repository-name}}-tests
- {{full-repository-name}}-test
- {{partial-repository-name}}-test
- {{random-repository-name}}-test
- test
Where? AFAIK I’ve been the one doing most of the tests relocation in
xwiki-platform and our naming rule has always been the same. For example:
there are places on xwiki-contrib with that structure, I was not talking
about xwiki-platform.
xwiki-platform-faq-test/
|_ xwiki-platform-faq-test-tests/
|_ …
Maybe we should agree also on this and document
it.
I guess the correct name would be:
- {{full-repository-name}}-test
-- {{full-repository-name}}-test-pageobjects
-- {{full-repository-name}}-test-tests
- {{full-repository-name}}-ui
Yes. Some conventions are already documented here:
http://dev.xwiki.org/xwiki/bin/view/Community/DevelopmentPractices#HBuildBe…
Also if we are 'discovering' some
applications that don't correspond to
the
standard, do we change them or do we let them be?
Since changing means a
change in the ID :P
I’d say we change them.
Since in theory we should have automated tests
for all our applications,
should we add a convention to always create a
- {{full-repository-name}}-ui ?
Yes. This is what I do when I create a new "top level" module.
Additional question: Also when we will transfer
from platform to contrib,
are we going to rename the modules?
I think we discussed this and we said we would change the id but not
change the package names for now to not break backward compat. Would need
to read again the mail thread. In any case we still have some decisions to
make on that. I’ve been wanting to do this move but first I wanted to
implement the cleanup/removal of xwiki-enterprise to make way for flavors.
Thanks
-Vincent
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs