Skip to content
This repository has been archived by the owner on Feb 7, 2022. It is now read-only.

Error: Unrecognized element: ResultCollector #24

Closed
roma-glushko opened this issue Apr 5, 2020 · 5 comments
Closed

Error: Unrecognized element: ResultCollector #24

roma-glushko opened this issue Apr 5, 2020 · 5 comments

Comments

@roma-glushko
Copy link

The tool is throwing an error on meeting ResultCollector element in jmx file:

(node:53160) UnhandledPromiseRejectionWarning: Error: Unrecognized element: ResultCollector
    at element (/Users/glushko/.nvm/versions/node/v12.14.1/lib/node_modules/jmeter-to-k6/src/element.js:50:27)
    at module.exports (/Users/glushko/.nvm/versions/node/v12.14.1/lib/node_modules/jmeter-to-k6/src/element.js:1:40)
    at elements (/Users/glushko/.nvm/versions/node/v12.14.1/lib/node_modules/jmeter-to-k6/src/elements.js:17:43)
    at module.exports (/Users/glushko/.nvm/versions/node/v12.14.1/lib/node_modules/jmeter-to-k6/src/elements.js:1:40)
    at Object.hashTree (/Users/glushko/.nvm/versions/node/v12.14.1/lib/node_modules/jmeter-to-k6/src/element/hashTree.js:4:10)
    at element (/Users/glushko/.nvm/versions/node/v12.14.1/lib/node_modules/jmeter-to-k6/src/element.js:53:36)
    at module.exports (/Users/glushko/.nvm/versions/node/v12.14.1/lib/node_modules/jmeter-to-k6/src/element.js:1:40)
    at elements (/Users/glushko/.nvm/versions/node/v12.14.1/lib/node_modules/jmeter-to-k6/src/elements.js:17:43)
    at module.exports (/Users/glushko/.nvm/versions/node/v12.14.1/lib/node_modules/jmeter-to-k6/src/elements.js:1:40)
    at Object.TestPlan (/Users/glushko/.nvm/versions/node/v12.14.1/lib/node_modules/jmeter-to-k6/src/element/TestPlan.js:14:17)
(node:53160) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:53160) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Example of the snippet:

<ResultCollector guiclass="StatVisualizer" testclass="ResultCollector" testname="Aggregate Report" enabled="false">
        <boolProp name="ResultCollector.error_logging">false</boolProp>
        <objProp>
          <name>saveConfig</name>
          <value class="SampleSaveConfiguration">
            <time>true</time>
            <latency>true</latency>
            <timestamp>true</timestamp>
            <success>true</success>
            <label>true</label>
            <code>true</code>
            <message>true</message>
            <threadName>true</threadName>
            <dataType>true</dataType>
            <encoding>false</encoding>
            <assertions>true</assertions>
            <subresults>true</subresults>
            <responseData>false</responseData>
            <samplerData>false</samplerData>
            <xml>false</xml>
            <fieldNames>true</fieldNames>
            <responseHeaders>false</responseHeaders>
            <requestHeaders>false</requestHeaders>
            <responseDataOnError>false</responseDataOnError>
            <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage>
            <assertionsResultsToSave>0</assertionsResultsToSave>
            <bytes>true</bytes>
            <threadCounts>true</threadCounts>
            <idleTime>true</idleTime>
          </value>
        </objProp>
        <stringProp name="filename">/tmp/aggregate-jmeter-results.jtl</stringProp>
      <stringProp name="TestPlan.comments">mpaf/tool/fragments/ce/aggregate_report.jmx</stringProp></ResultCollector>
@simskij
Copy link
Contributor

simskij commented Apr 5, 2020

Hey! 👋🏻

Thank you for the report! I’ll have a look and then I will get back to you.

@roma-glushko
Copy link
Author

Hey @simskij have you had a chance to look at this report?

@simskij
Copy link
Contributor

simskij commented Apr 24, 2020

Hey!

First off, sorry for the delay. 🙏🏼

ResultCollector doesn't really mean anything outside of the JMeter world. For instance, k6 automatically provides a result report at the end, albeit not as explorable as in JMeter. With that said, the k6 cloud has these features in case you need to also visualise it and be able to drill down into single requests.

We should probably ignore this element in the future to avoid crashes, but for now, you can just delete that element from your jmx and continue.

Hope that helps

@roma-glushko
Copy link
Author

@simskij no problem at all 👍 Thank you for the replay, I will try to remove those nodes

@simskij
Copy link
Contributor

simskij commented Apr 24, 2020

I actually published a new version, v0.1.19, which should skip those nodes for you adding just a comment in the output about it being skipped. Feel free to give it a spin :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants