Introduction to web testing with Cucumber using spriteCloud's Lapis Lazuli Cucumber helper.
This presentation will take you through the steps needed to set up a test automation project using Cucumber - a software tool that runs automated tests in the BBD style - in combination with Lapis Lazuli, a gem that provides Cucumber helper functions and scaffolding for easier web test automation suite development.
To do this you will need to have installed Ruby with some drivers and libraries. You can find detailed notes on how to do this here: http://www.testautomation.info/Getting_Started
To successfully follow this tutorial, prior knowledge of test automation isn’t needed, but knowledge of scripting - especially Ruby - and HTML skills are recommended.
Lapus Lazuli's GitHub depository: https://github.com/spriteCloud/lapis-lazuli
For more information about everything test automation, whether you need someone to help you set up TA in your organisation or want to find out more about our Test Automation as a Service options, email: info@spritecloud.com.
For colourblind Gijs:
Blue : Class/Modules
Dark Blue : Variables
Green : Hardcoded values
Red : Highlighting
Orange : CMD
Light Grey : Comment
Very Light Grey : Brackets that can be removed
Dark Grey : Output
Brownish : Functions
Black : Other Syntax
Red highlight: .goto
Red highlight: .find, .find_all
Red highlight: .find, .find_all
Red highlight: Error in find, URL
Red highlight: Custom error message “Could not find doesnotexist”
Dark Green : Gherkin
Light Green : Cucumber
Blue : Lapis Lazuli
Light Blue : Watir
Very Light Blue: Selenium WebDriver
Red : Ruby
Orange : Calliope
Orange : Feature
Blue : Scenario
Red : Given
Green : When
Purple : Then
Black : And
Orange : Feature
Blue : Scenario
Red : Given
Green : When
Purple : Then
Black : And
Orange : Feature
Blue : Scenario
Dark Blue : Variables
Red : Given
Green : When
Purple : Then
Orange : Feature
Blue : Scenario
Dark Blue : Variables
Red : Given
Green : When
Purple : Then
Blue : config.yml => Lapis Lazuli
Green : example.feature => Gherkin
Light Green : cucumber.yml, *_steps.rb => Cucumber
Red : env.rb => Ruby
Purple : features/ => Most important folder for now
Green : example.feature
Light Green : *.rb
Green : example.feature
Light Green : *.rb
Orange : Line numbers
Editor walkthrough, show every file, explain parts like:
example.feature
what tags are
new features are just plain files in features/ folder
step definitions
difference between interaction and validation steps
interaction_steps.rb
How do the steps work
LL functions: has_env?, env, error, log
validation_steps.rb
browser.wait
config files
difference between configs
config.yml
how do environments work
error strings
cucumber.yml
what are cucumber profiles
env.rb
require statements
World(LapisLazuli)