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.
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.
My Class was not extending TestCase.
import junit.framework.TestCase;
Then extend the class to TestCase. This resolved this issue.
Related
When i select any class and testmethod as Junit 4 test case, it disapears as soon as i click something else and a default test case comes up that gives me a null exception,for eg: groovy test case/Selenese Test Case. I require the Groovy Library for my test case.
This happens only in Jmeter 2.13, but this unchecking thing does not happen in Jmeter 2.11, but i need to use the Backend Listener that is only in Jmeter 2.13.
Image that shows the selection of the junit testcase
Image that shows that the test selected is rechecked by some default groovy test case/Selenese Test case
Screenshot of jmeter using Nightly Build
I need a solution to this, please help me out. Thank you
It appears you are facing a NPE in a process related to undo/redo feature:
https://github.com/apache/jmeter/blob/v2_13/src/core/org/apache/jmeter/gui/GuiPackage.java#L853
Could you try to remove jmeter-plugins 1.4.0 which is a developer snapshot.
Try without it, and if it works report a bug to jmeter-plugins.org
Then try with jmeter-plugins-1.3.1 which is the stable version, it might work but the bug might also be in it.
I created bug:
- https://bz.apache.org/bugzilla/show_bug.cgi?id=58795
It is now fixed in nightly build so you will have more informations to provide to jmeter-plugins or jmeter.
To use nightly build:
http://jmeter.apache.org/nightly.html
Download the _bin and _lib files
Unpack the archives into the same directory structure
The other archives are not needed to run JMeter.
Trying to run SpecFlow test I receive an error:
Missing resource DefaultSkeletonTemplates.sftemplates
I have:
The feature file
Feature class (generated code)
Feature step
All classes bound
What could be the problem?
I've run into this issue when the step isn't defined or can't be found.
You can run the test using statlight.exe on the command line to see SpecFlow's detailed output on the console.
In the feature file, right-click on the step and select "Go To Step Definition".
If a step can't be found, a message appears with the text "No matching step binding found for this step! Do you want to copy the step binding skeleton to the clipboard?"
Select Yes to copy the code for the step to the clipboard.
Then paste the code in a SpecFlow bound class and try running the scenario again.
I have an ASP .NET MVC project that is built in a Jenkins project. We're using the nUnit plugin to fangle the output from our unit tests as a post-build step.
I've just added Jasmine tests for the javascript in the project and added a step in MSBuild to have Chutzpah run the Jasmine tests and output the results in jUnit format.
I added a post build step to process the jUnit results file and Jenkins runs the build and presents two 'Test Results' links in the Build result page...
However, when I click those links both go to the same result. When I left yesterday it was the nUnit results this morning it's the jUnit results so I'm guessing that it's just whichever finished last?
Is this possible? Do I need to do things a different way?
I would try just using the xUnit plugin, that way you can configure it to take bothe the junit and nunit test results all in a single publisher.
There is a bug in Jenkins related to this: NUnit Plugin fails to merge Unit test reports with unit tests split on basis of category.
To get around this, just put your NUnit post build action as the last that it works!
I was trying to integrate my cucumber tests with maven-cucumber-reporting(from masterthought.net). I downloaded their Jenkins plugin and incorporated in my pom.xml file.
I have 2 tests in my eclipse project and when I ran these tests though maven it gets executed successfully. But, when I see my HTML report and also the cucumber.json , it displays details of only one test case.
I have been using Cucumber-JVM
Can you please let me know if I'm going wrong somewhere.
Thanks,
Prashanth
Do you have two RunCukesTest files for your two tests? If so make sure that you are creating unique json files for each tests (Note Test1.json below, make sure you have that distinction for each of your tests). Otherwise they will be overwritten by each other and you will only see the results from your last test.
#Cucumber.Options(format = { "pretty", "html:target/cucumber-html-report",
"json-pretty:target/Test1.json" },
features = { "src/test/resources/features" })
we need to do some integration testing of some Java classes which we want to run inside a Weblogic server. We have a JUnit test suite that runs a set of Junit test classes, and I would like to know if is a good idea to write a JSP that runs the test suite and prints out the results in a graphical way, in case we won't be able to access via SSH to the server and run the tests via console.
Step 1: We upload the jar file with the tests and the JSP
Step 2: We call the JSP via a browser
Step 3: Profit! Our tests are running and we have visual feedback.
Am I right or wrong? Thanks for your advices!
You should be able to use Cactus to do this,
See the following article for reference:
http://www.oracle.com/technetwork/articles/server-side-unit-tests-096611.html
That should save you having to write extra code, not sure about visual feedback but the Cactus page seems to suggest that when running in a servlet container like Tomcat you should get the results visually:
http://jakarta.apache.org/cactus/integration/howto_tomcat.html