@brainhubeu/cucumber-steps

    1.8.7 • Public • Published

    cucumber-steps

    Quick start for testing with cucumber

    Hire us

    CircleCI Last commit license PRs Welcome Renovate enabled

    Downloads Activity Minified npm Contributors

    Getting started

    Install library

    with npm: npm i --save-dev @brainhubeu/cucumber-steps

    or with yarn: yarn add --dev @brainhubeu/cucumber-steps

    Add following in anywhere in your step-definitions directory

    import { defineSupportCode } from 'cucumber';
    import stepsSupport from '@brainhubeu/cucumber-steps';
     
    defineSupportCode(stepsSupport);

    Available steps

    Setting headers

    Given I set header "heder-name" with value "header-value"
    

    Sending request

    When I send a "METHOD" request to "/path"
    

    Sending request with body

    When I send a "METHOD" request to "/path" with body:
      """
      {
        "name": "Wonderful coffee",
        "project": {
          "name": "Coffee"
        }
      }
      """
    

    Chcking response code

    Then the response code should be 111
    

    Checking response body

    Then the JSON should match pattern
      """
      {
        "name": "Wonderful coffee",
        "project": {
          "name": "Coffee"
        }
      }
      """
    

    Install

    npm i @brainhubeu/cucumber-steps

    DownloadsWeekly Downloads

    180

    Version

    1.8.7

    License

    MIT

    Unpacked Size

    31.4 kB

    Total Files

    47

    Last publish

    Collaborators

    • szymon.morawski
    • szulcd2
    • dyoda
    • drymek
    • brainhub-adam
    • brainhubeu-ci
    • kkoscielniak
    • rkostrzewski
    • nikodem_wrona
    • roberthebel