'Karate 1.0.1 NullPointerException when sending a number in a PUT request
Going from karate 0.9.5 to 1.0.1 I found that sending a PUT request with a number returns a java.lang.NullPointerException.
e.g.
In v0.9.5 this was working:
Given path 'v1', 'users'
And request 7
When method PUT
Then status 400
Now it returns a NullPointerException:
To reproduce :
@PutTest
Scenario: Put Test
Given url 'https://www.google.com/'
And request 7
When method PUT
Then status 400
Solution 1:[1]
Just make it a string please:
And request '7'
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Peter Thomas |