SlideShare ist ein Scribd-Unternehmen logo
1 von 20
Thucydides
A quick review
Cristian Coțoi
Apr 2013
•Pronunciation
•Introduction
•BDD/TDD/ATDD
•Setting up the project (Maven)
•Writing code (Junit, Jbehave)
•Running tests (Eclipse, Maven)
•Live demo
IN YOUR ZONE
Thucydides
3
•Prounciation
• thUU-sih-dih-dees
•What is Thucydides
• Webdriver
• JBehave/EasyB
IN YOUR ZONE
Behavior Driven Development
4
What is BDD…
Stories & Scenarios
As a [X]
I want [Y]
So that [Z]
IN YOUR ZONE
ATDD vs TDD
5
•Tests are focused on business rule or
behavior.
•Written by the team.
•For the whole team
•They are run frequently by the team.
•New tests fail until story is done. Older
tests should all pass.
•Tests are focused on technical aspects of
the application.
•Written by developers
•...for developers
•They are run frequently by the team.
•All tests pass 100% before commit and
integration.
ATDD TDD
In both cases tests are written before the solution code.
They look similar but are not replacements for each other.
IN YOUR ZONE
BDD Stories & Scenarios
6
Story
• Title: Customer pays bills
through internet banking
• As a customer,
• I want to pay bills through
internet banking,
• So that I don’t have to make a
trip to each supplier.
Scenario 1
• Scenario 1: There is enough
credit
• Given the account is in credit
• And the user is properly
authenticated
• When the customer attempts to
make a payment to a supplier
• And he inputs the correct bill
details
• Then ensure the transaction is
recorded
• And ensure the amount of
money is debited
IN YOUR ZONE
Setting up the project
7
JDK
• At least 5
IDE
• Eclipse
Maven
• Sonatype repository
• mvn archetype:generate
IN YOUR ZONE
Writing stuff
8
Features •@Feature
JBehave
•Stories
•Scenarios
Mid level
•Junit tests
•Mapped to Jbehave lines
Low level
•PageObject
•Every page has a corresponding PageObject class.
•Get & set for the page
•No assertions
•User (steps) class
•Emulates the user.
•Performs assertions
IN YOUR ZONE
Running tests - Eclipse
9
• Extend ThucydidesJUnitStories
• Refine with
• findStoriesIn
• findStoriesCalled
• Run/Debug
IN YOUR ZONE
Running tests - Maven
10
• 1. If the project is clean, first run
• mvn test thucydides:archetype
• Any other normal test run
• mvn integration-test thucydides:archetype
• Only this one will run the tests and generate a report for that
IN YOUR ZONE
Live demo
11
Theory Practice
IN YOUR ZONE
Step 0 – Define feature(s)
12
• Define the feature to be tested, so it will
appear in the reports.
IN YOUR ZONE
Step 1 – Define Story
13
• Create the .story file
• Write the story
• Write scenarios
IN YOUR ZONE
Step 2 – Story Steps
14
• First line matches a step used in the previous tests.
IN YOUR ZONE
Step 2 – Story Steps
15
When
Then
IN YOUR ZONE
Step 3 – Low level – user operations
16
IN YOUR ZONE
Step 3 – Low level – PageObject
17
IN YOUR ZONE
Quiz Time
18
•Get the title of all the posts on page
•Assert all titles contain keyword
•Assert titles not containing keyword are not displayed
IN YOUR ZONE
Solution
19
IN YOUR ZONE
Questions
20
Cristian Coțoi| Senior Tester
thank you

Weitere ähnliche Inhalte

Was ist angesagt?

Unit testing
Unit testingUnit testing
Unit testingBrian Hu
 
Automated Performance Testing
Automated Performance TestingAutomated Performance Testing
Automated Performance TestingLars Thorup
 
Introduction to Automated Testing
Introduction to Automated TestingIntroduction to Automated Testing
Introduction to Automated TestingLars Thorup
 
Rspec and Capybara Intro Tutorial at RailsConf 2013
Rspec and Capybara Intro Tutorial at RailsConf 2013Rspec and Capybara Intro Tutorial at RailsConf 2013
Rspec and Capybara Intro Tutorial at RailsConf 2013Brian Sam-Bodden
 
Next generation frontend tooling
Next generation frontend toolingNext generation frontend tooling
Next generation frontend toolingpksjce
 
Cypress vs Selenium WebDriver: Better, Or Just Different? -- by Gil Tayar
Cypress vs Selenium WebDriver: Better, Or Just Different? -- by Gil TayarCypress vs Selenium WebDriver: Better, Or Just Different? -- by Gil Tayar
Cypress vs Selenium WebDriver: Better, Or Just Different? -- by Gil TayarApplitools
 
Testing API's: Tools & Tips & Tricks (Oh My!)
Testing API's: Tools & Tips & Tricks (Oh My!)Testing API's: Tools & Tips & Tricks (Oh My!)
Testing API's: Tools & Tips & Tricks (Oh My!)Ford Prior
 
Walking Skeleton
Walking SkeletonWalking Skeleton
Walking Skeletonhepphep
 
Why you should switch to Cypress for modern web testing?
Why you should switch to Cypress for modern web testing?Why you should switch to Cypress for modern web testing?
Why you should switch to Cypress for modern web testing?Shivam Bharadwaj
 
Unit Testing in JavaScript
Unit Testing in JavaScriptUnit Testing in JavaScript
Unit Testing in JavaScriptRob Scaduto
 
Making cross browser tests beautiful
Making cross browser tests beautifulMaking cross browser tests beautiful
Making cross browser tests beautifulMeaghan Lewis
 
WTF TDD?
WTF TDD?WTF TDD?
WTF TDD?jeremyw
 
Selenium Testing on Chrome - Google DevFest Armenia 2015
Selenium Testing on Chrome - Google DevFest Armenia 2015Selenium Testing on Chrome - Google DevFest Armenia 2015
Selenium Testing on Chrome - Google DevFest Armenia 2015Sargis Sargsyan
 
AgileDC15 I'm Using Chef So I'm DevOps Right?
AgileDC15 I'm Using Chef So I'm DevOps Right?AgileDC15 I'm Using Chef So I'm DevOps Right?
AgileDC15 I'm Using Chef So I'm DevOps Right?Rob Brown
 
Setting Up CircleCI Workflows for Your Salesforce Apps
Setting Up CircleCI Workflows for Your Salesforce AppsSetting Up CircleCI Workflows for Your Salesforce Apps
Setting Up CircleCI Workflows for Your Salesforce AppsDaniel Stange
 

Was ist angesagt? (20)

Unit testing
Unit testingUnit testing
Unit testing
 
Protractor training
Protractor trainingProtractor training
Protractor training
 
Automated Performance Testing
Automated Performance TestingAutomated Performance Testing
Automated Performance Testing
 
Just start coding
Just start codingJust start coding
Just start coding
 
Introduction to Automated Testing
Introduction to Automated TestingIntroduction to Automated Testing
Introduction to Automated Testing
 
Rspec and Capybara Intro Tutorial at RailsConf 2013
Rspec and Capybara Intro Tutorial at RailsConf 2013Rspec and Capybara Intro Tutorial at RailsConf 2013
Rspec and Capybara Intro Tutorial at RailsConf 2013
 
Next generation frontend tooling
Next generation frontend toolingNext generation frontend tooling
Next generation frontend tooling
 
Cypress vs Selenium WebDriver: Better, Or Just Different? -- by Gil Tayar
Cypress vs Selenium WebDriver: Better, Or Just Different? -- by Gil TayarCypress vs Selenium WebDriver: Better, Or Just Different? -- by Gil Tayar
Cypress vs Selenium WebDriver: Better, Or Just Different? -- by Gil Tayar
 
Testing API's: Tools & Tips & Tricks (Oh My!)
Testing API's: Tools & Tips & Tricks (Oh My!)Testing API's: Tools & Tips & Tricks (Oh My!)
Testing API's: Tools & Tips & Tricks (Oh My!)
 
Walking Skeleton
Walking SkeletonWalking Skeleton
Walking Skeleton
 
Why you should switch to Cypress for modern web testing?
Why you should switch to Cypress for modern web testing?Why you should switch to Cypress for modern web testing?
Why you should switch to Cypress for modern web testing?
 
Protractor survival guide
Protractor survival guideProtractor survival guide
Protractor survival guide
 
Can you TDD Rails?
Can you TDD Rails?Can you TDD Rails?
Can you TDD Rails?
 
Unit Testing in JavaScript
Unit Testing in JavaScriptUnit Testing in JavaScript
Unit Testing in JavaScript
 
Making cross browser tests beautiful
Making cross browser tests beautifulMaking cross browser tests beautiful
Making cross browser tests beautiful
 
WTF TDD?
WTF TDD?WTF TDD?
WTF TDD?
 
Selenium Testing on Chrome - Google DevFest Armenia 2015
Selenium Testing on Chrome - Google DevFest Armenia 2015Selenium Testing on Chrome - Google DevFest Armenia 2015
Selenium Testing on Chrome - Google DevFest Armenia 2015
 
AgileDC15 I'm Using Chef So I'm DevOps Right?
AgileDC15 I'm Using Chef So I'm DevOps Right?AgileDC15 I'm Using Chef So I'm DevOps Right?
AgileDC15 I'm Using Chef So I'm DevOps Right?
 
Setting Up CircleCI Workflows for Your Salesforce Apps
Setting Up CircleCI Workflows for Your Salesforce AppsSetting Up CircleCI Workflows for Your Salesforce Apps
Setting Up CircleCI Workflows for Your Salesforce Apps
 
Robot framework and selenium2 library
Robot framework and selenium2 libraryRobot framework and selenium2 library
Robot framework and selenium2 library
 

Ähnlich wie Thucydides - a brief review

TDD done right - tests immutable to refactor
TDD done right - tests immutable to refactorTDD done right - tests immutable to refactor
TDD done right - tests immutable to refactorGrzegorz Miejski
 
Testing on Android
Testing on AndroidTesting on Android
Testing on AndroidAri Lacenski
 
Java 201 Intro to Test Driven Development in Java
Java 201   Intro to Test Driven Development in JavaJava 201   Intro to Test Driven Development in Java
Java 201 Intro to Test Driven Development in Javaagorolabs
 
Angular 2 overview
Angular 2 overviewAngular 2 overview
Angular 2 overviewJesse Warden
 
Test Driven Development using QUnit
Test Driven Development using QUnitTest Driven Development using QUnit
Test Driven Development using QUnitsatejsahu
 
Test driven development v1.0
Test driven development v1.0Test driven development v1.0
Test driven development v1.0Ganesh Kondal
 
Test Driven Design by Jonas Auken
Test Driven Design by Jonas AukenTest Driven Design by Jonas Auken
Test Driven Design by Jonas Aukenagilencr
 
Enterprise Strength Mobile JavaScript
Enterprise Strength Mobile JavaScriptEnterprise Strength Mobile JavaScript
Enterprise Strength Mobile JavaScriptTroy Miles
 
Quick start with AngularJS
Quick start with AngularJSQuick start with AngularJS
Quick start with AngularJSIuliia Baranova
 
MyHeritage - End 2 End testing Infra
MyHeritage - End 2 End testing InfraMyHeritage - End 2 End testing Infra
MyHeritage - End 2 End testing InfraMatanGoren
 
Getting your mobile test automation process in place - using Cucumber and Cal...
Getting your mobile test automation process in place - using Cucumber and Cal...Getting your mobile test automation process in place - using Cucumber and Cal...
Getting your mobile test automation process in place - using Cucumber and Cal...Niels Frydenholm
 
Introduction to Test Driven Development
Introduction to Test Driven DevelopmentIntroduction to Test Driven Development
Introduction to Test Driven DevelopmentSarah Dutkiewicz
 
TDD - Seriously, try it! (updated '22)
TDD - Seriously, try it! (updated '22)TDD - Seriously, try it! (updated '22)
TDD - Seriously, try it! (updated '22)Nacho Cougil
 
Jest: Frontend Testing richtig gemacht @WebworkerNRW
Jest: Frontend Testing richtig gemacht @WebworkerNRWJest: Frontend Testing richtig gemacht @WebworkerNRW
Jest: Frontend Testing richtig gemacht @WebworkerNRWHolger Grosse-Plankermann
 
A la découverte des google/test (aka gtest)
A la découverte des google/test (aka gtest)A la découverte des google/test (aka gtest)
A la découverte des google/test (aka gtest)Thierry Gayet
 
Developers Testing - Girl Code at bloomon
Developers Testing - Girl Code at bloomonDevelopers Testing - Girl Code at bloomon
Developers Testing - Girl Code at bloomonIneke Scheffers
 
Devconf 2011 - PHP - How Yii framework is developed
Devconf 2011 - PHP - How Yii framework is developedDevconf 2011 - PHP - How Yii framework is developed
Devconf 2011 - PHP - How Yii framework is developedAlexander Makarov
 

Ähnlich wie Thucydides - a brief review (20)

TDD done right - tests immutable to refactor
TDD done right - tests immutable to refactorTDD done right - tests immutable to refactor
TDD done right - tests immutable to refactor
 
Testing on Android
Testing on AndroidTesting on Android
Testing on Android
 
Java 201 Intro to Test Driven Development in Java
Java 201   Intro to Test Driven Development in JavaJava 201   Intro to Test Driven Development in Java
Java 201 Intro to Test Driven Development in Java
 
Angular 2 overview
Angular 2 overviewAngular 2 overview
Angular 2 overview
 
Test Driven Development using QUnit
Test Driven Development using QUnitTest Driven Development using QUnit
Test Driven Development using QUnit
 
Test driven development v1.0
Test driven development v1.0Test driven development v1.0
Test driven development v1.0
 
Test Driven Design by Jonas Auken
Test Driven Design by Jonas AukenTest Driven Design by Jonas Auken
Test Driven Design by Jonas Auken
 
Enterprise Strength Mobile JavaScript
Enterprise Strength Mobile JavaScriptEnterprise Strength Mobile JavaScript
Enterprise Strength Mobile JavaScript
 
Quick start with AngularJS
Quick start with AngularJSQuick start with AngularJS
Quick start with AngularJS
 
MyHeritage - End 2 End testing Infra
MyHeritage - End 2 End testing InfraMyHeritage - End 2 End testing Infra
MyHeritage - End 2 End testing Infra
 
Getting your mobile test automation process in place - using Cucumber and Cal...
Getting your mobile test automation process in place - using Cucumber and Cal...Getting your mobile test automation process in place - using Cucumber and Cal...
Getting your mobile test automation process in place - using Cucumber and Cal...
 
CNUG TDD June 2014
CNUG TDD June 2014CNUG TDD June 2014
CNUG TDD June 2014
 
Building XWiki
Building XWikiBuilding XWiki
Building XWiki
 
Kku2011
Kku2011Kku2011
Kku2011
 
Introduction to Test Driven Development
Introduction to Test Driven DevelopmentIntroduction to Test Driven Development
Introduction to Test Driven Development
 
TDD - Seriously, try it! (updated '22)
TDD - Seriously, try it! (updated '22)TDD - Seriously, try it! (updated '22)
TDD - Seriously, try it! (updated '22)
 
Jest: Frontend Testing richtig gemacht @WebworkerNRW
Jest: Frontend Testing richtig gemacht @WebworkerNRWJest: Frontend Testing richtig gemacht @WebworkerNRW
Jest: Frontend Testing richtig gemacht @WebworkerNRW
 
A la découverte des google/test (aka gtest)
A la découverte des google/test (aka gtest)A la découverte des google/test (aka gtest)
A la découverte des google/test (aka gtest)
 
Developers Testing - Girl Code at bloomon
Developers Testing - Girl Code at bloomonDevelopers Testing - Girl Code at bloomon
Developers Testing - Girl Code at bloomon
 
Devconf 2011 - PHP - How Yii framework is developed
Devconf 2011 - PHP - How Yii framework is developedDevconf 2011 - PHP - How Yii framework is developed
Devconf 2011 - PHP - How Yii framework is developed
 

Kürzlich hochgeladen

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 

Kürzlich hochgeladen (20)

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 

Thucydides - a brief review

  • 2. •Pronunciation •Introduction •BDD/TDD/ATDD •Setting up the project (Maven) •Writing code (Junit, Jbehave) •Running tests (Eclipse, Maven) •Live demo
  • 3. IN YOUR ZONE Thucydides 3 •Prounciation • thUU-sih-dih-dees •What is Thucydides • Webdriver • JBehave/EasyB
  • 4. IN YOUR ZONE Behavior Driven Development 4 What is BDD… Stories & Scenarios As a [X] I want [Y] So that [Z]
  • 5. IN YOUR ZONE ATDD vs TDD 5 •Tests are focused on business rule or behavior. •Written by the team. •For the whole team •They are run frequently by the team. •New tests fail until story is done. Older tests should all pass. •Tests are focused on technical aspects of the application. •Written by developers •...for developers •They are run frequently by the team. •All tests pass 100% before commit and integration. ATDD TDD In both cases tests are written before the solution code. They look similar but are not replacements for each other.
  • 6. IN YOUR ZONE BDD Stories & Scenarios 6 Story • Title: Customer pays bills through internet banking • As a customer, • I want to pay bills through internet banking, • So that I don’t have to make a trip to each supplier. Scenario 1 • Scenario 1: There is enough credit • Given the account is in credit • And the user is properly authenticated • When the customer attempts to make a payment to a supplier • And he inputs the correct bill details • Then ensure the transaction is recorded • And ensure the amount of money is debited
  • 7. IN YOUR ZONE Setting up the project 7 JDK • At least 5 IDE • Eclipse Maven • Sonatype repository • mvn archetype:generate
  • 8. IN YOUR ZONE Writing stuff 8 Features •@Feature JBehave •Stories •Scenarios Mid level •Junit tests •Mapped to Jbehave lines Low level •PageObject •Every page has a corresponding PageObject class. •Get & set for the page •No assertions •User (steps) class •Emulates the user. •Performs assertions
  • 9. IN YOUR ZONE Running tests - Eclipse 9 • Extend ThucydidesJUnitStories • Refine with • findStoriesIn • findStoriesCalled • Run/Debug
  • 10. IN YOUR ZONE Running tests - Maven 10 • 1. If the project is clean, first run • mvn test thucydides:archetype • Any other normal test run • mvn integration-test thucydides:archetype • Only this one will run the tests and generate a report for that
  • 11. IN YOUR ZONE Live demo 11 Theory Practice
  • 12. IN YOUR ZONE Step 0 – Define feature(s) 12 • Define the feature to be tested, so it will appear in the reports.
  • 13. IN YOUR ZONE Step 1 – Define Story 13 • Create the .story file • Write the story • Write scenarios
  • 14. IN YOUR ZONE Step 2 – Story Steps 14 • First line matches a step used in the previous tests.
  • 15. IN YOUR ZONE Step 2 – Story Steps 15 When Then
  • 16. IN YOUR ZONE Step 3 – Low level – user operations 16
  • 17. IN YOUR ZONE Step 3 – Low level – PageObject 17
  • 18. IN YOUR ZONE Quiz Time 18 •Get the title of all the posts on page •Assert all titles contain keyword •Assert titles not containing keyword are not displayed
  • 20. IN YOUR ZONE Questions 20 Cristian Coțoi| Senior Tester thank you

Hinweis der Redaktion

  1. HelloDisclaimer
  2. Summary
  3. Thucydides is a tool that lets you use WebDriver-based unit or BDD tests to write more flexible and more reusable WebDriver-based tests, and also to generate documentation about your acceptance tests, including a narrative description of test, along with the corresponding screen shots, and also high-level summaries and aggregations of the test results.Jbehave & Easybsunt 2 formate de scriere a story-urilor agile, cel din urmă fiind bazat pe groovy.Am lucrat cuacest framework pentru câtevasăpt și am căutat inițial funcționalități pentru testarea cross-browser-testing.
  4. BDD a evoluat din practicile agile și a fost conceput pentru a le face mai accesibile și eficiente pentru echipele de dezvoltare.Principalul beneficiu este capacitatea de a scrie testele într-un limbaj accesibil tuturor membrilor echipei.X reprezintă o persoană, Y reprezintă o funcționalitate iar Z reprezintă un beneficiu obținut prin implementarea funcționalității. Această abordare are capacitatea de a defini valoarea unei funcționalități încă înainte de a fi implementată. Dacă nu este astfel definită atunci există riscul de a implementa o funcționalitate de tipul „pentru-că-așa-vrea-clientul”. Aici este momentul în care unele cerințe „mistice” sunt filtrate corespunzător.Momentan există 2 abordări care sunt o „implementare” a BDD: ATDD & TDD.
  5. Ca un studiu de cazam avea un story pentru achitarea facturilor prin internet banking.Iar un scenariu `happy flow` ar fi…
  6. Before attempting to create a new project, you need to update settings.xml and include the Sonatype OSS Maven repository (http://oss.sonatype.org/). Releases can be obtained from the release repository (https://oss.sonatype.org/content/repositories/releases/). Snapshot releases are available on the Sonatype OSS Snapshot repository (https://oss.sonatype.org/content/repositories/snapshot/).
  7. Cum este structurat un proiect:FeaturesAjută în rapoarte prin asocierea testelor cu funcționalitățiledeSunt doar clase goale care reprezintă funcționalitățile aplicațieiJBehaveStoriesScenariosKeyword-urile sunt bazate pe conceptul BDD (Given, When, Then, And etc.)MidlevelJunittests conectate la scenarii folosind anotații (@Given, @When, @Then etc.)Se pot folosi expresii regulate, tabele, data-driven-testsLowlevelPageObjectFicare pagină are User (steps) class
  8. Running tests with maven has the advantage of generating reports.
  9. We will be testing the wordpress application for some basic functionalities.
  10. Motivul pentru care acesta este pas nu pare să fie integrabil cu JBehave, ci doar cu testele story-urile scrise în easyB sau JUnit.