asyrjasalo / RESTinstance

Robot Framework library for RESTful JSON APIs
https://pypi.org/project/RESTinstance
GNU Lesser General Public License v3.0
209 stars 83 forks source link

Output doesn't work in teardown stage if Expect response failed #40

Closed allenorac closed 3 years ago

allenorac commented 6 years ago

The test case failed when validating response json schema, the get request succeed and get response, but I can't get the 'Output' in teardown stage to debug issue.

*** Test Cases ***
Get List
    [Setup]        Expect response      ${CURDIR}/data/list.json
    GET             /api/list
    [Teardown]      Output

Result:

Get Position Template List                                            | FAIL |
1 is not one of [0]

Failed validating 'enum' in schema['properties']['status']:
    {'enum': [0], 'type': 'integer'}

On instance['status']:
    1

Also teardown failed:
No instances: No requests made, and no previous instances loaded in the library import.
------------------------------------------------------------------------------
1 critical test, 0 passed, 1 failed
1 test total, 0 passed, 1 failed
Atihinen commented 3 years ago

Hi,

is this still an issue or did you manage to fix this one?