Bug 55457 - Allow JMeter variables in JUnit Request sampler's Constructor String Label
Summary: Allow JMeter variables in JUnit Request sampler's Constructor String Label
Status: NEW
Alias: None
Product: JMeter
Classification: Unclassified
Component: Main (show other bugs)
Version: unspecified
Hardware: All All
: P2 enhancement (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
Depends on:
Reported: 2013-08-20 19:20 UTC by Flavio Cysne
Modified: 2014-06-03 04:59 UTC (History)
2 users (show)

Java Classes (1.69 KB, application/x-zip-compressed)
2014-05-28 13:39 UTC, Tejas
Jmeter Jmx file (5.41 KB, text/plain)
2014-05-28 13:40 UTC, Tejas
Snapshots (497.06 KB, application/x-zip-compressed)
2014-05-28 13:43 UTC, Tejas

Note You need to log in before you can comment on or make changes to this bug.
Description Flavio Cysne 2013-08-20 19:20:52 UTC
JUnit Request sampler is not converting variables in Constructor String Label field to their values.

In JUnitTestSamplerGui class, the method modifyTestElement is setting the constructorString property of JUnitSamper, when it should use the JUnitSampler.setProperty method to define a StringProperty with constructorLabel text.
Comment 1 Philippe Mouawad 2013-08-20 21:54:27 UTC
Could you provide a Test Plan with simple JUnit test class to speedup fix ?

Comment 2 Tejas 2014-05-28 13:39:25 UTC
Created attachment 31672 [details]
Java Classes
Comment 3 Tejas 2014-05-28 13:40:27 UTC
Created attachment 31673 [details]
Jmeter Jmx file
Comment 4 Tejas 2014-05-28 13:43:54 UTC
Created attachment 31674 [details]
Comment 5 Tejas 2014-05-28 13:44:13 UTC
I faces similar problem while passing parameters in Junit code using Jmeter's Junit sampler. PFA Java classes accepting parameter in different formats and jmx saved file.

Also I have included snapshots for the errors occurred during execution.