SlideShare une entreprise Scribd logo
1  sur  21
Writing Acceptance Tests Using Fitnesse
Facundo Farias

facundo.farias@gmail.com
Agenda

1.
2.
3.
4.
5.
6.

Acceptance Testing
Acceptance Tests
How To: Acceptance tests
FitNesse and RESTful Web Services
Samples
How does Acceptance Test fit in our process?
Acceptance Testing

• Acceptance Testing is a high-level testing procedure
used to verify that a software system behaves as
specified by customer.
• The term Acceptance Testing itself is strongly related to
the agile software development method Extreme
Programming (XP).
Acceptance Tests by definition
• Acceptance tests are created from user stories. During an
iteration the user stories selected during the iteration
planning meeting will be translated into acceptance tests.
The customer specifies scenarios to test when a user story
has been correctly implemented. A story can have one or
many acceptance tests, what ever it takes to ensure the
functionality works.
• Acceptance tests are black box system tests.
• Each acceptance test represents some expected result from
the system.
• A user story is not considered complete until it has passed its
acceptance tests.
• Acceptance tests should be automated so they can be run
often.
Benefits of Acceptance Tests
Some of the benefits using Acceptance Tests:
1. Helps to clarify requirements,
2. Tests are written using customer language,
3. Shows working software in a real environment,
4. Increase communication within the team,
5. Can be considered as an absolute criteria for deciding
when a feature is complete,
6. Eliminates ambiguity from users stories,
7. Can be seen as a partial replacement for
documentation.
Many tools to implement it
•
•
•
•
•
•
•

Fitnesse
Cucumber
Concordion
Selenium
GreenPepper
Jbehave
Others
Which one should I use?
• It depends on:
1. The Programming Language
2. The Development Infrastructure and Tools,
3. The OS
We did a choice: Fitnesse for REST
• After a brief analysis of each tool, and an small PoC, we
found Fitnesse the best tool for our project. Why:
1. The tests are written in a wiki format,
2. The implementation was very easy,
3. We didn’t need to touch anything in our code, since with a single
table we can write complex tests,
4. Fitnesse exposes a REST interface to run the tests in a suite
automatically returning XML results,
5. The received XML can be transformed using an XSLT file to
convert the results to JUnit format, in this way, it will be integrated
to Bamboo,
6. It has a big community in the Open Source world.
FitNesse & RESTful Web Services
•

•

•

•
•
•

One thing that acceptance testing can perform very well is the validation of
RESTful web services, but unfortunately FitNesse does not provide native
support for testing RESTful web services. Fortunately if you search the
Internet you'll quickly find a custom fixture called RestFixture that does most
of what you will need to test your web services. In
short, the RestFixture allows you to execute various HTTP verbs against a
service, passing the appropriate data, and then validate the results.
The RestRixture is an ActionFixture, therefore all
the ActionFixture goodies are available. On top of that it contains the
following 7 methods:
header: to be able to set the headers for the next request (a CRLF
separated list of name:value pairs),
body: to allow request body input, essential for PUT and POST,
let: to allow data from the response headers and body to be extracted and
assigned to a label that can then be passed around.
GET, POST, PUT, DELETE to execute requests.
Getting started with RestFixture
•

Each test is a row on a RestFixture table and it has the following format:

• |VERB|uri|?ret|?headers|?body|
• VERB is one of GET, POST, PUT, DELETE
• uri is the resource URI
• ?ret is the expected return code of the request. it can be expressed as a
regular expression, that is you can write 2dd if you expect any code
between 200 and 299.
• ?headers is the expected list of headers. In fact, the expectation is checked
by verifying that *all* the headers in here are present in the response. Each
header must go in a newline and both name and value can be expressed as
regular expressions to match in order to verify inclusion.
• ?body it's the expected body in the response. This is expressed as a list of
XPath expressions to allow greater flexibility.
GET sample
GET sample result
POST sample
POST sample result
PUT sample
PUT sample result
DELETE sample
DELETE sample result
How are we using it?
• We’ve implemented FitNesse with this specific
RestFixture to validate the our REST interfaces.
• We have a suite for the interfaces already
developed, called Regression. This suite will be
executed as an smoke test after each code
commit, since it tests the sunny day of each API e2e.
• We have another suite, to test the Current sprint. This
should be RED at the very beginning of the sprint, but
should start be GREEN when the sprint is reaching the
end.
• Both test suites can be executed thru a Bamboo Plan.
The first stage (Regression) will run always, and the
second stage (Current) will be optional (we choose
when to run it).
References
•
•
•
•
•
•
•

Acceptance Tests [extremeprogramming.org]
Test Driven .NET Development with FitNesse
Acceptance Testing [University of Helsinki]
FitNesse Web Page
Fit: Framework for Integrated Test
RestFixture: Validation of RESTful Web Services
ResFixture Documentation Tests
Q&A
Thanks!

Contenu connexe

Tendances

DIG1108C Lesson 7 Fall 2014
DIG1108C Lesson 7 Fall 2014DIG1108C Lesson 7 Fall 2014
DIG1108C Lesson 7 Fall 2014David Wolfpaw
 
Introduction to Automation Testing
Introduction to Automation TestingIntroduction to Automation Testing
Introduction to Automation TestingArchana Krushnan
 
#1 unit testing
#1 unit testing#1 unit testing
#1 unit testingeleksdev
 
Keyword-driven Test Automation Framework
Keyword-driven Test Automation FrameworkKeyword-driven Test Automation Framework
Keyword-driven Test Automation FrameworkMikhail Subach
 
Keyword Driven Automation
Keyword Driven AutomationKeyword Driven Automation
Keyword Driven AutomationPankaj Goel
 
RFT Tutorial 4 How Do We Record A Script Using Rational Functional Tester - RFT
RFT Tutorial 4 How Do We Record A Script Using Rational Functional Tester - RFTRFT Tutorial 4 How Do We Record A Script Using Rational Functional Tester - RFT
RFT Tutorial 4 How Do We Record A Script Using Rational Functional Tester - RFTYogindernath Gupta
 
QTP&UFT Automation Framework
QTP&UFT Automation FrameworkQTP&UFT Automation Framework
QTP&UFT Automation FrameworkYu Tao Zhang
 
Full Testing Experience - Visual Studio and TFS 2010
 Full Testing Experience - Visual Studio and TFS 2010 Full Testing Experience - Visual Studio and TFS 2010
Full Testing Experience - Visual Studio and TFS 2010Ed Blankenship
 
Load Testing Using JMeter Tutorial | Edureka
Load Testing Using JMeter Tutorial | EdurekaLoad Testing Using JMeter Tutorial | Edureka
Load Testing Using JMeter Tutorial | EdurekaEdureka!
 
Final Automation Testing
Final Automation TestingFinal Automation Testing
Final Automation Testingpriya_trivedi
 
Test automation
Test automationTest automation
Test automationXavier Yin
 
Functional & Performance Test Automation with CI
Functional & Performance Test Automation with CI Functional & Performance Test Automation with CI
Functional & Performance Test Automation with CI Leonard Fingerman
 
Continuous Integration using Hudson and Fitnesse at Ingenuity Systems (Silico...
Continuous Integration using Hudson and Fitnesse at Ingenuity Systems (Silico...Continuous Integration using Hudson and Fitnesse at Ingenuity Systems (Silico...
Continuous Integration using Hudson and Fitnesse at Ingenuity Systems (Silico...Jen Wong
 
Test-Driven Development with DbFit and Oracle database, BGOUG Conference, 201...
Test-Driven Development with DbFit and Oracle database, BGOUG Conference, 201...Test-Driven Development with DbFit and Oracle database, BGOUG Conference, 201...
Test-Driven Development with DbFit and Oracle database, BGOUG Conference, 201...Yavor Nikolov
 

Tendances (20)

Automation Framework/QTP Framework
Automation Framework/QTP FrameworkAutomation Framework/QTP Framework
Automation Framework/QTP Framework
 
Automation With A Tool Demo
Automation With A Tool DemoAutomation With A Tool Demo
Automation With A Tool Demo
 
DIG1108C Lesson 7 Fall 2014
DIG1108C Lesson 7 Fall 2014DIG1108C Lesson 7 Fall 2014
DIG1108C Lesson 7 Fall 2014
 
Introduction to Automation Testing
Introduction to Automation TestingIntroduction to Automation Testing
Introduction to Automation Testing
 
#1 unit testing
#1 unit testing#1 unit testing
#1 unit testing
 
Keyword-driven Test Automation Framework
Keyword-driven Test Automation FrameworkKeyword-driven Test Automation Framework
Keyword-driven Test Automation Framework
 
Keyword Driven Automation
Keyword Driven AutomationKeyword Driven Automation
Keyword Driven Automation
 
Automation using ibm rft
Automation using ibm rftAutomation using ibm rft
Automation using ibm rft
 
RFT Tutorial 4 How Do We Record A Script Using Rational Functional Tester - RFT
RFT Tutorial 4 How Do We Record A Script Using Rational Functional Tester - RFTRFT Tutorial 4 How Do We Record A Script Using Rational Functional Tester - RFT
RFT Tutorial 4 How Do We Record A Script Using Rational Functional Tester - RFT
 
QTP&UFT Automation Framework
QTP&UFT Automation FrameworkQTP&UFT Automation Framework
QTP&UFT Automation Framework
 
Test cases
Test casesTest cases
Test cases
 
Full Testing Experience - Visual Studio and TFS 2010
 Full Testing Experience - Visual Studio and TFS 2010 Full Testing Experience - Visual Studio and TFS 2010
Full Testing Experience - Visual Studio and TFS 2010
 
Load Testing Using JMeter Tutorial | Edureka
Load Testing Using JMeter Tutorial | EdurekaLoad Testing Using JMeter Tutorial | Edureka
Load Testing Using JMeter Tutorial | Edureka
 
Final Automation Testing
Final Automation TestingFinal Automation Testing
Final Automation Testing
 
Test automation
Test automationTest automation
Test automation
 
Functional & Performance Test Automation with CI
Functional & Performance Test Automation with CI Functional & Performance Test Automation with CI
Functional & Performance Test Automation with CI
 
Continuous Integration using Hudson and Fitnesse at Ingenuity Systems (Silico...
Continuous Integration using Hudson and Fitnesse at Ingenuity Systems (Silico...Continuous Integration using Hudson and Fitnesse at Ingenuity Systems (Silico...
Continuous Integration using Hudson and Fitnesse at Ingenuity Systems (Silico...
 
Rft courseware
Rft coursewareRft courseware
Rft courseware
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Test-Driven Development with DbFit and Oracle database, BGOUG Conference, 201...
Test-Driven Development with DbFit and Oracle database, BGOUG Conference, 201...Test-Driven Development with DbFit and Oracle database, BGOUG Conference, 201...
Test-Driven Development with DbFit and Oracle database, BGOUG Conference, 201...
 

En vedette

Automatic web ui testing
Automatic web ui testingAutomatic web ui testing
Automatic web ui testingAlex van Assem
 
Integration and Acceptance Testing
Integration and Acceptance TestingIntegration and Acceptance Testing
Integration and Acceptance TestingAlan Hecht
 
Moving from Ad Hoc Testing to Continuous Test Data with FitNesse
Moving from Ad Hoc Testing to Continuous Test Data with FitNesseMoving from Ad Hoc Testing to Continuous Test Data with FitNesse
Moving from Ad Hoc Testing to Continuous Test Data with FitNesseJoris Meerts
 
Acceptance test driven development (attd) cycle
Acceptance test driven development (attd) cycleAcceptance test driven development (attd) cycle
Acceptance test driven development (attd) cycleGiuseppe Torchia
 
Some Observations from the Innovation Chasm
Some Observations from the Innovation ChasmSome Observations from the Innovation Chasm
Some Observations from the Innovation ChasmJoris Meerts
 
Intro to jQuery
Intro to jQueryIntro to jQuery
Intro to jQueryAlan Hecht
 
Acceptance Test Driven Development With Spec Flow And Friends
Acceptance Test Driven Development With Spec Flow And FriendsAcceptance Test Driven Development With Spec Flow And Friends
Acceptance Test Driven Development With Spec Flow And FriendsChristopher Bartling
 
Acceptance Test Driven Development at StarWest 2014
Acceptance Test Driven Development at StarWest 2014Acceptance Test Driven Development at StarWest 2014
Acceptance Test Driven Development at StarWest 2014jaredrrichardson
 
TestWorks Conf 2015 Beefing up FitNesse - Arjan Molenaar
TestWorks Conf 2015 Beefing up FitNesse - Arjan MolenaarTestWorks Conf 2015 Beefing up FitNesse - Arjan Molenaar
TestWorks Conf 2015 Beefing up FitNesse - Arjan MolenaarXebia Nederland BV
 
JavaLand: Quantified Social - Fitness-Geräte und -Portale mit Agorava
JavaLand: Quantified Social - Fitness-Geräte und -Portale mit AgoravaJavaLand: Quantified Social - Fitness-Geräte und -Portale mit Agorava
JavaLand: Quantified Social - Fitness-Geräte und -Portale mit AgoravaWerner Keil
 
Methodologies for Test-Driven Development of OSGi enabled Embedded Devices - ...
Methodologies for Test-Driven Development of OSGi enabled Embedded Devices - ...Methodologies for Test-Driven Development of OSGi enabled Embedded Devices - ...
Methodologies for Test-Driven Development of OSGi enabled Embedded Devices - ...mfrancis
 
Fitnesse user acceptance test - Presentation
Fitnesse   user acceptance test - PresentationFitnesse   user acceptance test - Presentation
Fitnesse user acceptance test - PresentationSunil Kumar Gunasekaran
 
Coding Dojo for Testers/Testing Dojo: Designing Test Cases with FitNesse (2014)
Coding Dojo for Testers/Testing Dojo: Designing Test Cases with FitNesse (2014)Coding Dojo for Testers/Testing Dojo: Designing Test Cases with FitNesse (2014)
Coding Dojo for Testers/Testing Dojo: Designing Test Cases with FitNesse (2014)Peter Kofler
 
FitNesse With Scala
FitNesse With ScalaFitNesse With Scala
FitNesse With ScalaKnoldus Inc.
 

En vedette (18)

Automatic web ui testing
Automatic web ui testingAutomatic web ui testing
Automatic web ui testing
 
Integration and Acceptance Testing
Integration and Acceptance TestingIntegration and Acceptance Testing
Integration and Acceptance Testing
 
Moving from Ad Hoc Testing to Continuous Test Data with FitNesse
Moving from Ad Hoc Testing to Continuous Test Data with FitNesseMoving from Ad Hoc Testing to Continuous Test Data with FitNesse
Moving from Ad Hoc Testing to Continuous Test Data with FitNesse
 
Acceptance Test Driven Development
Acceptance Test Driven DevelopmentAcceptance Test Driven Development
Acceptance Test Driven Development
 
Acceptance test driven development (attd) cycle
Acceptance test driven development (attd) cycleAcceptance test driven development (attd) cycle
Acceptance test driven development (attd) cycle
 
Some Observations from the Innovation Chasm
Some Observations from the Innovation ChasmSome Observations from the Innovation Chasm
Some Observations from the Innovation Chasm
 
Intro to jQuery
Intro to jQueryIntro to jQuery
Intro to jQuery
 
ATDD in practice
ATDD in practiceATDD in practice
ATDD in practice
 
Specflow - Criando uma ponte entre desenvolvedores.
Specflow - Criando uma ponte entre desenvolvedores.Specflow - Criando uma ponte entre desenvolvedores.
Specflow - Criando uma ponte entre desenvolvedores.
 
Acceptance Test Driven Development With Spec Flow And Friends
Acceptance Test Driven Development With Spec Flow And FriendsAcceptance Test Driven Development With Spec Flow And Friends
Acceptance Test Driven Development With Spec Flow And Friends
 
Acceptance Test Driven Development at StarWest 2014
Acceptance Test Driven Development at StarWest 2014Acceptance Test Driven Development at StarWest 2014
Acceptance Test Driven Development at StarWest 2014
 
Fitnesse, Watir and Ruby Based Test Automation System
Fitnesse, Watir and Ruby Based Test Automation SystemFitnesse, Watir and Ruby Based Test Automation System
Fitnesse, Watir and Ruby Based Test Automation System
 
TestWorks Conf 2015 Beefing up FitNesse - Arjan Molenaar
TestWorks Conf 2015 Beefing up FitNesse - Arjan MolenaarTestWorks Conf 2015 Beefing up FitNesse - Arjan Molenaar
TestWorks Conf 2015 Beefing up FitNesse - Arjan Molenaar
 
JavaLand: Quantified Social - Fitness-Geräte und -Portale mit Agorava
JavaLand: Quantified Social - Fitness-Geräte und -Portale mit AgoravaJavaLand: Quantified Social - Fitness-Geräte und -Portale mit Agorava
JavaLand: Quantified Social - Fitness-Geräte und -Portale mit Agorava
 
Methodologies for Test-Driven Development of OSGi enabled Embedded Devices - ...
Methodologies for Test-Driven Development of OSGi enabled Embedded Devices - ...Methodologies for Test-Driven Development of OSGi enabled Embedded Devices - ...
Methodologies for Test-Driven Development of OSGi enabled Embedded Devices - ...
 
Fitnesse user acceptance test - Presentation
Fitnesse   user acceptance test - PresentationFitnesse   user acceptance test - Presentation
Fitnesse user acceptance test - Presentation
 
Coding Dojo for Testers/Testing Dojo: Designing Test Cases with FitNesse (2014)
Coding Dojo for Testers/Testing Dojo: Designing Test Cases with FitNesse (2014)Coding Dojo for Testers/Testing Dojo: Designing Test Cases with FitNesse (2014)
Coding Dojo for Testers/Testing Dojo: Designing Test Cases with FitNesse (2014)
 
FitNesse With Scala
FitNesse With ScalaFitNesse With Scala
FitNesse With Scala
 

Similaire à Writing Acceptance Tests Using FitNesse for REST APIs

Why vREST?
Why vREST?Why vREST?
Why vREST?vrest_io
 
Agile Mumbai 2020 Conference | How to get the best ROI on Your Test Automati...
Agile Mumbai 2020 Conference |  How to get the best ROI on Your Test Automati...Agile Mumbai 2020 Conference |  How to get the best ROI on Your Test Automati...
Agile Mumbai 2020 Conference | How to get the best ROI on Your Test Automati...AgileNetwork
 
Productivity Acceleration Tools for SOA Testers
Productivity Acceleration Tools for SOA TestersProductivity Acceleration Tools for SOA Testers
Productivity Acceleration Tools for SOA TestersWSO2
 
Performance testing jmeter
Performance testing jmeterPerformance testing jmeter
Performance testing jmeterBhojan Rajan
 
POST/CON 2019 Workshop: Testing, Automated Testing, and Reporting APIs with P...
POST/CON 2019 Workshop: Testing, Automated Testing, and Reporting APIs with P...POST/CON 2019 Workshop: Testing, Automated Testing, and Reporting APIs with P...
POST/CON 2019 Workshop: Testing, Automated Testing, and Reporting APIs with P...Postman
 
Test automation lesson
Test automation lessonTest automation lesson
Test automation lessonSadaaki Emura
 
Performancetestingjmeter 121109061704-phpapp02
Performancetestingjmeter 121109061704-phpapp02Performancetestingjmeter 121109061704-phpapp02
Performancetestingjmeter 121109061704-phpapp02Shivakumara .
 
Structured Functional Automated Web Service Testing
Structured Functional Automated Web Service TestingStructured Functional Automated Web Service Testing
Structured Functional Automated Web Service Testingrdekleijn
 
Choosing right-automation-tool
Choosing right-automation-toolChoosing right-automation-tool
Choosing right-automation-toolBabuDevanandam
 
4&5.pptx SOFTWARE TESTING UNIT-4 AND UNIT-5
4&5.pptx SOFTWARE TESTING UNIT-4 AND UNIT-54&5.pptx SOFTWARE TESTING UNIT-4 AND UNIT-5
4&5.pptx SOFTWARE TESTING UNIT-4 AND UNIT-5hemasubbu08
 
Bank_Automated_API_Testing
Bank_Automated_API_TestingBank_Automated_API_Testing
Bank_Automated_API_TestingAndy Saunders
 
B4USolution_API-Testing
B4USolution_API-TestingB4USolution_API-Testing
B4USolution_API-Testingb4usolution .
 
Furore devdays2017 tdd-1-intro
Furore devdays2017 tdd-1-introFurore devdays2017 tdd-1-intro
Furore devdays2017 tdd-1-introDevDays
 
Performancetestingjmeter 131210111657-phpapp02
Performancetestingjmeter 131210111657-phpapp02Performancetestingjmeter 131210111657-phpapp02
Performancetestingjmeter 131210111657-phpapp02Nitish Bhardwaj
 
Automated Acceptance Tests & Tool choice
Automated Acceptance Tests & Tool choiceAutomated Acceptance Tests & Tool choice
Automated Acceptance Tests & Tool choicetoddbr
 
Unit Testng with PHP Unit - A Step by Step Training
Unit Testng with PHP Unit - A Step by Step TrainingUnit Testng with PHP Unit - A Step by Step Training
Unit Testng with PHP Unit - A Step by Step TrainingRam Awadh Prasad, PMP
 

Similaire à Writing Acceptance Tests Using FitNesse for REST APIs (20)

Rest assured
Rest assuredRest assured
Rest assured
 
ATAGTR2017 Test the REST
ATAGTR2017 Test the REST ATAGTR2017 Test the REST
ATAGTR2017 Test the REST
 
Why vREST?
Why vREST?Why vREST?
Why vREST?
 
Agile Mumbai 2020 Conference | How to get the best ROI on Your Test Automati...
Agile Mumbai 2020 Conference |  How to get the best ROI on Your Test Automati...Agile Mumbai 2020 Conference |  How to get the best ROI on Your Test Automati...
Agile Mumbai 2020 Conference | How to get the best ROI on Your Test Automati...
 
Productivity Acceleration Tools for SOA Testers
Productivity Acceleration Tools for SOA TestersProductivity Acceleration Tools for SOA Testers
Productivity Acceleration Tools for SOA Testers
 
Performance testing jmeter
Performance testing jmeterPerformance testing jmeter
Performance testing jmeter
 
POST/CON 2019 Workshop: Testing, Automated Testing, and Reporting APIs with P...
POST/CON 2019 Workshop: Testing, Automated Testing, and Reporting APIs with P...POST/CON 2019 Workshop: Testing, Automated Testing, and Reporting APIs with P...
POST/CON 2019 Workshop: Testing, Automated Testing, and Reporting APIs with P...
 
Test automation lesson
Test automation lessonTest automation lesson
Test automation lesson
 
Performancetestingjmeter 121109061704-phpapp02
Performancetestingjmeter 121109061704-phpapp02Performancetestingjmeter 121109061704-phpapp02
Performancetestingjmeter 121109061704-phpapp02
 
Structured Functional Automated Web Service Testing
Structured Functional Automated Web Service TestingStructured Functional Automated Web Service Testing
Structured Functional Automated Web Service Testing
 
Choosing right-automation-tool
Choosing right-automation-toolChoosing right-automation-tool
Choosing right-automation-tool
 
ESB Testing
ESB TestingESB Testing
ESB Testing
 
4&5.pptx SOFTWARE TESTING UNIT-4 AND UNIT-5
4&5.pptx SOFTWARE TESTING UNIT-4 AND UNIT-54&5.pptx SOFTWARE TESTING UNIT-4 AND UNIT-5
4&5.pptx SOFTWARE TESTING UNIT-4 AND UNIT-5
 
Bank_Automated_API_Testing
Bank_Automated_API_TestingBank_Automated_API_Testing
Bank_Automated_API_Testing
 
B4USolution_API-Testing
B4USolution_API-TestingB4USolution_API-Testing
B4USolution_API-Testing
 
Furore devdays2017 tdd-1-intro
Furore devdays2017 tdd-1-introFurore devdays2017 tdd-1-intro
Furore devdays2017 tdd-1-intro
 
Performancetestingjmeter 131210111657-phpapp02
Performancetestingjmeter 131210111657-phpapp02Performancetestingjmeter 131210111657-phpapp02
Performancetestingjmeter 131210111657-phpapp02
 
Automated Acceptance Tests & Tool choice
Automated Acceptance Tests & Tool choiceAutomated Acceptance Tests & Tool choice
Automated Acceptance Tests & Tool choice
 
Test automation
Test automationTest automation
Test automation
 
Unit Testng with PHP Unit - A Step by Step Training
Unit Testng with PHP Unit - A Step by Step TrainingUnit Testng with PHP Unit - A Step by Step Training
Unit Testng with PHP Unit - A Step by Step Training
 

Dernier

WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
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
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
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
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
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
 

Dernier (20)

WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
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
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
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
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 

Writing Acceptance Tests Using FitNesse for REST APIs

  • 1. Writing Acceptance Tests Using Fitnesse Facundo Farias facundo.farias@gmail.com
  • 2. Agenda 1. 2. 3. 4. 5. 6. Acceptance Testing Acceptance Tests How To: Acceptance tests FitNesse and RESTful Web Services Samples How does Acceptance Test fit in our process?
  • 3. Acceptance Testing • Acceptance Testing is a high-level testing procedure used to verify that a software system behaves as specified by customer. • The term Acceptance Testing itself is strongly related to the agile software development method Extreme Programming (XP).
  • 4. Acceptance Tests by definition • Acceptance tests are created from user stories. During an iteration the user stories selected during the iteration planning meeting will be translated into acceptance tests. The customer specifies scenarios to test when a user story has been correctly implemented. A story can have one or many acceptance tests, what ever it takes to ensure the functionality works. • Acceptance tests are black box system tests. • Each acceptance test represents some expected result from the system. • A user story is not considered complete until it has passed its acceptance tests. • Acceptance tests should be automated so they can be run often.
  • 5. Benefits of Acceptance Tests Some of the benefits using Acceptance Tests: 1. Helps to clarify requirements, 2. Tests are written using customer language, 3. Shows working software in a real environment, 4. Increase communication within the team, 5. Can be considered as an absolute criteria for deciding when a feature is complete, 6. Eliminates ambiguity from users stories, 7. Can be seen as a partial replacement for documentation.
  • 6. Many tools to implement it • • • • • • • Fitnesse Cucumber Concordion Selenium GreenPepper Jbehave Others
  • 7. Which one should I use? • It depends on: 1. The Programming Language 2. The Development Infrastructure and Tools, 3. The OS
  • 8. We did a choice: Fitnesse for REST • After a brief analysis of each tool, and an small PoC, we found Fitnesse the best tool for our project. Why: 1. The tests are written in a wiki format, 2. The implementation was very easy, 3. We didn’t need to touch anything in our code, since with a single table we can write complex tests, 4. Fitnesse exposes a REST interface to run the tests in a suite automatically returning XML results, 5. The received XML can be transformed using an XSLT file to convert the results to JUnit format, in this way, it will be integrated to Bamboo, 6. It has a big community in the Open Source world.
  • 9. FitNesse & RESTful Web Services • • • • • • One thing that acceptance testing can perform very well is the validation of RESTful web services, but unfortunately FitNesse does not provide native support for testing RESTful web services. Fortunately if you search the Internet you'll quickly find a custom fixture called RestFixture that does most of what you will need to test your web services. In short, the RestFixture allows you to execute various HTTP verbs against a service, passing the appropriate data, and then validate the results. The RestRixture is an ActionFixture, therefore all the ActionFixture goodies are available. On top of that it contains the following 7 methods: header: to be able to set the headers for the next request (a CRLF separated list of name:value pairs), body: to allow request body input, essential for PUT and POST, let: to allow data from the response headers and body to be extracted and assigned to a label that can then be passed around. GET, POST, PUT, DELETE to execute requests.
  • 10. Getting started with RestFixture • Each test is a row on a RestFixture table and it has the following format: • |VERB|uri|?ret|?headers|?body| • VERB is one of GET, POST, PUT, DELETE • uri is the resource URI • ?ret is the expected return code of the request. it can be expressed as a regular expression, that is you can write 2dd if you expect any code between 200 and 299. • ?headers is the expected list of headers. In fact, the expectation is checked by verifying that *all* the headers in here are present in the response. Each header must go in a newline and both name and value can be expressed as regular expressions to match in order to verify inclusion. • ?body it's the expected body in the response. This is expressed as a list of XPath expressions to allow greater flexibility.
  • 19. How are we using it? • We’ve implemented FitNesse with this specific RestFixture to validate the our REST interfaces. • We have a suite for the interfaces already developed, called Regression. This suite will be executed as an smoke test after each code commit, since it tests the sunny day of each API e2e. • We have another suite, to test the Current sprint. This should be RED at the very beginning of the sprint, but should start be GREEN when the sprint is reaching the end. • Both test suites can be executed thru a Bamboo Plan. The first stage (Regression) will run always, and the second stage (Current) will be optional (we choose when to run it).
  • 20. References • • • • • • • Acceptance Tests [extremeprogramming.org] Test Driven .NET Development with FitNesse Acceptance Testing [University of Helsinki] FitNesse Web Page Fit: Framework for Integrated Test RestFixture: Validation of RESTful Web Services ResFixture Documentation Tests