ruby_raider

This gem has everything you need to start working with test automation


License
MIT
Install
gem install ruby_raider -v 0.4.8

Documentation

Ruby Raider

Gem Version Tests Reek Rubocop Gitter


Logo

Ruby Raider

This is a gem to make setup and start of UI automation projects easier.
Explore the docs »

Rubygems · Report Bug · Request Feature

For more information and updates on releases, see https://ruby-raider.com

What is Ruby Raider?

Ruby Raider is a generator and scaffolding gem to make UI test automation easier

At the moment Ruby Raider supports generating the following frameworks:

Web Testing Framework Visual Testing Framework Mobile Testing Framework
Cucumber and Selenium Cucumber, Applitools and Selenium Cucumber and Appium for IOS
Rspec and Selenium Rspec, Applitools and Selenium Rspec and Appium for IOS
Cucumber and Watir Cucumber and Appium for Android
Rspec and Watir Rspec and Appium for Android
Cucumber and Appium Cross-platform
Rspec and Appium Cross-platform
Cucumber and Sparkling Watir for IOS
Rspec and Sparkling Watir for IOS

In order to run the Appium tests, download the example app. Remember to use the full path of the app that you download in the capabilities file and start the server using one of the commands below:

raider u start_appium
appium  --base-path /wd/hub  

In order to run the visual tests with applitools, you need to create an account and get your api key, you can read more here .

To use the open ai integration you need to set up the OPENAI_ACCESS_TOKEN environment variable and you can also set the optional OPENAI_ORGANIZATION_ID if you have an organization

This works in all the platforms (Tested on Mac OS, Linux and Windows).

Getting started

To get the project up and running.

Just do:

gem install ruby_raider

Then do:

raider new [name_of_project]

Then a TUI/CLI will appear where the configuration of which frameworks you want to be generated/scaffolded can be selected.

Select the ones you will like to work with.

Ruby raider provides the following list of basic commands

Anything between square brackets([...]) is where your imput goes
Commands:
  raider generate # Provides access to all the generators commands
  raider help [COMMAND] # Describe available commands or one specific command
  raider new [PROJECT_NAME] # Creates a new framework based on settings picked
  raider open_ai # Provides access to all the open ai commands
  raider utility # Provides access to all the utility commands 
  raider version # It shows the version of Ruby Raider you are currently using

All the basic commands have their corresponding shortcut:

  • g for generate
  • n for new
  • o for open_ai
  • u for utility
  • v for version

Appium Server Command

To initialise Appium server run this command:

raider u start_appium

Open AI Commands

# Will print the result of the request on the terminal
raider o make [REQUEST]
# Will create a file with the result of your request as content
raider o make [REQUEST] - -path or -p [PATH]
# Will input the content of the chosen file into open ai and will edit it based on the result
raider o make [PATH_NAME] - -edit or -e [FILE_PATH]
# Creates a cucumber file and uses it to input into open ai and create a steps file
# The prompt is required
raider o cucumber [NAME] - -prompt or -p [PROMPT]
# Creates a cucumber step definitions file based on an scenario file
raider open_ai steps [NAME]
Options : 
  -p, [--path = PATH] # The path where your steps will be created
  -pr, [--prompt = PROMPT] # This will create the selected steps based on your prompt using open ai
  -i, [--input = INPUT] # It uses a file as input to create the steps