02 - Automation Project

In order to create and maintain your Squash TA test cases, you need several tools. In order to simplify the installation process, we have bundled these tools into the Squash TA Toolbox. The installation of the Squash TA Toolbox is described here.

In order to execute your test cases, you need the Squash TA framework, which is NOT part of the toolbox. No need to install it though, it will be automatically downloaded and installed the first time you will try to run a Squash TA test (the Squash TA framework is integrated as a maven plugin, as we will see later on).

Squash-TA Automated Project Structure

A Squash-TA automated project must have the following structure: (This structure is specific to Squash-TA)

It's a maven Project.
The root of the Squash TA files is the 'src/squashTA' directory. It is subdivided in 5 subdirectories :
  • The 'tests' directory contains Squash TA test scripts.(Files'.ta')
  • The 'targets' directory contains configuration files to define the tested systems.(Files '.properties')
  • The 'shortcuts' directory is used to define macros.(Files '.macro')
  • The 'resources' directory contains all resources used by test scripts (test data, third party tools, configuration files, ...)
  • The 'repositories' directory contains definitions of the resources library of the automated project.(Files '.properties')

The file 'pom.xml' (Project Object Model) is the configuration file of the Maven Project.

Squash-TA Test Case

In a Squash-TA automated project, all tests cases must be in the 'tests' directory of the project (or in a subdirectory of this directory). A test case is described within a file named TA script. The extension of the file to use is '.ta' and a TA script representing a test case. The scripts 'setup.ta' and 'teardown.ta' are reserved for the ecosystem setup and teardown phases (See below).

A test case can contain 3 phases:

  • A setup phase (Optional): Used to initiate the test case and to be sure that all necessary conditions to execute the test are gathered.
  • A test phase (mandatory): It contains the different test steps of the test case.
  • A teardown phase (Optional): Generally used to clean-up the actions of the test case and so to prepare the environement for the next test case.

Squash-TA Ecosystem

Let's introduce the ecosystem notion in Squash-TA. An ecosystem is a suite of test cases which have in common a setup phase and a teardown phase. It permits to prepare the environement for a specific bunch of test cases and doing so for as many ecosystems you need.

The 'tests' directory of a Squash-TA automated project and its subdirectories correspond each one to an ecosystem as soon as they contain test cases.

The name of the ecosystem (Such as it will appear in the execution reports) is determined by the name of the directory which contains it.

The ecosystem directory contains:

  • A setup.ta file (Optional): It permits to prepare the environement for the bunch of tests cases included in the ecosystem.
  • From 1 to n test files (<test_name>.ta). Each file corresponding to one test case.
  • A teardown.ta file (Optional): It permits to clean-up the environement after the execution of all test cases included in the ecosystem.

An ecosystem execution takes place in 3 ordered steps (Independant of the order in the directory):

  1. A setup phase where the TA script setup.ta is executed (if present). This phase is executed only one time.
  2. A test cases execution phase during which each test case is executed one after the other.
  3. A teardown phase where the TA script teardown.ta is executed (if present). This phase is executed one time.

Here is an example with 5 different ecosystems in a Squash-TA automated project:

Create a New Project

See the FAQ : 'How to set up a Squash-TA project?'