Scripting

Script Conventions

Public Targets

These targets are part of the public API and can be ;.

Private Targets

Although these targets can be called in some script tools they should not be called by a client directly. To distinguish private targets they begin with a lowercase letter and are camel cased with dot seperating words.

Common Script

The common script has properties and functions that are shared by multiple scripts. One of the primary duties of the common script is to set properties based on the environment the script is running against.

Copy Build Files

The copy build files target will copy files from the project's source directory to the build directory for the project. All files from the bin and Data folder are included in the copy.

Test Build Script

Test Run Script

Project Test Target

Each project that needs testing has a public target (e.g. TestCustomerSite). The project test target calls the project's orchestrator target.

Project Test Orchestrator

The project test orchestrator is a private target that provides no real functionality, but sets up properties for the test run. To run a test the script needs to know:

  • Project Name

  • Project Directory

  • Base URL to Test

  • Test Suite Name

Once the project orchestrator has set these properties it calls the test orchestrator.

Test Orchestrator

The test orchestrator does what its name implies and orchestrates the test run. It calls a set of private targets in a specific order to run the test. This target is specific to the test runner tool used to run tests. So, if we have NUnit on some tests and Tarsvin on others, there will be a test orchestrator to run both types of tests.

Pre Test

Configure Application

The configure application target transforms the application's configuration for the current test's context.

  • Browser Plugin Path

  • Test Data Path

  • Database Connection Strings

Configure Test

The configure test target transforms the test suite configuration file.

  • Base URL

  • Environment Name

  • Browser Name

  • Database Connectin Strings

Copy Test Files

The copy test files uses the common script's copy test files to the location the tests will run.

Run Test

The run test target

Post Test

Last updated