Skip to content

Launcher

Julien Gidel edited this page Jun 4, 2021 · 1 revision

AutoMate Launcher

You can use the launcher as in functional tests here

Create the launcher

To create the launcher, just instantiate it and add the scenarios you want to run :

$launcher = new Launcher($configFile);
$launcher->add('tables')
         ->add('alert')
         ->add('frame')
         ->add('delayed-element')
         ->add('slow-loading')
         ->add('form')
         ->add('general')
         ->add('real')
         ->add('set');

Run the launcher

You can now run the launcher by using the run() function :

$launcher->run();

Print reports

You now have two options : print the report on console or print the report in file.

To print the report on console, just use the printReport() function :

$launcher->printReport();

To print the report in a file, use the function printReportInFile(string $file) function :

$reportFile = __DIR__ . '/reports/report_' . (new DateTime())->format('dmY_His') . '.txt';
$launcher->printReportInfile($reportFile);

You need to create the directory before using this function. AutoMate will not create it for you nor return a specific Exception.

Clone this wiki locally