How to aggregate build status of multie Jenkins jobs that run HP performance centre script - performance

I have almost 50 freestyle Jenkins builds that run as many performance centre tests everyday morning and evening. Currently I am getting status of these individual runs on email but would like to consolidate the results in one e-mail. Now problem with this is output of Jenkins build is always pass when it is able to run pc tests. To find actual result I need to see the artifact that contains HTML result. Is there a way I can read these individual HTML output and group them in one report. Like
Dev test prod
Test1 pass fails pass
Test2 fail pass pass
Test3 pass pass pass
I have little programming or scripting exp so pls forgive me for not using much resources on my own

You may use build result trigger plugin to monitor as many jobs required. For consolidating use tutorial HTML Agility Pack

Related

How I can set up Jmeter to give me daily results

I've started using Jmeter to run daily performance tests, and have also just figured out how to produce an HTML dashboard.
What I need to do now is find a way to run Jmeter every day, producing an HMTL dashboard of the results, but with comparisons of the results of the last few days. This would mean adding to the data of existing files instead of creating a new HTML dashboard every day.
Can anyone help me with this?
The easiest solution is adding your JMeter test under Jenkins control.
Jenkins provides:
Flexible mechanism of scheduling a job
There is a Performance Plugin for Jenkins which automatically analyses current and previous builds and displays performance trend chart on JMeter Dashboard
Alternatively you can schedule JMeter runs using i.e. Windows Task Scheduler and compare the current run with the previous one using Merge Results plugin

How Can I compare output of 2 different JMeter runs automatically?

I want to compare 2 different jmeter runs.
I have a jenkins job to do that which triggers jmx which in turn call Rest APIs.
Lets say, I executed Jmeter run for one time. I will refer this as run 1
Now, after 30 minutes, I will again run the same jenkins job and will again run the jmeter test. I will refer to it as run 2.
So, now i have 2 runs and i want to compare run1 and run2, specifically the response time.
How can I automate that so that everytime this happens, i can have the difference in response time of APIs ?
I tried searching, found few articles (Compare results from a previous test in jmeter) but it did not really help :(
Please let me know how can this be achieved ?
You can use MergeResults plugin in order to compare 2 test executions and plot execution chart and/or have differences in the CSV file.
If you want to run it in non-GUI mode from Jenkins job - go for JMeterPluginsCMD Command Line Tool which has MergeResults plugin to run it in command-line mode.
You can install both the plugins using JMeter Plugins Manager

Run Scenarios with time constrain on Jenkins using ruby cucumber framework

I have two scenarios, scenario 1 should run at 5:00 PM everyday. Gather the DB results from it and save it on yaml file. I have to use these results to run scenario 2 which needs to be run next day at 8AM. How can I implement this on Jenkins.
Write now I am trying to implement through rake task. My logic is if the yaml file is present run scenario 2 or else run scenario 1.
Is there a better way to do it?
I need these two scenarios on the same jenkins job.

Run Jenkins Job Based on Another Job's Status

I have a number of different projects, with Jenkins CI jobs configured for each of them to run tests. When I create a new release, I have a second job that coordinates between a number of different jobs that go over each of the modules in the projects and updates the versions and the dependencies in the pom.xml's. I would like to make the "update" job conditional on the status of all the CI jobs - meaning that if one of the CI jobs is not green, then the update job will not run at all.
I had a look at the Run Condition Plugin as well as the Conditional BuildStep Plugin, however it does not seem possible do configure them to be dependent on the status of another Jenkins job.
you could hit the other jobs via the API at [JOB_URL]/lastCompletedBuild/api/json and verify the result for each.
to mess around with this:
curl `[JOB_URL]/lastCompletedBuild/api/json` | jq '.result'
you probably want result to say SUCCESS.
this is not fancy, but you don't want fancy in CI; you want something that is not likely to break when you upgrade jenkins. :)
Have a [https://wiki.jenkins.io/display/JENKINS/Multijob+Plugin] ["Multijob Plugin"] ,
In your case, you can add a job in first step and configure in that step, at which result condition of first step, you want to run second step.
Again, in second step, you can configure one/many jobs and can also configure if you want to run them in parallel.

Jenkins Integration/Unit Testing

My group will be implementing CI using Jenkins. As such, I want to make sure that any unit and/or integration tests we create integrate easily with Jenkins. We have several different technologies in our stack we are using from C++ code to Oracle PL/SQL packages to Groovy code. We want to develop test drivers (code that wraps and tests these individual code units) that we can integrate with Jenkins so that these tests are automatically run when we perform commits (git) as well as on a nightly basis. My question is, what are the best practices for writing these test drivers so that they will easily integrate with Jenkins when we implement it?
For example, we have have a PL/SQL stored procedure that we want to run tests against as part of our CI testing. I could write a bash shell script that wraps calls to it, I could write a Java program that calls it. Basically I could wrap it in anything. Then the next question is...is there some sort of standard for outputting results so that Jenkins can easily determine if the test passed or failed?
.is there some sort of standard for outputting results so that Jenkins
can easily determine if the test passed or failed?
If your test results are compliant with Junit results,jenkins have junit plugin which give you the better way for tracing test reports (result trend graph) and also test result archiving. converting ant test log to Junit format easier one.
useful links:
http://nose2.readthedocs.org/en/latest/plugins/junitxml.html
https://wiki.jenkins-ci.org/display/JENKINS/JUnit+Plugin
https://wiki.jenkins-ci.org/display/JENKINS/xUnit+Plugin
Jenkins and JUnit
Basically I could wrap it in anything.
I personally prefer to go with Java among your choices.because it give you better Api to create xml files
Use python unittest to wrap any of your tests.
Produce junit xml test results.
One easy way of getting any python unittest to write out junit is from command-line.
yum install pytest
And call your test script like this:
py.test --junitxml result.xml testscript.py
And in jenkins build configuration Post-build actions Add a "Publish JUnit test result report" action with result.xml and any more test result files you produce.
https://docs.python.org/2.7/library/unittest.html
This is just one way of producing junit xml results with python. There are a good few other methods either using unittest module or junitxml or others.

Resources