dnafication / saz2jmx

A utility to convert fiddler capture (saz) to jmeter script (jmx)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot read property value

jerryrehy opened this issue · comments

C:\Users\j.rehak\node_modules\saz2jmx\lib\jmx.js:73
)[0].value;
^

TypeError: Cannot read property 'value' of undefined
at JMX._createHeader (C:\Users\j.rehak\node_modules\saz2jmx\lib\jmx.js:73:9)
at JMX.addNewHTTPSampler (C:\Users\j.rehak\node_modules\saz2jmx\lib\jmx.js:215:32)
at C:\Users\j.rehak\node_modules\saz2jmx\lib\index.js:29:13
at Array.forEach ()
at C:\Users\j.rehak\node_modules\saz2jmx\lib\index.js:28:8
at ZipFile. (C:\Users\j.rehak\node_modules\saz2js\lib\index.js:152:7)
at ZipFile.emit (events.js:210:5)
at FdSlicer. (C:\Users\j.rehak\node_modules\yauzl\index.js:202:10)
at Object.onceWrapper (events.js:299:28)
at FdSlicer.emit (events.js:210:5)

@jerryrehy sorry about the late reply. Do you have any sample saz file for which this issue is appearing?
I might've forgot to mention. I have tested this with only 'Fiddler 4', if they've made some change in the data structure in the later versions, the tool may break.

Hi @dnafication , I have the exact same error running v1.20 with a SAZ saved from Fiddler 4 v5.0.20202.18177

I have attached a SAZ example export (inside the ZIP file) that gives the exact same error as the original poster.

test.zip

I hope this is of help.

Thanks for reporting. I will have a look. Didn't know anyone used this library 😄

Hi @sheldonbotha1979
this has been fixed and released a patch 1.2.1

Install it by running

npm i saz2jmx@1.2.1

@dnafication thank you very much!

The issue was due to saz file including all the CONNECT requests. if you clean up the saz file in fiddler before running it through, this error wont arise I believe. Also, now you will need to clean the jmx file instead ;)