RUIN YOUR LIFE using ROBOT FRAMEWORK
Prayoch Rujira
ROBOT FRAMEWORK MEETUP #1 2017
Not right of wrong.
Just consequences.
No ATDD applied
Without ATDD
• Bad relationship in product team
• unreliable test cases
• No shared understanding
• No actual progress
• Bad software design
No source control
Without source control
• No versioning
• No permanent storage
• Risk losing code
Try git
https://try.github.io/
No Continuous
Integration
Without CI
• No automatic regression test runner
• Late/Slow feedback
Less maintenance
Without rapid maintenance
• Invite broken windows
• Hard to change
Undescriptive
naming
Without descriptive naming
• Hard to maintain codebase
• Hard to find bugs
• Hard to understand
Naming
• Very important to name well test cases, test suites,
keywords, variables, libraries, resource files, …
• Consistency
• Namespaces
• Name should tell “What” not “How”
from slide http://www.slideshare.net/pekkaklarck/robot-framework-dos-and-donts
Test cases as steps
With test cases as steps
• Invite duplication
• No reusable
Good test case consist of
• Arrange ( Given )
• Action ( When )
• Assert ( Then )
Dependencies
between test cases
With dependencies between
tests
• Hard to maintain
• Hard to fix problem in specific cases
Multiple assertions
With multiple assertions
• Invite fragile test
• Hard to maintain
• Hard to fix problem in specific cases
Overuse
With overusing
• Increase test execution time
• Increase maintenance cost
• Invite fragile test
from https://watirmelon.com/2012/01/31/introducing-the-software-testing-ice-cream-cone/
from https://watirmelon.com/2012/01/31/introducing-the-software-testing-ice-cream-cone/
Testing visual
elements
Examples
• Alignment
• Color
• CSS Attribute
• And more…
With testing visual elements
• Extremely invite fragile test
• Increase unnecessary development cost
from https://enna.com/2015/08/11/robots-coming-future-autonomation/
Jidohka
UX
Behaviour and
behaviour only
No or less using tags
Without tags
• May block development process
• Slow down feedback loop
• Hard to manage
Tags example
• Story ID
• External systems
• Sprint number
• Critical level
• Feature name
• Module name
• Version
• Profile
Hacking
With hacked tests
• Unreliable tests
• Real problem still exist
• Lead to disasters
Bad error message
With bad error messages
• Extremely hard to fix problem
The worst
No automated test
at all
The Boomerang Jobs
Without automated test
• Summon boomerang jobs
• Regression test over and over again
• War room
Recap
• Start with ATDD
• Use source control ( GIT Recommended )
• Use CI
• Fix problems as soon as possible
• Naming with care
• Respect tests as a source code
• Merciless refactoring
• Write the test you want to read
• Focus on behaviour
• Separate human jobs from computer jobs
• Manage with tags
• One better than none!
ของฝากนักกอลฟ์
Respect abstraction level
Slide: Robot framework
dos and don’t
http://www.slideshare.net/pekkaklarck/robot-framework-dos-
and-donts
How to write good test
cases using Robot
Framework
https://github.com/robotframework/
HowToWriteGoodTestCases/blob/master/
HowToWriteGoodTestCases.rst
Robot framework user
guide
http://robotframework.org/robotframework/latest/
RobotFrameworkUserGuide.html
อันนี้ห้ามลืม
somkiat.cc
Questions?
Feedback please.

Ruin your life using robot framework