<commit_before>Example Workflows
=================

**This documentation file is a work in progress, don't pay too much attention to it :)**

We try our best to make PrestaShopAutomationFramework something that can help you in your day to day PrestaShop projects.

This document describes a few ways to get productive with PrestaShopAutomationFramework.

# Tests First Development

Call it Behaviour Driven Development, Test Driven Development, Acceptance Driven Development... what matters is, when you write tests before writing code:
- you reduce the chances of your code being broken (by yourself, someone else, or yourself in 3 months) by *A LOT*
- you are sure your code does what it was supposed to do
- you are sure **you** know what your code is supposed to do

Not everything requires setting up a functional test, but here's my workflow when I do BDD with PrestaShop.

Assumptions:
- PSTAF is [configured properly](https://github.com/PrestaShop/PrestaShopAutomationFramework/blob/master/README.md)
- I have my development PrestaShop folder installed under `/var/www/PrestaShop`

## Setup PSTAF to work with your current project
If PrestaShop is already installed, making PSTAF aware of your project is really easy:
```bash
cd /var/www/PrestaShop
pstaf project:init<commit_msg>// removed tmp message<commit_after>Example Workflows
=================
We try our best to make PrestaShopAutomationFramework something that can help you in your day to day PrestaShop projects.

This document describes a few ways to get productive with PrestaShopAutomationFramework.

# Tests First Development

Call it Behaviour Driven Development, Test Driven Development, Acceptance Driven Development... what matters is, when you write tests before writing code:
- you reduce the chances of your code being broken (by yourself, someone else, or yourself in 3 months) by *A LOT*
- you are sure your code does what it was supposed to do
- you are sure **you** know what your code is supposed to do

Not everything requires setting up a functional test, but here's my workflow when I do BDD with PrestaShop.

Assumptions:
- PSTAF is [configured properly](https://github.com/PrestaShop/PrestaShopAutomationFramework/blob/master/README.md)
- I have my development PrestaShop folder installed under `/var/www/PrestaShop`

## Setup PSTAF to work with your current project
If PrestaShop is already installed, making PSTAF aware of your project is really easy:
```bash
cd /var/www/PrestaShop
pstaf project:init
{'fraction_non_alphanumeric': 0.06741573033707865, 'fraction_numerical': 0.0008025682182985554, 'mean_word_length': 4.907582938388626, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6845622', 'n_tokens_mistral': 660, 'n_tokens_neox': 642, 'n_words': 337}