Automation Assist, Part 1: Showcase

Use automated scripts to help your team to deliver a perfect showcase

Practices on preparation

puts("Pause here for 10 seconds ...")
# BA talk about the new option in business type list
sleep 10

Practices on execution

‘Run to line’ in TestWise IDE
Test execution paused on test step line #22
  it "Pause and Continue" do
driver.find_element(:id, "sign-in-btn").click
login_page = LoginPage.new(driver)
login_page.enter_email("driving@biz.com")
# => Right click to run to the next line
login_page.enter_password("test01")
login_page.click_login
# => Press resume to continue: click login
end
Run an individual test case
it "Pause and Continue: show business types" do
business_sign_up_page = BusinessSignUpPage.new(driver)
business_sign_up_page.enter_business_name("Wise Business")
driver.find_element(:xpath, "//select[@id='biztype']/..").click
puts("Pause ~ 10 seconds for BA to explain")
sleep 5
4.times do
driver.find_element(:xpath,
"//select[@id='biztype']/../ul").send_keys(:down)
sleep 0.8
end
driver.find_element(:xpath,
"//select[@id='biztype']/../ul").send_keys(:up)
sleep 1
driver.find_element(:xpath,
"//select[@id='business_type']/../ul/li/span[text()='" +
"Yoga" + "']").click
end
sidekicks
+- login_spec.rb
+- create_application_spec.rb
+- find_application_spec.rb
+- create_user_spec.rb
it "login as registered user" do
# ...
end
it "login as admin user" do
# ...
end

Award-winning software developer, test automation & CT coach, author, and speaker. Help teams succeed with Agile/DevOps by implementing real Continuous Testing.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store