Home background

Sharing data between tests

Home background

Sharing data between tests

Home background

Sharing data between tests

Test context

When creating tests, there are cases where you need to get response data from a previous request and use it in a subsequent one. Utilizing a shared test context allows you to share data and create dependencies between tests.

Read More

Test context

When creating tests, there are cases where you need to get response data from a previous request and use it in a subsequent one. Utilizing a shared test context allows you to share data and create dependencies between tests.

Read More

Test context

When creating tests, there are cases where you need to get response data from a previous request and use it in a subsequent one. Utilizing a shared test context allows you to share data and create dependencies between tests.

Read More

baseUrl: https://dummyjson.com
requests:
  - id: auth
    uri: /auth/login
    method: POST
    headers:
      - "Content-Type: application/json"
    body: credentials
    context:
      - name: token
        type: secret
        pattern: \"accessToken\":\s*"([^"]+)
  - dependsOn: auth
    uri: /auth/me
    headers:
      - "Authorization: Bearer ${{ context.token }}"
baseUrl: https://dummyjson.com
requests:
  - id: auth
    uri: /auth/login
    method: POST
    headers:
      - "Content-Type: application/json"
    body: credentials
    context:
      - name: token
        type: secret
        pattern: \"accessToken\":\s*"([^"]+)
  - dependsOn: auth
    uri: /auth/me
    headers:
      - "Authorization: Bearer ${{ context.token }}"

Still have any questions?

Still have any questions?

Still have any questions?