Version 1.7.0 Breaks Boolean Capture
See original GitHub issueI have this step that uses the artillery expect plugin and passes in version 1.6.2, but fails in 1.7.0.
- post:
url: '/verify/reset?email=success@simulator.amazonses.com'
headers:
password: 5f4dcc3b5aa765d61d8327deb882cf99
auth:
user: application
pass: secret
capture:
- json: $.email.address
as: email
- json: $.email.verified
as: verified
expect:
- statusCode: 200
- hasProperty: creationTime
- hasProperty: lastUpdateTime
- equals:
- "{{ email }}"
- "success@simulator.amazonses.com"
- equals:
- "{{ verified }}"
- false
It’s failing with this error:
not ok equals true, false
expected: all values to be equal
got: true, false
Request params:
http://localhost:8080/verify/reset?email=success@simulator.amazonses.com
""
Headers:
date : Wed, 12 May 2021 22:33:46 GMT
content-type : application/json
content-length : 254
Body:
"{\"email\":{\"address\":\"success@simulator.amazonses.com\",\"verified\":false,\"verificationToken\":null},\"password\":\"5f4dcc3b5aa765d61d8327deb882cf99\",\"attributes\":[\"hello\",\"world\"],\"creationTime\":1620858825642,\"uniqueID\":\"ABC123\",\"lastUpdateTime\":1620858826475}"
User variables:
target : http://localhost:8080
$environment : undefined
testMetrics : false
$uuid : ccc8885d-e7d1-4038-b533-1b1f83083dcb
email : success@simulator.amazonses.com
creationOriginal : 1620858825642
errorString : Unable to validate user with provided credentials. (User: success@simulator.amazonses.com)
creationGet : 1620858825642
verificationToken : c7bebcfc-89cd-4a98-91bb-343587572a8e
verified : true
It looks like the capture here is not working correctly:
- json: $.email.verified
as: verified
Because the JSON body has verified
set to false, but artillery thinks it is set to true.
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
What's new in Kotlin 1.7.0
Here is a list of the major updates in this version: The new Kotlin K2 compiler is in Alpha now, and it offers...
Read more >Activity - Android Developers
Version 1.7.0 -alpha02 contains these commits. Bug Fixes ... The new CaptureVideo ActivityResultContract returns a boolean to your ...
Read more >kotlin/ChangeLog.md at master · JetBrains/kotlin - GitHub
MyClass' is compiled by a pre-release version of Kotlin and cannot be loaded by this version of the compiler" but builds fine; KT-47203...
Read more >Check if null Boolean is true results in exception
When you have a boolean it can be either true or false . Yet when you have a Boolean it can be either...
Read more >Changelog | Burst | 1.7.4 - Unity - Manual
One Definition Rule optimisation would break if multiple modules shared static ... Upgraded Burst to use LLVM Version 12.0.0 by default, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
#1040 seems related
Ah, I think this line may be the problem:
https://github.com/artilleryio/artillery/blame/v1.6.x/core/lib/engine_util.js#L345 (changed between 1.6 and 1.7)
Because
v.value
isfalse
(set correctly), the very first check returnstrue
andisCaptureFailed()
returns true. Checking thattypeof v.value === 'undefined'
instead of!v.value
should fix it.If you have a bit of time to test that & package the fix up as a PR that would be awesome. 😃