tguzik / m2u Goto Github PK
View Code? Open in Web Editor NEWJMeter JTL to JUnit reports converter
License: GNU General Public License v2.0
JMeter JTL to JUnit reports converter
License: GNU General Public License v2.0
Good day,
Hoping to get some help with the following:
Jar file generated, but when I am running it - get the error 'no main manifest attribute'.
Thank you,
Natasha
This field is a String value when connection timeouts occur. It seems to be unused so can be dropped.
This is the error I receive:
Failed to execute goal org.projectlombok:lombok-maven-plugin:1.16.14.0:delombok (default) on project m2u: Unable to delombok: InvocationTargetException: /m2u/target/generated-sources/delombok/com/tguzik/m2u/data/junit/Error.java (No such file or directory)
I'm relatively new to all things linux based, but I've tried modifying the pom and a few other things to no avail
tguzik, thank you very much for taking the time to create this utility!
I am however having a little trouble getting it to work and was hoping maybe you can lend a hand, I get the feeling I missing something.
When I attempt convert a sample JTL file, I get a NullPointerException and I am not sure where to even start troubleshooting this, perhaps you or someone has encountered this before.
The error is below:
xception in thread "main" java.lang.NullPointerException
at com.tguzik.m2u.data.JtlToJunitConverter.convertSample(JtlToJunitConverter.java:53)
at com.tguzik.m2u.data.JtlToJunitConverter.convertHttpSample(JtlToJunitConverter.java:86)
at com.tguzik.m2u.data.JtlToJunitConverter.apply(JtlToJunitConverter.java:38)
at com.tguzik.m2u.application.Main.process(Main.java:34)
at com.tguzik.m2u.application.Main.main(Main.java:19)
I have also attached the build log and the sample JTL file I am trying to convert.
Any help would be greatly appreciated as this utility will be infinitely useful!
m2u_buildlog.log.txt
results.xml.txt
Hi,
I have installed this plugin & was able to run it successfully. When I ran the plugin, I see that this plugin takes "jmeter_thread_name" as "testcase-classname" for junit.xml. I am using JMeter for API testing & all testcases are written as "label" and not "threadname".
Is there any way to map "label" from jtl report to "testcase-classname" in junit report?
Sample JTL Report:
<testResults version="1.2">
<httpSample t="197" lt="197" ts="1521511843388" s="true" **lb="Delete version details"** rc="405" rm="Method Not Allowed" tn="Get Version 1-1" dt="text" by="618" ng="1" na="1">
......
......
</httpSample>
<httpSample t="80" lt="80" ts="1521511843697" s="true" **lb="Verify version gets deleted"** rc="200" rm="OK" tn="Get Version 1-1" dt="text" by="1221" ng="1" na="1">
......
......
</httpSample>
</testResults>
Sample JUnit XML report:
<testsuites disabled="0" errors="0" failures="0" name="jmeter" tests="0" time="0">
<testsuite disabled="0" errors="0" failures="0" tests="3" name="jmeter" skipped="0" time="0.331" timestamp="0">
<properties/>
<testcase assertions="1" _**classname="Get Version 1-1"**_ name="Get Version 1-1" time="0.171">
.....
.....
</testcase>
<testcase assertions="2" **_classname="Get Version 1-1"_** name="Get Version 1-1" time="0.082">
......
......
</testcase>
</testsuite>
</testsuites>
Error:
Exception in thread "main" com.thoughtworks.xstream.io.StreamException: : only whitespace content allowed before start tag and not t (position: START_DOCUMENT seen t... @1:1)
at com.thoughtworks.xstream.io.xml.XppReader.pullNextEvent(XppReader.java:124)
at com.thoughtworks.xstream.io.xml.AbstractPullReader.readRealEvent(AbstractPullReader.java:148)
at com.thoughtworks.xstream.io.xml.AbstractPullReader.readEvent(AbstractPullReader.java:141)
at com.thoughtworks.xstream.io.xml.AbstractPullReader.move(AbstractPullReader.java:118)
at com.thoughtworks.xstream.io.xml.AbstractPullReader.moveDown(AbstractPullReader.java:103)
at com.thoughtworks.xstream.io.xml.XppReader.(XppReader.java:63)
at com.thoughtworks.xstream.io.xml.AbstractXppDriver.createReader(AbstractXppDriver.java:54)
at com.thoughtworks.xstream.XStream.fromXML(XStream.java:1040)
at com.tguzik.util.xstream.AbstractXStreamConverter.fromXML(AbstractXStreamConverter.java:22)
at com.tguzik.m2u.application.Main.run(Main.java:27)
at com.tguzik.m2u.application.Main.main(Main.java:20)
Caused by: org.xmlpull.v1.XmlPullParserException: only whitespace content allowed before start tag and not t (position: START_DOCUMENT seen t... @1:1)
at org.xmlpull.mxp1.MXParser.parseProlog(MXParser.java:1519)
at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1395)
at org.xmlpull.mxp1.MXParser.next(MXParser.java:1093)
at com.thoughtworks.xstream.io.xml.XppReader.pullNextEvent(XppReader.java:109)
... 10 more
JTL file Results: rename result.txt to result.jtl
[ERROR] Failed to execute goal org.projectlombok:lombok-maven-plugin:1.16.14.0:delombok (default) on project m2u: Execution default of goal org.projectlombok:lombok-maven-plugin:1.16.14.0:delombok failed: A required class was missing while executing org.projectlombok:lombok-maven-plugin:1.16.14.0:delombok: com/sun/tools/javac/util/Context
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>org.projectlombok:lombok-maven-plugin:1.16.14.0
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/C:/Users/vebora/.m2/repository/org/projectlombok/lombok-maven-plugin/1.16.14.0/lombok-maven-plugin-1.16.14.0.jar
[ERROR] urls[1] = file:/C:/Users/vebora/.m2/repository/org/apache/commons/commons-lang3/3.5/commons-lang3-3.5.jar
[ERROR] urls[2] = file:/C:/Users/vebora/.m2/repository/org/projectlombok/lombok/1.16.14/lombok-1.16.14.jar
[ERROR] urls[3] = file:/C:/Users/vebora/.m2/repository/org/sonatype/plexus/plexus-build-api/0.0.7/plexus-build-api-0.0.7.jar
[ERROR] urls[4] = file:/C:/Users/vebora/.m2/repository/org/codehaus/plexus/plexus-utils/1.5.8/plexus-utils-1.5.8.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import from realm ClassRealm[maven.api, parent: null]]
[ERROR]
[ERROR] -----------------------------------------------------
[ERROR] : com.sun.tools.javac.util.Context
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException
Hey,
Thanks for taking the time to build this tool. I downloaded the zip file and ran the mvn command however when I try to use the outputted Jar file I get the following:
"Error: Could not find or load main class com.tguzik."
Here's the command I'm running:
java -jar m2u.jar --input /src/test/jmeter/results/xml/JMeterResults-as-nirvana-11112014043629PM.jtl --output jmeter.xml
<testsuite tests="0" tests="522999" name="jmeter" skipped="0" disabled="0" errors="0" failures="45" timestamp="0">
<testsuite tests="522999" disabled="0" errors="0" failures="45" name="jmeter" skipped="0" tests="522999" timestamp="0">
Only one attribute "tests" should be set
<?xml version="1.0" encoding="UTF-8"?>
<testResults version="1.2">
<httpSample t="705" lt="705" ts="1442842365971" s="true" lb="Authentication GET " rc="200" rm="OK" tn="Suggest Test Plan 1-1" dt="text" by="4000" ng="1" na="1">
<assertionResult>
<name>Assertion:Response code</name>
<failure>false</failure>
<error>false</error>
</assertionResult>
<responseData class="java.lang.String">resp</responseData>
<cookies class="java.lang.String"></cookies>
<method class="java.lang.String">GET</method>
<queryString class="java.lang.String"></queryString>
</httpSample>
</testResults>
java -jar m2u.jar --input newsuggest.jtl --output newsuggest.xml
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.