[Webtest] Propostion: Standard directory layout for a WebTest
Thu, 29 Jun 2006 23:34:25 +1000
A worthwhile endeavor in the spirit of 'convention over configuration'
so long as there are hooks to change the configuration in the rare
Some things to consider:
- Would we permit subdirectories under tests, environment, definitions etc?
(I think we would have to)
- Will the structure make it easy to work with Eclipse/IntelliJ? (I have
always found it hard to use WTP to do XML validation and also have
relative paths to DTDs (e.g. ../dtds/webtest.dtd) and entity declarations etc.)
- definitions.xml -> definitions?
- BC issue: will a fixed structure make life a nightmare for existing users?
- Is there a reason for macro declaration to be through entities and not
just imported directly?
- We need to make it easy for reports to be somewhere else (it is the
only directory not part of the source tree)
- We should think a bit about data-driven tests (would all that belong
in environment?) Maybe we could support 'data' too eventually.
I would be happy to help flesh out and trial something.
Marc Guillemot wrote:
> Hi all,
> we've already mentionned the necessity to make WebTest projects easier to
> start. One element could be to propose a standard directory structure. For
> this purpose, it would be good to find something on which we have a
> consensus. Dierk, Tomi and myself have following structure to propose for
> - dtds
> - project.dtd (1)
> - project-entities.dtd (generated) (2)
> - webtest.dtd (generated) (3)
> - definitions (4)
> - environment (5)
> - includes (6)
> - reports (generated) (7)
> - tests (8)
> - build.xml (9)
> - definitions.xml (generated) (10)
> (1) dtds/project.dtd
> the dtd that has to be referenced by the tests. Contains reference to
> project-entities.dtd and webtest.dtd and allows to add manually other
> (2) dtds/project-entities.dtd
> declare entities for all *.xml files from the includes directory.
> Automatically generated.
> (3) dtds/webtest.dtd
> the dtd for all tasks and macros available after tasks and macros
> definition. Automatically generated by AntStructure
> (4) definitions
> the directory where macro definitions and project specific tasks (as Groovy
> scripts) can be placed as xml snippets
> (5) environment
> the directory where properties for server, user, ... settings should be
> (6) includes
> the directory where xml snippets can be placed that will be automatically
> made available as entities through the dtd
> (7) reports
> the directory where the reports are generated
> (8) tests
> the directory where the real tests are located
> (9) build.xml
> the main entry point. Imports a webtest.xml from WebTest's home and just
> needs to override the wanted targets (if any).
> (10) definitions.xml
> contains all macro declaration (through entities) and is imported before
> tests execution to make the macros available
> Comments are welcome.