Overview

The Download Package includes a .NET Library that implements several tasks to be used by NAnt scripts.

Name

NAnt Task Library

dynaTrace Version

5.x, 6.x

Author

dynaTrace software

License

dynaTrace BSD

Support

Supported

Download

Description

The Download Package includes a .NET Library that implements several tasks to be used by NAnt scripts.

Following tasks can be executed:

This library makes use of the .NET Command Library.

Installation

  1. Save the attached file locally to the computer where the dynaTrace Client is installed.
  2. Unzip the file.
  3. Copy the extracted dlls to a directory where it can be picked up by NAnt when executing your build scripts
  4. View the extracted sample_nant.xml file. It shows how you can load the new build tasks in your NAnt scripts

Usage

You have to register the new Build Tasks with the UseTask configuration entry in your build scripts like this:

<loadtasks assembly="dynaTrace.NANT.Task.dll" />

The following tasks with the listed properties can now be used in your NAnt scripts:

StartSessionRecordingTask

StopSessionRecordingTask

SetActiveConfigurationTask

ServerServiceTask

ConfigureApplicationTask

SetTestInformation (from dynaTrace 3.5 till dynaTrace 6.0)

StartTest (from dynaTrace 6.1)

StartTest task registers a new test run in dynaTrace and sets the DT_TESTRUN_ID environment variable picked up by the .NET agent. Tests should be executed after this is made so that the agent sees the environment variable and will use it when reporting data back to dynaTrace.

Internals

The Library uses the dynaTrace.Command.dll which is installed with the dynaTrace Server. dynaTrace.Command.dll uses the dynaTrace Web Service interfaces. For every dynaTrace.Command.dll call the library creates an EventLog Entry with detailed information about the command line arguments that were passed. This should help with troubleshooting.

The task ConfigureApplicationTask needs write access to the HKLM Registry on your local machine. In case your user does not have the appropriate access rights you will run into errors.

Sample NAnt Script

The download package includes a sample NAnt file. Check it out for a reference

Attachments