SlideShare ist ein Scribd-Unternehmen logo
1 von 28
FitNesse

On the Road to Success


       by ajit Koti
What we will cover today
       What is FitNesse?
           Tradition Approach
           Quick introduction
           Quick Demo


         How it works
         Different types of tables

       Conclusion
Traditional Approaches for acceptance
testing
   Manual Acceptance testing. User
    exercises the system manually using
    his creativity.                              Disadvantages:
                                              expensive, error prone,
                                                not repeatable, …
   Acceptance testing with “GUI Test
    Drivers” (at the GUI level). These
    tools    help   the    developer     do
    functional/acceptance testing through a
    user interface such as a native GUI or       Disadvantages:
                                              expensive, error prone,
    web interface. “Capture and Replay”         not repeatable, …
    Tools capture events (e.g. mouse,
    keyboard) in modifiable script.
Fit / FitNesse
   Framework for Integrated Testing
   FitNesse, a wiki using Fit
   Defining Acceptance Tests, checking that “We are
    building the right thing”
   Creating a feedback loop between customers,
    testers and programmers




   Provides a one-click test environment
What is FitNesse?

FitNesse is a software development collaboration tool
 Great software requires collaboration and communication.
   FitNesse is a tool for enhancing collaboration in software
   development.

   FitNesse enables customers, testers, and programmers
    to learn what their software should do, and to
    automatically compare that to what it actually does do. It
    compares customers' expectations to actual results.

   It's an invaluable way to collaborate on complicated
    problems (and get them right) early in development
What is Fit?

   The Framework for Integrated Test (Fit) is the most well-
    known implementation (open source framework) of the
    table-based acceptance testing approach.

   Fit lets customers and analysts write         “executable”
    acceptance tests using simple HTML tables.

   Developers write “fixtures” to link the test cases with the
    actual system itself.

   Fit compares these test cases, written using HTML tables,
    with actual values, returned by the system, and highlights
    the results with colors and annotations.
Now some Demos
    Simple Calculator

    Discount Calculator
What we will cover today
   What is FitNesse?

   How it works
    Using Fit
    Fit table
    Fixture
    Test Runner


   Different types of tables
   Conclusion
Using Fit
Just two steps are required to automate user
  acceptance tests using Fit:
 Express a test case in the form of a Fit table.
 Write the glue code, called a Fixture, that bridges
  the test case and system under test.

That's it!
You are all set to execute the tests automatically for
  the rest of the application’s lifetime.
Fit table
   A Fit table is a way of expressing the business
    logic using a simple HTML table.

   Fit tables help developers better understand the
    requirements and are used as acceptance test
    cases.

   Customers and Analysts create Fit tables using a
    tool like Word, Excel, or even a text editor
Fixture
   A fixture is an interface between the test
    instrumentation (in our case, the Fit framework),
    test cases (Fit tables), and the system under test.

   Fixtures     are    procedures/functions/classes
    usually written by developers.

   In general, there is a one-to-one mapping between
    a Fit table and fixture.
Test Runner

   The Test runner          sample.VerifyRating
    compares the             team name     played   won   drawn   lost   rating()

    customer-set             Arsenal       38       31    2       5      83

    expectations with the    Aston Villa   38       20    2       16     54

    actual results and       Chelsea       38       35    1       2      93


    reports any errors by    Dummy         38       35    1       2
                                                                         100 expected
                                                                         -------------------
    color-coding the table                                                93 actual

    rows.                    Wigan         38       26    7       5      75


                              “red for failures and green for passed tests”
How it works
   The text is interpreted so it can trigger the
    fixtures that call the System-Under-Test
    (SUT)
   Fit interprets the results and display
    Pass/Fail in each cell

   Proper syntax is key
   Not so hard to learn…
                         …after you get going
The Fit picture                        Output Table



                                                     o ≠ o’

        Developer


                    Fixture              Test Runner


                                                                  o’
Customer/
                                                 i
Analyst                         (i, o)
User Story                                              System

                    Fit Table                        O = expected output
                                                     O’ = actual output
Table, Fit, and
                                               Fixture together



Fixture Class
Public Class Calculator
                                                         Fixture and SUT
  Public Number1 As Double
  Public Number2 As Double
                                                         working together
  Private _oSUTCalculator As
DemoSUT.SUTCalculator

  Public Sub New()
    _oSUTCalculator = New                         System Under Test
DemoSUT.SUTCalculator                             Public Class SUTCalculator
  End Sub                                           Public Function Multiply( _
                                                     ByVal firstNumber As Double, _
  Public Function Product() As Double                ByVal secondNumber As Double) _
    Return _oSUTCalculator.Multiply(Number1,         As Double
Number2)                                             Return firstNumber * secondNumber
  End Function                                      End Function
                                                  End Class
End Class
What we will cover today
   What is FitNesse?
   How it works

   Different types of tables
    Decision Table
     Query table
     Script Table
     Table Table


   Conclusion
Different styles of Tables

Test System
 Fit

 Slim
Fit Tables
   ColumnFixture
       This is the style you may end up using most: rows of data represent
    inputs and expected outputs.
   RowFixture
        This is good for testing queries that should return an exact set of
    values (order-independently)
   .ActionFixture
      This style allows you write a script that emulates a series of events
    (such as controls manipulated on a user interface).
   Comment Tables
      Sometimes you want a tablular comment that is not executed as a
    test.
The SLIM Test System

    Slim (Simple List Invocation Method) is an alternative to Fit. Rather than
    running all the HTML processing, comparisons, and colorizing in the
    System Under Test (SUT), Slim keeps all that behavior on in FitNesse.
    What executes in the SUT is a very tiny kernel that implements the
    Slim Protocol. This protocol is a bare bones RPC system that allows
    FitNesse to call functions in the SUT.

    Different table styles in Slim

    Decision Table
   Query Table
   Subset Query Table
   Ordered query Table
   Script Table
   Table Table
Decision Table

Decision Tables are a common way to get test data into a
  System Under Test.

    A Decision table has three parts
   One Title Row - Names the fixture to execute, optionally
    includes constructor parameters
   One Heading Row - Names of columns, which map to
    either setter methods or method calls (if they end in ?)
   Zero or more Data Rows - rows of data used to either
    provide data into a system or data used to compare to
    values returned from the fixture
Query table

    A Query table is a means of performing a single query
    and verifying the results.




   They can pass parameters into the constructor of their
    fixture.
   They expect a method, query, which returns a List of a List
    of a List of strings.

.
Script Table
    Script tables are a convenient way to introduce code-
    like sequences into your tests.

   They derive their design from Smalltalk keyword messages but other
    than that, they behave like other Slim tables:
    They are backed with a fixture
   They have one or more method invocations, one per line.
   There are several keywords you can start a line with such as show and
    check.
   The full method name is in parts, alternating with parameters passed in
    to the backing fixture.
   The method name starts in cell 1 if the line does not start with one of a
    small set of pre-defined keywords (check, reject, ...). Otherwise, it
    begins in cell 2.
Table Table
What we will cover today
   What is FitNesse?
   How it works
   Different types of tables



   Conclusion
    How to get help
   Q& A
Conclusions
   Manual acceptance testing is expensive, error prone and
    not repeatable.

   Fit/Fitnesse is a tool to write, organize and execute table-
    based tests.

   Fit tables help to clarify “textual requirements”.

   Fit tables “are requirements verifiable and executable”.

   Fit is compatible with Junit.

   The motivation of Fit/Fitnesse testing is demonstrating
    working functionalities while the motivation of Junit is
    finding faults
How to get help
Fitnesse on the web

To install FitNesse

WORKING WITH FITNESSE WIKI PAGES

VIDEO TUTORIALS

A great book “ Fit for Developing Software” with its samples
Q&A
Thank You

Weitere ähnliche Inhalte

Was ist angesagt?

Web Engineering - Web Application Testing
Web Engineering - Web Application TestingWeb Engineering - Web Application Testing
Web Engineering - Web Application TestingNosheen Qamar
 
Load Testing Best Practices
Load Testing Best PracticesLoad Testing Best Practices
Load Testing Best PracticesApica
 
Non-Functional testing
Non-Functional testingNon-Functional testing
Non-Functional testingKanoah
 
Software Testing Process
Software Testing ProcessSoftware Testing Process
Software Testing Processguest1f2740
 
Software testing basic concepts
Software testing basic conceptsSoftware testing basic concepts
Software testing basic conceptsHưng Hoàng
 
Introduction to Automation Testing
Introduction to Automation TestingIntroduction to Automation Testing
Introduction to Automation TestingArchana Krushnan
 
LoadRunner Performance Testing
LoadRunner Performance TestingLoadRunner Performance Testing
LoadRunner Performance TestingAtul Pant
 
Validation testing
Validation testingValidation testing
Validation testingSlideshare
 
Ch 4 components of the sqa system
Ch 4 components of the sqa systemCh 4 components of the sqa system
Ch 4 components of the sqa systemKittitouch Suteeca
 
Software Requirement Analysis and Specification (SRS) of Automated Cyber Cafe...
Software Requirement Analysis and Specification (SRS) of Automated Cyber Cafe...Software Requirement Analysis and Specification (SRS) of Automated Cyber Cafe...
Software Requirement Analysis and Specification (SRS) of Automated Cyber Cafe...Misu Md Rakib Hossain
 
Performance Testing
Performance TestingPerformance Testing
Performance Testingsharmaparish
 
Agile test-management-test-rail-lastest
Agile test-management-test-rail-lastestAgile test-management-test-rail-lastest
Agile test-management-test-rail-lastestOnur Baskirt
 

Was ist angesagt? (20)

Manual testing
Manual testingManual testing
Manual testing
 
Software Verification & Validation
Software Verification & ValidationSoftware Verification & Validation
Software Verification & Validation
 
Web Engineering - Web Application Testing
Web Engineering - Web Application TestingWeb Engineering - Web Application Testing
Web Engineering - Web Application Testing
 
System testing
System testingSystem testing
System testing
 
Load Testing Best Practices
Load Testing Best PracticesLoad Testing Best Practices
Load Testing Best Practices
 
Non-Functional testing
Non-Functional testingNon-Functional testing
Non-Functional testing
 
Software Testing Process
Software Testing ProcessSoftware Testing Process
Software Testing Process
 
Software testing basic concepts
Software testing basic conceptsSoftware testing basic concepts
Software testing basic concepts
 
Introduction to Automation Testing
Introduction to Automation TestingIntroduction to Automation Testing
Introduction to Automation Testing
 
QSpiders - Introduction to JMeter
QSpiders - Introduction to JMeterQSpiders - Introduction to JMeter
QSpiders - Introduction to JMeter
 
LoadRunner Performance Testing
LoadRunner Performance TestingLoadRunner Performance Testing
LoadRunner Performance Testing
 
Validation testing
Validation testingValidation testing
Validation testing
 
Ch 4 components of the sqa system
Ch 4 components of the sqa systemCh 4 components of the sqa system
Ch 4 components of the sqa system
 
Junit
JunitJunit
Junit
 
Manual testing ppt
Manual testing pptManual testing ppt
Manual testing ppt
 
Test automation proposal
Test automation proposalTest automation proposal
Test automation proposal
 
Testing Metrics
Testing MetricsTesting Metrics
Testing Metrics
 
Software Requirement Analysis and Specification (SRS) of Automated Cyber Cafe...
Software Requirement Analysis and Specification (SRS) of Automated Cyber Cafe...Software Requirement Analysis and Specification (SRS) of Automated Cyber Cafe...
Software Requirement Analysis and Specification (SRS) of Automated Cyber Cafe...
 
Performance Testing
Performance TestingPerformance Testing
Performance Testing
 
Agile test-management-test-rail-lastest
Agile test-management-test-rail-lastestAgile test-management-test-rail-lastest
Agile test-management-test-rail-lastest
 

Ähnlich wie Fitnesse Testing Framework

AUTOCODECOVERGEN: PROTOTYPE OF DATA DRIVEN UNIT TEST GENRATION TOOL THAT GUAR...
AUTOCODECOVERGEN: PROTOTYPE OF DATA DRIVEN UNIT TEST GENRATION TOOL THAT GUAR...AUTOCODECOVERGEN: PROTOTYPE OF DATA DRIVEN UNIT TEST GENRATION TOOL THAT GUAR...
AUTOCODECOVERGEN: PROTOTYPE OF DATA DRIVEN UNIT TEST GENRATION TOOL THAT GUAR...acijjournal
 
Testing Options in Java
Testing Options in JavaTesting Options in Java
Testing Options in JavaMichael Fons
 
Model Driven Testing: requirements, models & test
Model Driven Testing: requirements, models & test Model Driven Testing: requirements, models & test
Model Driven Testing: requirements, models & test Gregory Solovey
 
Problem-solving and design 1.pptx
Problem-solving and design 1.pptxProblem-solving and design 1.pptx
Problem-solving and design 1.pptxTadiwaMawere
 
RPG Program for Unit Testing RPG
RPG Program for Unit Testing RPG RPG Program for Unit Testing RPG
RPG Program for Unit Testing RPG Greg.Helton
 
J unit presentation
J unit presentationJ unit presentation
J unit presentationPriya Sharma
 
Getting started with_testcomplete
Getting started with_testcompleteGetting started with_testcomplete
Getting started with_testcompleteankit.das
 
Testers Desk Presentation
Testers Desk PresentationTesters Desk Presentation
Testers Desk PresentationQuality Testing
 
CASE STUDY InternetExcel Exercises, page 434, textRecord your.docx
CASE STUDY InternetExcel Exercises, page 434, textRecord your.docxCASE STUDY InternetExcel Exercises, page 434, textRecord your.docx
CASE STUDY InternetExcel Exercises, page 434, textRecord your.docxketurahhazelhurst
 
12 Rational Solo Pruebas 2009
12 Rational Solo Pruebas 200912 Rational Solo Pruebas 2009
12 Rational Solo Pruebas 2009Pepe
 
Getting started with test complete 7
Getting started with test complete 7Getting started with test complete 7
Getting started with test complete 7Hoamuoigio Hoa
 
Debugger & Profiler in NetBeans
Debugger & Profiler in NetBeansDebugger & Profiler in NetBeans
Debugger & Profiler in NetBeansHuu Bang Le Phan
 
MBT_Installers_Dev_Env
MBT_Installers_Dev_EnvMBT_Installers_Dev_Env
MBT_Installers_Dev_EnvChris Struble
 
Automation White Paper V2
Automation White Paper V2Automation White Paper V2
Automation White Paper V2Mark Blair
 
Software fundamentals
Software fundamentalsSoftware fundamentals
Software fundamentalsSusan Winters
 

Ähnlich wie Fitnesse Testing Framework (20)

2 fitnesse
2 fitnesse2 fitnesse
2 fitnesse
 
AUTOCODECOVERGEN: PROTOTYPE OF DATA DRIVEN UNIT TEST GENRATION TOOL THAT GUAR...
AUTOCODECOVERGEN: PROTOTYPE OF DATA DRIVEN UNIT TEST GENRATION TOOL THAT GUAR...AUTOCODECOVERGEN: PROTOTYPE OF DATA DRIVEN UNIT TEST GENRATION TOOL THAT GUAR...
AUTOCODECOVERGEN: PROTOTYPE OF DATA DRIVEN UNIT TEST GENRATION TOOL THAT GUAR...
 
Testing Options in Java
Testing Options in JavaTesting Options in Java
Testing Options in Java
 
Model Driven Testing: requirements, models & test
Model Driven Testing: requirements, models & test Model Driven Testing: requirements, models & test
Model Driven Testing: requirements, models & test
 
Problem-solving and design 1.pptx
Problem-solving and design 1.pptxProblem-solving and design 1.pptx
Problem-solving and design 1.pptx
 
RPG Program for Unit Testing RPG
RPG Program for Unit Testing RPG RPG Program for Unit Testing RPG
RPG Program for Unit Testing RPG
 
QTP_PRESENTATION_Andy
QTP_PRESENTATION_AndyQTP_PRESENTATION_Andy
QTP_PRESENTATION_Andy
 
J unit presentation
J unit presentationJ unit presentation
J unit presentation
 
JUnit Presentation
JUnit PresentationJUnit Presentation
JUnit Presentation
 
Getting started with_testcomplete
Getting started with_testcompleteGetting started with_testcomplete
Getting started with_testcomplete
 
Testers Desk Presentation
Testers Desk PresentationTesters Desk Presentation
Testers Desk Presentation
 
CASE STUDY InternetExcel Exercises, page 434, textRecord your.docx
CASE STUDY InternetExcel Exercises, page 434, textRecord your.docxCASE STUDY InternetExcel Exercises, page 434, textRecord your.docx
CASE STUDY InternetExcel Exercises, page 434, textRecord your.docx
 
12 Rational Solo Pruebas 2009
12 Rational Solo Pruebas 200912 Rational Solo Pruebas 2009
12 Rational Solo Pruebas 2009
 
Getting started with test complete 7
Getting started with test complete 7Getting started with test complete 7
Getting started with test complete 7
 
Unit testing with JUnit
Unit testing with JUnitUnit testing with JUnit
Unit testing with JUnit
 
Debugger & Profiler in NetBeans
Debugger & Profiler in NetBeansDebugger & Profiler in NetBeans
Debugger & Profiler in NetBeans
 
MBT_Installers_Dev_Env
MBT_Installers_Dev_EnvMBT_Installers_Dev_Env
MBT_Installers_Dev_Env
 
test
testtest
test
 
Automation White Paper V2
Automation White Paper V2Automation White Paper V2
Automation White Paper V2
 
Software fundamentals
Software fundamentalsSoftware fundamentals
Software fundamentals
 

Kürzlich hochgeladen

Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 

Kürzlich hochgeladen (20)

Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 

Fitnesse Testing Framework

  • 1. FitNesse On the Road to Success by ajit Koti
  • 2. What we will cover today  What is FitNesse?  Tradition Approach  Quick introduction  Quick Demo  How it works  Different types of tables  Conclusion
  • 3. Traditional Approaches for acceptance testing  Manual Acceptance testing. User exercises the system manually using his creativity. Disadvantages: expensive, error prone, not repeatable, …  Acceptance testing with “GUI Test Drivers” (at the GUI level). These tools help the developer do functional/acceptance testing through a user interface such as a native GUI or Disadvantages: expensive, error prone, web interface. “Capture and Replay” not repeatable, … Tools capture events (e.g. mouse, keyboard) in modifiable script.
  • 4. Fit / FitNesse  Framework for Integrated Testing  FitNesse, a wiki using Fit  Defining Acceptance Tests, checking that “We are building the right thing”  Creating a feedback loop between customers, testers and programmers  Provides a one-click test environment
  • 5. What is FitNesse? FitNesse is a software development collaboration tool  Great software requires collaboration and communication. FitNesse is a tool for enhancing collaboration in software development.  FitNesse enables customers, testers, and programmers to learn what their software should do, and to automatically compare that to what it actually does do. It compares customers' expectations to actual results.  It's an invaluable way to collaborate on complicated problems (and get them right) early in development
  • 6. What is Fit?  The Framework for Integrated Test (Fit) is the most well- known implementation (open source framework) of the table-based acceptance testing approach.  Fit lets customers and analysts write “executable” acceptance tests using simple HTML tables.  Developers write “fixtures” to link the test cases with the actual system itself.  Fit compares these test cases, written using HTML tables, with actual values, returned by the system, and highlights the results with colors and annotations.
  • 7. Now some Demos  Simple Calculator  Discount Calculator
  • 8. What we will cover today  What is FitNesse?  How it works  Using Fit  Fit table  Fixture  Test Runner  Different types of tables  Conclusion
  • 9. Using Fit Just two steps are required to automate user acceptance tests using Fit:  Express a test case in the form of a Fit table.  Write the glue code, called a Fixture, that bridges the test case and system under test. That's it! You are all set to execute the tests automatically for the rest of the application’s lifetime.
  • 10. Fit table  A Fit table is a way of expressing the business logic using a simple HTML table.  Fit tables help developers better understand the requirements and are used as acceptance test cases.  Customers and Analysts create Fit tables using a tool like Word, Excel, or even a text editor
  • 11. Fixture  A fixture is an interface between the test instrumentation (in our case, the Fit framework), test cases (Fit tables), and the system under test.  Fixtures are procedures/functions/classes usually written by developers.  In general, there is a one-to-one mapping between a Fit table and fixture.
  • 12. Test Runner  The Test runner sample.VerifyRating compares the team name played won drawn lost rating() customer-set Arsenal 38 31 2 5 83 expectations with the Aston Villa 38 20 2 16 54 actual results and Chelsea 38 35 1 2 93 reports any errors by Dummy 38 35 1 2 100 expected ------------------- color-coding the table 93 actual rows. Wigan 38 26 7 5 75 “red for failures and green for passed tests”
  • 13. How it works  The text is interpreted so it can trigger the fixtures that call the System-Under-Test (SUT)  Fit interprets the results and display Pass/Fail in each cell  Proper syntax is key  Not so hard to learn… …after you get going
  • 14. The Fit picture Output Table o ≠ o’ Developer Fixture Test Runner o’ Customer/ i Analyst (i, o) User Story System Fit Table O = expected output O’ = actual output
  • 15. Table, Fit, and Fixture together Fixture Class Public Class Calculator Fixture and SUT Public Number1 As Double Public Number2 As Double working together Private _oSUTCalculator As DemoSUT.SUTCalculator Public Sub New() _oSUTCalculator = New System Under Test DemoSUT.SUTCalculator Public Class SUTCalculator End Sub Public Function Multiply( _ ByVal firstNumber As Double, _ Public Function Product() As Double ByVal secondNumber As Double) _ Return _oSUTCalculator.Multiply(Number1, As Double Number2) Return firstNumber * secondNumber End Function End Function End Class End Class
  • 16. What we will cover today  What is FitNesse?  How it works  Different types of tables  Decision Table  Query table  Script Table  Table Table  Conclusion
  • 17. Different styles of Tables Test System  Fit  Slim
  • 18. Fit Tables  ColumnFixture This is the style you may end up using most: rows of data represent inputs and expected outputs.  RowFixture This is good for testing queries that should return an exact set of values (order-independently)  .ActionFixture This style allows you write a script that emulates a series of events (such as controls manipulated on a user interface).  Comment Tables Sometimes you want a tablular comment that is not executed as a test.
  • 19. The SLIM Test System Slim (Simple List Invocation Method) is an alternative to Fit. Rather than running all the HTML processing, comparisons, and colorizing in the System Under Test (SUT), Slim keeps all that behavior on in FitNesse. What executes in the SUT is a very tiny kernel that implements the Slim Protocol. This protocol is a bare bones RPC system that allows FitNesse to call functions in the SUT. Different table styles in Slim Decision Table  Query Table  Subset Query Table  Ordered query Table  Script Table  Table Table
  • 20. Decision Table Decision Tables are a common way to get test data into a System Under Test. A Decision table has three parts  One Title Row - Names the fixture to execute, optionally includes constructor parameters  One Heading Row - Names of columns, which map to either setter methods or method calls (if they end in ?)  Zero or more Data Rows - rows of data used to either provide data into a system or data used to compare to values returned from the fixture
  • 21. Query table A Query table is a means of performing a single query and verifying the results.  They can pass parameters into the constructor of their fixture.  They expect a method, query, which returns a List of a List of a List of strings. .
  • 22. Script Table Script tables are a convenient way to introduce code- like sequences into your tests.  They derive their design from Smalltalk keyword messages but other than that, they behave like other Slim tables: They are backed with a fixture  They have one or more method invocations, one per line.  There are several keywords you can start a line with such as show and check.  The full method name is in parts, alternating with parameters passed in to the backing fixture.  The method name starts in cell 1 if the line does not start with one of a small set of pre-defined keywords (check, reject, ...). Otherwise, it begins in cell 2.
  • 24. What we will cover today  What is FitNesse?  How it works  Different types of tables  Conclusion  How to get help  Q& A
  • 25. Conclusions  Manual acceptance testing is expensive, error prone and not repeatable.  Fit/Fitnesse is a tool to write, organize and execute table- based tests.  Fit tables help to clarify “textual requirements”.  Fit tables “are requirements verifiable and executable”.  Fit is compatible with Junit.  The motivation of Fit/Fitnesse testing is demonstrating working functionalities while the motivation of Junit is finding faults
  • 26. How to get help Fitnesse on the web To install FitNesse WORKING WITH FITNESSE WIKI PAGES VIDEO TUTORIALS A great book “ Fit for Developing Software” with its samples
  • 27. Q&A

Hinweis der Redaktion

  1. Links with no warranties