Skip to content

assert http response body against files #48

Open
@staabm

Description

I wasnt able to find a example which shows how it is possible to assert a expected http response body against the contents of a local file.

I imagine something like

scenario
    visit url('/blog/')
        name "Blog homepage"
        assert main.peak_memory < 10M
        expect body() == file(/my/local/file/with/expected.html)

IMO this would enhance readability of my test-scenario file, as I dont have huge blobs of html in them (and maybe might even allow me to generated the expected http response body using other tools)
Is this kind of operation supported?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions