Skip to content

Getting started

Julien Gidel edited this page Oct 28, 2021 · 4 revisions

Installation

➡️ Install AutoMate with composer

composer install jugid/auto-mate

➡️ Get a Webdriver

➡️ Selenium Grid

You can use Selenium Grid. See Selenium Grid and Selenium Grid 4 Downloads

If you do it, please send a PR with your example and a quick guide.

Usage

To use AutoMate, you first need to :

  1. Create your yaml configuration file
  2. Create your scenario file with yaml
  3. Create some folders corresponding to the scenario
  4. Maybe create a specification csv file

➡️ Create you yaml configuration file

You can find a detailed configuration file here

➡️ Create your scenario file with yaml

A scenario is a list of steps that have to be executed by AutoMate. You also can declare variables and the browser to use for this specific scenario. You can find an example here

Your scenario needs to be named main.yaml and saved in scenario_folder/scenario_name/

➡️ Create some folders corresponding to the scenario

Now you have to create some folders corresponding to the scenario you just created.

  • logs_folder/scenario_name/ : to log the results in details
  • specs_folder/scenario_name/ : to load data in the scenario specification variables scope

➡️ Create your specification file

Specification are csv files that provide data to AutoMate. It will execute the scenario for each lines and load data inside the spec variables scope.

Your specification files need to be saved in specs_folder/scenario_name/my_spec.csv.

Your specification needs to have a header. Otherwise, your variables name will be the data at first line.

You can create the number of specification you want. If AutoMate does not run in Test mode, the spec is renamed with the suffix _PROCESSED when the scenario run ends. The specification cannot be detected if it has _PROCESSED in its name.

➡️ Run AutoMate

To run AutoMate, you can use the CLI launcher defined as :

php bin/automate --scenario=scenario --config=/../config.yaml [--browser=NAME] [--headless] [--server=HTTP_ADRESSE] [--testMode] [--specMode]

or in a shorter way :

php bin/automate -s scenario -c /../config.yaml [-b NAME] [-h] [-sv HTTP_ADRESSE] [-t] [-sm]

You can also use the more php way as defined in this example

Clone this wiki locally