Share
Embed
Transcript
21 slides
-
Agenda • Mobile testing @XING • Short introduction into Cucumber
• Cucumber guidelines • How do we measure it? 02.08.2018 Elena Ivan -
Once upon a time… • One big mobile development team
XING APP 02.08.2018 Elena Ivan -
Startpage Unleashing… the beast Platform Events Contacts News Groups Mobile
Releases Team XING APP Etc. 02.08.2018 Elena Ivan -
• 2 weeks release cycle • each team responsible for
its codebase and its automated tests • each team needs to adhere to standards and guidelines from the community • release train testing every Monday • automated tests are integrated into the PR (unit, snapshot and functional) -
Automated functional tests • Calabash • automated acceptance testing framework
for iOS and Android • Cucumber • tool that enables specifications to be written in natural language and executed • Ruby • programming language 02.08.2018 Elena Ivan -
Cucumber • tool to support Behaviour Driven Development (BDD) •
offers a way to write tests in a natural language, that anybody can understand, regardless of their technical knowledge • language is Gherkin • each test is called Scenario, and the tests are grouped into Features 02.08.2018 Elena Ivan -
Given, When, Then, And Given - prerequisites for the test
When - the action that the user performs Then - the expected outcome And - replacing couple of Given, When and Then in a row 02.08.2018 Elena Ivan -
• everyone was afraid of them (to write them, to
check what is wrong, why they are failing) • not enough knowledge was distributed into the teams • everybody was writing their tests in their own way • we didn't know how to communicate with each other, also remotely • low readability of the tests 02.08.2018 Elena Ivan -
Eat your own cat food • Take a random test
and go through it together • Evaluate it together • End up coming with the guidelines together 02.08.2018 Elena Ivan -
Feature • Name of the file is descriptive • Feature
file contains description • Feature file doesn't contain duplicates or tests that extend each other • Feature doesn't contain commented or unclear steps and tests • Background steps were used where it makes sense Feature: Bookmarking events As an user I want to be able to bookmark the event I am interested in and un-bookmark it if I am no longer interested 02.08.2018 Elena Ivan -
Test (scenario) • Every test covers only one functionality •
Test is as short as possible • Test is readable (even for an external reviewer) • Test has a clear outcome (assertion in the end of the test) • Given/When/Then/And order is correct 02.08.2018 Elena Ivan -
• Test data created on the fly using API calls
when possible and makes sense • Test doesn't contain redundant steps (Then I am on … screen…) • No dependencies between tests • Single test run should be between 60-90 seconds 02.08.2018 Elena Ivan -
Use tags • split the tests in a logical manner
• run each test individually @team @feature_name @feature_name_number 02.08.2018 Elena Ivan Split features in separate files -
How can you measure it? • Execution time on Jenkins
• Execution time in the generated Cucumber report • Cucumber score (run ruby ../../cuke_sniffer.rb in the tests folder, and check html cuke_sniffer_result.html ) 02.08.2018 Elena Ivan -
Thank you! • Agile Tester • iOS Developer • Java
Software Developer And, we’re hiring :D 02.08.2018 Elena Ivan