Skip to content

how to use negate assertion (not equal / is not empty) #2

@muhfaris

Description

@muhfaris

Hi, i try to write test auth with assertion the token is not empty ( not equal = '').
I can't use the want key, do you know how to accomplish it?

this sample from documentation

name: auth and get user
stages:
  - name: auth
    request:
      url: "https://dummyjson.com/auth/login"
      method: POST
      formData:
        username: kminchelle
        password: 0lelplR
    assert:
      status: 200
    export:
      body:
        - select: .id
          as: userId # setting id as userId variable
        - select: .token
          as: token # setting token id as variable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions