Presentation is loading. Please wait.

Presentation is loading. Please wait.

TEST AUTOMATION IN BDD WAY

Similar presentations


Presentation on theme: "TEST AUTOMATION IN BDD WAY"— Presentation transcript:

1 TEST AUTOMATION IN BDD WAY
Sushil Tade – Sr. Software Engineer Mahantesh Maganur – Sr. Project Manager Philips Healthcare Philips India ltd. Bangalore

2 BDD Approach for automation testing
Abstract BDD Approach for automation testing Automation testing in an agile way using Behavior Driven Development approach i.e. GWT or Given When Then. The primary purpose is to encourage communication amongst the stakeholders of the project so that the context of each feature is correctly understood by all members of the team (i.e. shared understanding) through ubiquitous language. Developers/Automation engineers write automated tests for each steps called as step definition. The advantage of BDD over Automation script is to reusability of GWT steps, modularity, scaling the feature, use existing steps definition to create new suites.

3 Agenda What is BDD? Writing test using BDD- with example
Components of BDD Structure of feature file What is GWT Single scenario execution flow BDD automation flow in Agile development Advantages Tools and technologies used Success story

4 Image: http://www.jacobsen.no/anders/blog/archives/images/project.html
What is BDD? Behavior Driven Development (BDD) focuses and associates behavioral specifications with each unit of software. Encourages collaboration between Product owner, QA Engineers, Developers and Business Owners through ubiquitous language. Extends TDD by utilizing natural language that non-technical stakeholders can understand Helps in bridge gap between Business & Technical language Image:

5 Traditional Test Case Vs Behavior Driven Development Scenarios (Gherkin)
Steps/Actions Expected Result Open Instant messenger in ABC website Instant messenger is opened Login into ABC website Instant messenger home page is displayed Click on Instant messenger tab Online friends gets displayed Scenario: Verify friends are online in Instant messenger (IM) Given IM is available in ABC website When I log into ABC social website And I open up the IM tab Then I should see my online friends

6 <Preconditions and/or Inputs> When <The action under test>
What is GWT? Given <Preconditions and/or Inputs> When <The action under test> Then <The expected outcome or verification> Scenario: Verify friends are online in Instant messenger (IM) Given IM is available in ABC website When I log into ABC social website And I open up the IM tab Then I should see my online friends

7 GWT Components of BDD Feature Background Scenario After Scenario
Scenario Outline Before Scenario Step Step Definition

8 Structure of Feature File
Scenario Or Scenario outline Scenario Or Scenario outline Step Step Step Definition Step Definition

9 BDD Style: The Step & Step Definition Example (Binding)
is available in ABC website")] public void GivenIMIsAvailableInABCWebsite() { ScenarioContext.Current.Pending(); } Given IM is available in ABC website log into ABC social website")] public void WhenILogIntoABCSocialWebsite() { ScenarioContext.Current.Pending(); } When I log into ABC social website should see my online friends")] public void ThenIShouldSeeMyOnlineFriends() { ScenarioContext.Current.Pending(); } Then I should see my online friends

10 Scenario Execution flow (Single Scenario)

11 Acceptance Criteria -n
BDD automation flow in Agile Development Acceptance Criteria -1 Scenario: Verify friends are online in Instant messenger (IM) Given IM is available in ABC website When I log into ABC social website And I open up the IM tab Then I should see my online friends Common Understanding Tester Common Understanding User Story-X Acceptance Criteria -2 Scenario: Verify friends are online in Instant messenger (IM) Given IM is available in ABC website When I log into ABC social website And I open up the IM tab Then I should see my online friends Developer Business Analyst Common Understanding Acceptance Criteria transforms to Given-When-Then Steps (Gherkin) Acceptance Criteria -n Gherkin tool (Spec flow/cucumber) transforms steps to method stub is available in ABC website")] public void GivenIMIsAvailableInABCWebsite() { ScenarioContext.Current.Pending(); } log into ABC social website")] public void WhenILogIntoABCSocialWebsite() { ScenarioContext.Current.Pending(); }

12 Value add Reusability – using layered framework

13 Value add Structured approach of tagging for consistent information across team members User Story Scenarios Tags @committed @manual @development @complete @script_review 1 Once committed & Approved 2 Sent for scenarios review Ready for review 3 QA decision Automatable ? No Yes @manual @development Scripting Script review 5 Scenarios marked Address comments

14 How BDD supported tool notify change in scenario?
Value add How BDD supported tool notify change in scenario? Scenario: Verify friends are online in Instant messenger (IM) Given IM is available in ABC website When I log into ABC social website And I open up the IM tab Then I should see my online friends Scenario: Verify friends are online in Instant messenger (IM) Given IM is available in ABC website When I log into ABC social website And I open up the IM tab Then I should see my online friends with smiley Original scenario Scenario updated by QA Test failed error occurred in specflow with Pending status

15 Depicts functional behavior "Behavior” is more closer to customer
Advantages of BDD for Automation BDD Common language Depicts functional behavior Easy to track Easy to understand Reusability "Behavior” is more closer to customer Easy to maintain Easy to adopt changes Easy data setup

16 C# as programming language
Tools & Technologies used .NET libraries Appium – Mobile automation Selenium – Web automation Specflow – BDD SpecRun – Report generation C# as programming language

17 Effort Saved due to Automation( Per Execution)
Success Story of a healthcare application automation Effort Saved due to Automation( Per Execution) # Number of Scenarios # Scenarios Automated % Of test Automation Benefits Native 603 444 74% 30 Man Days Web 653 560 85% 25 Man Days

18 References Book BDD in Action By - John Ferguson Smart
Book Cucumber BDD How-to By – Wayne Ye - Cucumber for .NET

19 Author Biography Sushil Tade is a graduate in Computer science and engineering. He has over 4 year of experience in the IT industry. 2.5 year of experience in Software development and 1.5 year of experience in Automation testing. He is currently working as Sr. Software Engineer with the Healthcare group of Philips India Ltd. He is passionate about learning new open source software tools, IOT, Big Data and software development methodologies like Agile. His responsibilities is to write sprint level automation script and execute as part of different build definition. Mahantesh Maganur is a post graduate in computer applications. He has over 15 years of experience in the IT industry, specifically in software testing. He is currently working as Sr. Project Manager with the Healthcare group of Philips India Ltd. He has passion towards ‘test engineering’, and drives various trainings in the organization in that direction. His responsibilities include overall verification and validation activities covering test strategy, planning and execution for a business unit within Philips Healthcare. He is a certified Project Management Professional (PMP), Scrum Master (CSM), SAFe Agilist( SA) and Six Sigma Green Belt. Presented multiple papers in various Software Testing Conferences in the past.

20 Question & Answers

21 Thank You!!!


Download ppt "TEST AUTOMATION IN BDD WAY"

Similar presentations


Ads by Google