I wrote a junit 4 test case. The test is using selenium web driver. It works fine when running from eclipse. I then copied the exported jar file to jmeter lib/junit folder. The class name and test name is populating when I am selecting Search for Junit 4 annotations checkbox. You can find this from screenshot.
enter image description here
But as soon as I start load test by clicking the green play button, the Search for Junit 4 annotations checkbox gets cleared and thereby no class and test name is passed to the load test. Please guide me.
-
1i also faced the same issue i reinstalled the fresh copy of jmeter with required plugins.sameer joshi– sameer joshi2016年04月22日 07:34:24 +00:00Commented Apr 22, 2016 at 7:34
2 Answers 2
I see the same with version 2.13, I actually tried 2.11 and the checkbox is not being cleared. Try downloading version 2.11 from https://archive.apache.org/dist/jmeter/binaries/ (haven't tried 2.12)
-
In my opinion this should be a comment.bish– bish2015年10月06日 06:05:44 +00:00Commented Oct 6, 2015 at 6:05
Perhaps something is wrong with your setup, for instance you didn't copy Selenium libraries to JMeter's classpath (/lib folder of your JMeter installation). JMeter does not "discard" JUnit4 checkbox, moreover if you save your file and reopen it - it will persist. So check jmeter.log file for any warnings and errors and resolve them.
By the way, there is a WebDriver Sampler plugin which provides Selenium integration via custom sampler so you won't need to recompile/replace the jar if you need to update something.