Skip to content

Using BDD and Cucumber in Squash - Project setup

Setup

Annita
Squash TM administrator
Pravash
Product owner
Fabrice
Functional tester
Antonine
Automatician
Set up Squash TM
Write requirements
Write test cases
Transmit test cases
Get test cases
Automate test cases
Deliver automated test cases
Indicate automation is performed
Run automated tests

Declaration of the public URL

In order to enable the communication between Squash TM and Squash Orchestrator, the public URL of the Squash TM instance must be declared.
Annita defines the public URL as described in Squash TM documentation.

Squash TM public URL

Creation of the project in Squash TM

Annita creates the project as described in the Squash TM documentation.
She sets the project as BDD with Cucumber and the automation workflow as managed by Squash TM:

Squash TM project setup

Declaration of the Squash Orchestrator in Squash TM

A Squash Orchestrator has been deployed as described in that page.
Annita declares it in Squash TM as described in the Squash TM documentation so it is available to execute tests from Squash TM. Squash TM project setup

Then, she associates it to the project:

Squash TM project setup

Creation of the Git repository (for the automated tests)

In order to be able to finish the configuration of the project, Annita needs the Git repository information. So she asks Antonine to create the repository and, in it, the directory into which Squash TM will push the automated test cases.

Overview of the involved Git repositories

The remote repository is stored in the cloud. It is the reference.

Squash TM uses a local repository (on the host server) to generate automated scripts before pushing them into the remote repository.
🛑 Nobody must interact with this local repository, it is intended to be used only by Squash TM.

Antonine uses a local repository on her PC. She retrieves the scripts generated by Squash TM by performing a git pull and pushes her automation code with a git push. Squash TM public URL

Antonine creates, on her PC, a local Git repository with the adequate directory structure:

mkdir prestashop
cd prestashop
mkdir -p src/test/resources/prestashoptest
touch src/test/resources/prestashoptest/.gitkeep
git init
git add .
git commit -m "project setup"

Then, she creates an empty remote repository in the cloud (it could be in GitLab, GitHub, Bitbucket…, in this case it is https://gitlab.com/antonine/prestashoptest), and pushes her local repository into it:

git remote add origin https://gitlab.com/antonine/prestashoptest
git push --set-upstream origin master

At last, she indicates to Annita the URL of the remote repository is https://gitlab.com/antonine/prestashoptest and that the generated script files (i.e. the feature files) should be placed in the src/test/resources/prestashoptest directory.

Declaration of the Git repository in Squash TM

Annita declares

  • the remote repository
  • the local Squash TM repository

as described in the Squash TM documentation:

Git repo setup

Then, Annita associates the repository to the project:

Squash TM project setup