Skip to content

Latest commit

 

History

History
83 lines (70 loc) · 3.76 KB

README.md

File metadata and controls

83 lines (70 loc) · 3.76 KB

Substeps RestDriver Build Status Maven Central Codacy Grade Badge Codacy Coverage Badge codecov.io Coverage Status

Project to provide a new type of Driver for use with Substeps, that will enable the ability to testing of rest endpoints by creating requests and asserting the responses.

Basic Requirements

  • Java 8
  • Substeps 1.0.1

Documentation

Include as Maven dependency

<dependency>
    <groupId>uk.co.baconi.substeps</groupId>
    <artifactId>restdriver-substeps</artifactId>
    <version>0.0.6</version>
</dependency>

Features that might be included in the future

  • XML Support
  • Bug fixing
  • Other enhancements

Changes in 0.0.6

  • Ability to extract data
  • Ability to set named path parameters, both manual and extracted data
  • Ability to assert based on extracted data

Changes in 0.0.5

  • Ability to send a list of json objects in the body
  • Ability to send json loaded from a file or url in the body

Changes in 0.0.4

  • Moved to use the org.substeps fork of Substeps
  • Setup project to generated and provide Substep implementation documentation
  • More ways to configure urls
  • Ways of asserting response times

Changes in 0.0.3

  • More finders
  • More assertions
  • Move to using rest assured for the requesting and asserting

Changes in 0.0.2

  • Corrections to the glossary metadata, without the fix we cannot build a glossary of the steps in projects that use this library.

Changes in 0.0.1

  • Build rest requests.
  • Add headers in key value pairs.
  • Add cookies in key value pairs.
  • Add data to send in key/value pairs
  • Choose either a simple JSON or Key Pair builders to produce a suitable request body.
  • Set connect timeout, overriding defaults.
  • Set socket timeout, overriding defaults.
  • Set user agent, overriding defaults.
  • Defaults are stored in Typesafe Config properties.
  • Basic rest assertions:
    • Status Code
    • Status Code in Range
    • Reason Phrase
  • Basic JSON finding via JsonPath.
  • Basic JSON asserting via JsonPath and very basic types.
    • Object - only that it is one, haven't worked out best way to assert contents.
    • Array - only that it is one, haven't worked out best way to assert contents.
    • String - both finding and matching, ignoring whitespace
    • Number - both finding and matching, including decimals
  • Examples / documentation on how to use.
  • Available in maven central

Useful information

  • Scopes - can be the following values, they are thread safe scopes where data can be stored during substep runs:
    • SUITE
    • FEATURE
    • SCENARIO
    • SCENARIO_BACKGROUND
    • SCENARIO_OUTLINE
    • SCENARIO_OUTLINE_ROW
    • STEP