Xtest properties and directories
Author: Libor Martinek,
Martin Brehovsky,
Jiri
Skrivanek
Last update: April 3, 2006
This document lists properties and directories which are available for
test developers.
1. Properties used in build scripts
1.1. Properties which you have to or may set in module's build.xml
or testtype's build-<testtype>.xml.
Properties in this table are used when tests are executed for one
module (from test directory). Usually xtest.module and xtest.attribs
are
overriden from commandline when user wants execute another testtype or
testbag. When tests are executed from higher level (instance, driver)
then these properties are overridden.
Global
properties - needs to be set in test/build.xml
|
xtest.home
|
Required
|
Must point to built xtest module or xtest
distribution.
|
netbeans.dest.dir
|
Required
|
Points to tested IDE.
|
xtest.module
|
Required
|
Name of tested module.
|
xtest.testtype
|
Required
|
Default testtype.
|
xtest.attribs
|
Required
|
Default attributes.
|
Other
properties - needs to be set in test/build.xml
|
xtest.archive.ide.userdir
|
Optional
|
If true, IDE userdir will be archived in results
(default is true).
|
build.compiler.source
|
Optional
|
Source level used for tests compilation.
|
These properties are general for compilers and executors and are
usually set in testtype's build-<testtype>.xml in target
"set_classpath" on which compiler or executor target depends.
| Mail properties
- use when you wan't to sent results by email. |
| xtest.mail.mailhost |
Optional
|
SMTP server.Default is "localhost". |
xtest.mail.from
|
Optional
|
Sender address. Default is
"xtest". |
xtest.mail.results.to
|
Optional |
Address where to send all result. |
| xtest.mail.failed.to |
Optional |
Address where to send failed
result. It's send only if some test failed.
|
xtest.mail.ignore.expected
|
Optional |
Whether ignore expected fail.
When true, failed result is send only if there is unexpected fail or
error. When false (default), failed result is send if there is any fail
or error. |
1.2. Read-only properties
Read-only
properties
|
xtest.tmpdir
|
Directory for storing temporary data (files,
programs, etc.). Directory is not deleted during testing one module.
|
xtest.sketchpad
|
Directory for storing data, which will be
included in results. Directory is not deleted during testing one module.
|
xtest.workdir
|
Xtest working directory for storing test
classes, temp. results, ide userdir, etc. This property should not be
used by test developers. Use rather xtest.tmpdir or xtest.sketchpad.
|
xtest.data
|
XTest data directory. It
corresponds with test/${xtest.testtype}/data directory where test
developer can store golden files, sample files or additional resources
needed for tests.
|
2. Properties which are used from commandline.
This properties should not be set inside build script. Use this
properties in ant commandline when you execute module tests.
Advanced
properties
|
xtest.testbags
|
Optional
|
Executes only testbags with given names
(separated by ","). Test attributes are ignored in this case.
|
xtest.userdata.propertyfile
|
Optional
|
Property file with properties to load. Useful
only for properties witch depends on site/machine. All properties must
be with prefix "xtest.userdata|" or
"xtest.userdata(<attrib>)|" where <attrib> is
attribute name. This property is intended to set only in ant
commandline when executing tests for one module.
|
xtest.ide.exit
|
Optional
|
Set this property to "false" if you want to
leave IDE running after testbag is finished.
|
xtest.includes
|
Optional
|
Includes pattern will be merged with pattern set
in cfg files.
|
xtest.excludes
|
Optional
|
Excludes pattern will be merged with pattern set
in cfg files.
|
| xtest.module.configfile |
Optional
|
Load config file specified by
this property instead of default one.
|
| xtest.run.singletest |
Optional
|
To execute just one test. It
will use default executor, compiler and resultsprocessor. |
xtest.machine
|
Optional
|
To define host name used in
results. If not defined it tries to resolve it.
|
3. Properties used inside tests
These properties are accessible inside tests by
System.getProperty(...)
call. Use them
only for reading , do not modify them! Use
these properties if you need permanent place for your data during
testing whole module. Otherwise use call
NbTestCase.getWorkDir()
to get unigue workdir for one test (test method).
User properties
|
xtest.tmpdir
|
Directory for storing temporary data (files,
programs, etc.). Directory is not deleted during testing one module.
|
xtest.sketchpad
|
Directory for storing data, which will be
included in results. Directory is not deleted during testing one module.
|
Internal or
deprecated properties
|
work.dir
|
Deprecated. Use xtest.tempdir or
xtest.sketchpad for storing user data.
|
system.dir
|
Deleted. You cannot use this property anymore
(for details see issue #17333)
|
xtest.workdir
|
Root of working directory. Not intended for
direct use.
|
4. Directories
Directory
|
Usage
|
When cleaned
|
Included in
results
|
${xtest.tmpdir}
|
User tempdir
|
Before running module tests
|
No
|
${xtest.sketchpad}
|
User sketchpad
|
Before running module tests
|
Yes
|
${system.dir}/tests
|
Unpacked test
|
After finishing testbag
|
No
|
${system.dir}/ide
|
IDE userdir
|
Directly before running testbag
|
Yes
|
${xtest.workdir}/user
|
NbJunit userdir
|
After finishing testbag
|
Yes
|