MQTT Load Testing via Jenkins using JMETER - github

I'm trying to run MQTT test using JMeter on Jenkins. I've integrated maven and used Github repository to run the script. The problem is when i try to run a simple API test, jenkins automatically creates a .jtl file(provided that i've added post build action) In case of MQTT test script, Jenkins Build is successful but the test fails showing this error " no JMeter files matching '*.jtl' have been found.". Why is it so???

Do you use Jenkins performance plugin? If not you should do it.
Do you run JMeter in the Non GUI mode? If not you have to.
In this article how to run JMeter with jenkins you'll find step by step guide for Jenkins configuration for launching JMeter tests.

Related

Error in JMX file generated from Selenium IDE

I generated some JMX script from Selenium IDE using Jmeter Plugin for Selenium.
I could able to generate JMX file from IDE and try to run the same in Jmeter. I am getting Unknown host exception in Jmeter.
Do I need to make some special setting in Jmeter?
I don't have any idea what Jmeter Plugin for Selenium is so I would suggest reach out to this plugin developers.
In regards to converting Selenium tests into JMeter, you can just record the test while it is running in the IDE via JMeter's HTTP(S) Test Script Recorder.
Selenium IDE plugin should respect Firefox Proxy Settings so when you run your test in it JMeter will capture the relevant requests and store them in form of HTTP Request samplers.
Another option is using Taurus tool which has Proxy2JMX module allowing conversion of Selenium tests into JMeter .jmx test scripts, as a bonus you will get automatic correlation of dynamic parameters, it means you won't have to work them arround using post-processors, Taurus will do this for you. See How to Convert Selenium Scripts into the JMX Converter article for more details.

SoapUI build on Windows server TFS

I'm about to deploy a soapui project that is made in the soapui PRO version. Must i have soapui PRO installed on the build server which rund TFS to be able to run the tests?
Since there is no TFS integrated with SoapUI, you may need to install the SoapUI on your build server.
You can call your test using a bat file, add this bat file to your source control so that it is carried accross with the build.Then Add an invoke process to your build template and then call out to the SoapUI test runner.
Here is a bolg telling you how to include SoapUI in your CI build cycle:http://blog.simplecode.eu/post/Soap-UI-testing-with-MsTest

How can I get code coverage reports when testing REST API with TestNG?

I have a question that's very similar to what's discussed here:
Integration Test of REST APIs with Code Coverage
I deployed a war file that exposes the REST APIs to a web server and I'm using TestNG to write test cases for the REST APIs. I'm not unit testing - I'm only end-to-end / integration testing. Currently, I'm running test cases from eclipse in my machine.
My goal is to get coverage reports on the TestNG test cases.
Since the tests are local to my machine and the REST API is deployed in another server, EclEmma doesn't provide any meaningful data when I run the tests cases in my machine.
Is there a way to point EclEmma to the web server instead of my local machine and get the code coverage report?
Would it be better/possible to include the tests in the war file and run the tests from the web server? That should allow me to get the meaningful code coverage report, right?
The easiest way forward in cases like this is normally to start the web server inside of your IDE and run tests with coverage measuring in there. Even better to start the web server from within the tests - then a build tool like maven can also do code coverage reporting.

Sending mail when test fails in Selenium IDE?

I have big website with many registered users and I need to create a looped test with automatically log-in and log-out my test user (one time per hour). It's very easy in Selenium IDE. But next thing is sending an email when logging in will not work. And I don't know how I have to do this. Can Selenium IDE send me an email after every unsuccessful log-in attempt in that test?
You should use a continuous integration tool for that type of thing. Check out Jenkins which is easy to install. Then within Jenkins you create a job that launch your Selenium IDE test (probably through a BATCH or SHELL script). And within this Jenkins job, you can configure to receive an email in case of failure.
Once you have this Jenkins CI in place, you will be able to use it to launch all sort of jobs. Not only the test, but also the build and other engineering automated tasks. That's become the backbone of your Engineering organisation along with your SCM and Issue Tracker.
As Laurent Said you can use Jenkins to email you when tests fail but you will have to use Seleniumhq instead of Selenium-ide.
The good news is that you can still write your tests in selenium-ide and then transfer them across to seleniumhq and let Jenkins take it from there.

Jenkins job generator

On a project Im working on we have a pretty advanced command-line interface to build, test, package and deploy software.
Now we want to use jenkins as a front-end to this CLI and we want to be able to generate job configurations. We want the interface simple, the user only supply a couple of parameters and jenkins will then query our CLI and generate the needed build steps.
Simple use case:
Create new domain-specific-job
Select Product
Jenkins now queries the CLI and updates the next drop-down with the products different brances.
Select branch
Jenkins generates the build steps by querying the build steps
As Im new to plugin development in Jenkins (and jenkins overall) I would love to get some tips and pointers to where to start.
There are several plugins to generate jobs in Jenkins, there is also the Jenkins CLI.
I think the better approach would be to use the Jenkins CLI to generate Jobs from the outside by developing a cool GUI tool integrating both CLIs nicely.
Here is an example: http://tikalk.com/alm/using-jenkins-cli-job-gen
If you really require to do it in the Jenkins front-end then here are some pointers on possible plugins:
job DSL plugin https://wiki.jenkins-ci.org/display/JENKINS/Job+DSL+Plugin
jobcopy builder plugin https://wiki.jenkins-ci.org/display/JENKINS/Jobcopy+Builder+plugin
job generator plugin https://wiki.jenkins-ci.org/display/JENKINS/Job+Generator+Plugin
Take a look at jenkins-job-builder from jenkins, it could help you to abstract your work and use command line to create the jenkins jobs.