Skip to content

Generators

natalia-ss edited this page Jan 24, 2024 · 2 revisions

Thor

All generators are built with Thor, a Ruby library, that provides a simple and efficient way to build command-line interfaces (CLIs). Read more about it: Thor.

Generators

Automation generator

Generates automation files, pages, components and data models.

Cucumber generator

Generates Cucumber-related files and directory structures, including test automation files.

RSpec generator

Generates RSpec-related files and directory structures, including test automation files.

Helper generator

Generates helpers files for various testing aspects:

  • Allure Helper - provides information about tests - execution details and screenshots that are kept in allure-results folder,
  • Appium Helper - executes test for mobile applications running on Android or iOS,
  • Browser Helper - manages and configures a Watir browser for web automation,
  • Driver Helper - initializes and configures the application or web browser driver,
  • Spec Helper - configures RSpec,
  • Visual Helper - configures AppliTools Visual Testing,
  • Visual Spec Helper - configures necessary helpers to set up the environment for visual testing with Applitools Eyes.

Actions generator

Generates Github Actions Workflow that automates the process of running tests (either Cucumber or RSpec), generating an Allure report, and deploying the report to GitHub Pages. Triggered manually - to run workflow go to Actions in your repository and run workflow.

New generators

If you want to create a new custom generator, inherit the properties and behaviour from a generator.rb file.

If you want to use the created generator, add it to the generators array in an invoke_generators.rb file.