[Koha-bugs] [Bug 13849] Introduce acceptance tests with cucumber

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Mar 17 11:13:10 CET 2015


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13849

Olli-Antti Kivilahti <olli-antti.kivilahti at jns.fi> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |olli-antti.kivilahti at jns.fi

--- Comment #2 from Olli-Antti Kivilahti <olli-antti.kivilahti at jns.fi> ---
Hi there!
Awesome that somebody else is in flames about Cucumber!

I have been writing the Cucumber tests into another directory structure, and I
have encountered some issues with it.

My file hierarchy:

kohaclone/t/Cucumber/runCucumberTests.pl #Binds
*::Cucumber::Manual::Integration
                    #And runs all Cucumber tests.
kohaclone/t/Cucumber/Overdues/features/*.feature   #Feature definitions
kohaclone/t/Cucumber/Overdues/features/step_definitions/*_steps.pl #Step
handlers
kohaclone/t/Cucumber/TestObjects/Koha/Overdues/*.pm #Packages to actually
                    #implement the test code. I cannot set debugger breakpoints
                    #into the step-files, because of how the Test::BDD-modules
                    #load them as code closures, so I implement the business
logic
                    #in the TestObjects. Return the comparable values and run
the
                    #Test::More function on the returned values, eg two objects
or
                    #an error code.


Note regarding passing test data arrays in the Scenario description:
    Examples:
      | branchCode | borrowerCategory | letterNumber |
      |            | S                | 1            |
      |            | S                | 2            |
      |            | S                | 3            |
      |            | PT               | 1            |
      |            | PT               | 2            |
      |            | PT               | 3            |
      | CPL        | PT               | 1            |
      | CPL        | PT               | 2            |
      | FTL        | YA               | 1            |
      | FTL        | YA               | 2            |
      | FTL        | YA               | 3            |

Instead of getting the array values from the step-definition regexp, you can
get them from the StepContext-object:
See my attachment scenarioNumberForTableDriveScenarios.txt

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list