-
Notifications
You must be signed in to change notification settings - Fork 0
Consecutive requests with CLI do not use #3
Copy link
Copy link
Open
Description
When performing consecutive (one-after-another) requests using the CLI, post response variables are not captured.
Example
Collection: doggy_daycare_collection.zip
- We run the
Create Dogrequest as follows:
fern@fern-zenbook:~/Collections/Doggy_DayCare/Doggy Daycare$ bru run Dogs/Create\ Dog.yml --env Local
Dogs/Create Dog (201 Created) - 30 ms
📊 Execution Summary
┌───────────────┬──────────────┐
│ Metric │ Result │
├───────────────┼──────────────┤
│ Status │ ✓ PASS │
├───────────────┼──────────────┤
│ Requests │ 1 (1 Passed) │
├───────────────┼──────────────┤
│ Tests │ 0/0 │
├───────────────┼──────────────┤
│ Assertions │ 0/0 │
├───────────────┼──────────────┤
│ Duration (ms) │ 30 │
└───────────────┴──────────────┘- Run the
Get Dogrequest as follows:
bru run Dogs/Get\ Dog.yml --env Local
Dogs/Get Dog (404 Not Found) - 15 ms
Tests
✕ should return 200 OK
expected 404 to equal 200
✕ should return correct content type
expected 'text/plain; charset=utf-8' to include 'application/json'
✕ should have valid dog fields
expected 'dog not found\n' to have property 'name'
Assertions
✕ res.status: eq 200
expected 404 to equal 200
✕ res.body.id: eq {{newDogId}}
expected undefined to equal '{{newDogId}}'
📊 Execution Summary
┌───────────────┬──────────────┐
│ Metric │ Result │
├───────────────┼──────────────┤
│ Status │ ✗ FAIL │
├───────────────┼──────────────┤
│ Requests │ 1 (1 Failed) │
├───────────────┼──────────────┤
│ Tests │ 0/3 │
├───────────────┼──────────────┤
│ Assertions │ 0/2 │
├───────────────┼──────────────┤
│ Duration (ms) │ 15 │
└───────────────┴──────────────┘We see the Get Dog request fail because {{newDogId}} is never set in Create Dog event hough it is part of the post script.
Other Questions
- Is it possible to see the response using the Bruno CLI?
- Do sequences (1,2,...) need to be set manually?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels