Freshen your test cases Kausikram Krishnasayee
What are we going to do ● Introduce BDD ● Introduce BDD in Python ● Understand Freshen ● Get our hands dirty with Freshen ● Write Selenium tests in Freshen
What is B.D.D? BDD is a second-generation, outside-in, pull- based, multiple-stakeholder, multiple-scale, high- automation, agile methodology. It describes a cycle of interactions with well-defined outputs, resulting in the delivery of working, tested software that matters.
What is BDD? ● An extension to T.D.D ● In which test cases are written in natural language ● With terms specific to the domain of development ● So that the developers and everyone else get a holistic idea of things.
So Why Should I care about it ?
Reason 1: Your CIO decided a change in platforms.
Reason 2: Your manager understands it.
Reason 3: Your Co Programmer understands it.
Reason 4: It makes maintenance of test cases easier and event driven the way acceptance tests ought to be.
Python BDD Frameworks ● Freshen ● Lettuce ● Pyccuracy ● Pyhistorian ● PyCukes
Freshen ● It is a BDD Frame work ● It is a nose Plugin ● It is open enough to play around with ● It is flexible enough to play around with.
Parts of a Freshen Test ●.feature File – Containing the test case ● step.py File – Defining steps involved in the test.
The Feature File ● Feature Part: Defines the feature going to be tested. ● Scenario: Defines each and every test case scenario.
Action: Lets write code!!
DRY: the Before and the Background
The context variables ● glc – Global Scope ● ftc – Feature Level Scope ● scc – Scenario Level Scope
Step Argument Transforms
Best of both worlds Selenium + Freshen
Thank you!!!