The VRTest application is a Novell-written application used internally by the DirXML team for testing DirXML. The VRTest application can simulate various types of applications including directories with a hierarchical structure and applications with a flat structure. The executables are:
The VRTest application is distributed with the executables, a batch file to simplify invoking separate instances of the server and client, and several preconfigured schema/DirXML driver combinations. The following preconfigured schemas and preconfigured DirXML driver files are provided in directories named:
The VRTest server and client are typically invoked via a batch file from the program directory found in the distribution. To load the VRTest server with the sample flat schema the following command is used:
vrtest server 01 load
To load the VRTest client application and communicate with the server the following command is used:
vrtest client 01
To unload the VRTest server with the server the following command is used:
vrtest server 01 unload
To invoke instances with other schemas simply replace the "01" in the above command with "02", "Ex", or "Ps".
To load and execute a DirXML driver for the one of the VRTest instances perform the following actions:
Note that vrtest_driver.dll is used for all of the driver instances. The only differences in the preconfigured drivers are the DirXML rules and the driver configuration parameters.
Usage: vrtestserver {-iu?} [-config=filename] | [[-port=TCP port] [-schema=filename] [-storage=filename]]
Parameter |
Description |
i | Install or load the server. |
u | Uninstall or unload the server. |
? | Display the usage message |
config=filename |
Specify a configuration file which contains the TCP port, schema file name, and storage file name. The format of the file is: portnumber schema filename storage filename |
port=portnumber | Specify the base TCP port number. The base port number and the base port number plus one are used. Defaults to 3000. |
schema=filename | Specify the name of the file containing the schema definition. Defaults to "schema.txt". |
storage=filename | Specify the name of the file containing the persistent store for the server. Defaults to "storage.txt". |
Note that a VRTest server instance uses two TCP ports: The specified port number and the specified port number plus 1. For example, if 3000 is specified, 3000 and 3001 are used.
usage: vrtestclient [-host=hostname -port=portnumber] | [-config=filename]
Parameter |
Description |
-host=hostname | host name or IP address of server running the VRTest server instance with which to connect. Defaults to "localhost". |
-port=portnumber | TCP port number on which to connect to server. This must match the port number specified for the server instance. Default to 3000. |
-config=filename |
Specify a configuration file which contains the host name and TCP port number to use. The format of the file is: hostname portnumber |
The schema for an instance of the VRTest server is specified by a text file containing schema information. The default name of the schema file is "schema.txt".
A simple schema file is displayed below:
//Test schema Schema "First Test Schema" casesensitive false hierarchical true subtreedelete true uniqueids true class name "Organization" container true attribute name "Name" maxLength 128 indexed true class name "Organizational Unit" container true attribute name "Name" maxLength 128 indexed true class name "User" container false attribute name "cn" maxLength 20 required true multiValued false indexed true // unique true // casesensitive true attribute name "Surname" maxLength 30 required false multiValued false indexed false unique false casesensitive false attribute name "Given Name" maxLength 20 required false multivalued false indexed false unique false casesensitive false attribute name "Telephone Number" maxLength 15 required false multiValued true /* attribute name "phone number" maxLength 15 required false multiValued true */ class name "Bogus" container false attribute name "Whatever" maxLength 50 multiValued true
Schema, class, and attribute names are enclosed in double quotes. This allows spaces to be used in names. Boolean values are specified using "true" and "false". Numeric values are specified using positive integers.
Comments may be specified in a schema file in the C++ fashion: a double forward slash indicates that all characters following the "//" on the line are comments. A block of text may be delimited as a comment using "/*" and "*/".
The schema as a whole may have the following properties specified:
Property |
Description |
Default Value |
Schema | The name of the schema. | none |
casesensitive | If "true", object attribute values in the schema are compared in a case-sensitive fashion. | true |
hierarchical | If "true", classes may be containers, i.e., they may contain objects. | false |
subtreedelete | If "true", subtree hierarchies rooted at a container may be deleted by deleting the subtree root. If "false", containers may not be deleted unless empty. | false |
uniqueids | If "true", each object is identified by a unique value generated by the server instance. Note that unique ids must be true to use a schema instance with the DirXML driver for VRTest. | true |
Each class in the schema may have the following properties specified:
Property |
Description |
Default Value |
name | The name of the class. This must be specified and must be unique among classes in the schema. | none |
container | If "true", and if the schema is declared to be hierarchical, then the class is a container and may contain other objects. | false |
casesensitive | If "true", object attribute values in the class are compared in a case-sensitive fashion. This value overrides the schema-wide setting for the class containing the value. | true |
Each attribute in a schema may have the following properties specified:
Property |
Description |
Default Value |
name | The name of the attribute. This must be specified and must be unique among attributes defined in the containing class. | none |
maxLength | The maximum length, in characters, of a value of the attribute. | unlimited |
required | If "true", the attribute value must be specified on an object or the object cannot be created. | false |
multiValued | If "true", multiple values are allowed for the attribute on an object. | false |
indexed | If "true", an internal index is built and maintained by the server to improve search performance. | false |
unique | If "true", the attribute value must be unique among all objects of the class contained in the server. | false |
casesensitive | If "true", object attribute values are compared in a case-sensitive fashion. This value overrides the schema-wide and class-wide setting. | true |
Note: Do not change the schema definition file without first deleting any storage file ("storage.txt" by default).
The DirXML driver for the VRTest application is found in vrtest_driver.dll. This file, together with VRTestAPI.dll must be copied to the executable directory of NDS (normally C:\Novell\Nds).
Parameter |
Description |
Default Value |
Host name or IP address | Specifies the name or IP address of the server to which the driver is to connect to the VRTest server instance. | localhost |
TCP port number | Specifies the base TCP port through which the driver is to connect to the VRTest server instance. | none |
Allow Loopback | Allow events initiated on the driver's subscriber channel to loop back to DirXML via the publisher channel. Useful for simulating drivers that cannot detect loopback. | no |
Use Filter | Use the publisher filter that is passed from DirXML to the driver's publisher init method. If the filter is not used, all events on classes and attributes will be submitted to DirXML even if the class or attribute is not in the publisher filter. | yes |
Log Input To Nds | Create a log file containing all documents sent to DirXML on the publisher channel. The log file is named "publisher.log" and will be placed in the system's temp directory. | no |
Save state with each event | Write driver state information with each event published. This is normally only useful for testing the DirXML engine. | no |
Simulate record-level-only change notification | Simulate a driver that can only tell that a record changed, not which field within a record changed. | no |