for-GET / katt

KATT (Klarna API Testing Tool) is an HTTP-based API testing tool for Erlang.
https://github.com/for-GET/katt
Apache License 2.0
119 stars 16 forks source link

add textual diff for strings. fix #20 #25

Closed andreineculau closed 8 years ago

andreineculau commented 8 years ago

NOTE: a backwards-incompatible change, a failure now has expected, actual value, but also "details" (in this case, a text_diff detail)

An example of the new JSON output

      "errors": [
        {
          "reason": "not_equal",
          "key": "/body/args/whoarewe",
          "expected": "asdMikeJoe",
          "actual": "Mike_and_Joe",
          "text_diff": [
            {
              "del": "asd"
            },
            {
              "eq": "Mike"
            },
            {
              "ins": "_and_"
            },
            {
              "eq": "Joe"
            }
          ]
        }
      ]