filmov
tv
Karate Framework Beginner Class 11: Post Method | Calling Java Code | Headers | Request Method

Показать описание
Feature: sample karate test script
Background:
* url baseURl
Scenario: create user and then get the first user by id
Given path mainURl
* def name = 'Test-' + now()
And request json
* def headValues = { Authorization: 'Bearer 7232803c821bc49a0bd5c56d7df39c5289168e323fb17c5b6b1597d8941e33ef', Content-Type: 'application/json' }
* headers headValues
When method post
Then assert responseStatus == 201
* print response
Background:
* url baseURl
Scenario: create user and then get the first user by id
Given path mainURl
* def name = 'Test-' + now()
And request json
* def headValues = { Authorization: 'Bearer 7232803c821bc49a0bd5c56d7df39c5289168e323fb17c5b6b1597d8941e33ef', Content-Type: 'application/json' }
* headers headValues
When method post
Then assert responseStatus == 201
* print response