How to run jmeter script parallely on Jenkins - jenkins

I want to run jmeter script parallely through jenkins.
currently i have tried BZM-concurrency thread group and Parallel controller to achive this on my local machine, which is working fine. please help me to run it through jenkins, it get finish with success but script never starts. Do i need any plugins on jenkins to achieve this?
my set is shown below, let me know is there any other way to achieve this.

You need the same plugins in Jenkins master (and all the slave if any) which are used in the test plan, the easiest is just to copy the existing JMeter installation folder to Jenkins instance(s)
Alternatively you can install the required plugins using JMeter Plugins Manager
If your Jenkins doesn't have the GUI - it is possible to install the plugins via the command-line

Related

Running jobs in Jenkins slave node using Groovy script

I am confused about whether a Jenkins job can be run using Groovy script in the slave node. I referred a StackOverflow answer [1] which says that System Groovy script jobs can be run in master and not in slave, and to run a job in slave it has to be Groovy script rather than System Groovy Script. Can someone clarify me whether we can run a slave job using System Groovy Script? Since I am trying through Groovy script I am unable to access few Jenkins instances. Please suggest me a better way with an explanation. Thanks in advance
I have finally found that it is only possible to run jobs in Jenkins slave node using Grovvy script. The system groovy script runs inside the Hudson master's JVM. Thus it will have access to all the internal objects of Hudson, so we can use this to alter the state of Hudson. It is similar to the Jenkins Script Console functionality.

How Selenium script execution happens inside a company?

1.We develop code in eclipse
2.Integrate it with jenkins
3.Store codes on github
4.integrate jenkins and github
5. Jenkins triggers test scripts from github
Now my questions are this
1. Where exactly the tests run in realtime on scheduled basis ?
2. Jenkins has to run 24/7 in company server so it triggers test scripts in one of company's computer ?
Jenkins run the test on either master or slave machine which you configure.
Example:
yes.

Running Protractors in Jenkins

I was just wondering if it is possible to run protractor e2e tests in Jenkins with every build. Currently we trigger test cases manually and they are not part of Jenkins but somehow I need them to be run automatically and show the results (failures/pass) as part of the build.
Can anyone share their experience.
Regards
Syed Zaidy
Yes this is possible, you set this up under the Build Triggers section of your job. You have the options to build periodically, build remotely, build after another project is built, or build after a push to GitHub/BitBucket.
You can also put your tests in the pipeline, "downstream" from another job, so they are automatically triggered whenever that job completes.
Yes, it is possible to run Protractor tests from a Jenkins job. To do this, you will need a headless browser. Read about Headless browsers here:
You can follow the following instructions and install npm, protractor and chrome headless in the Jenkins box here

running a powershell script on multiple servers using Jenkins

I have a situation where I need to run a clean up script written in powershell on Multiple servers , say around 100 windows servers.
How do I accomplish this ?. Doing thru SSH would be cumbersome I believe . I am looking for a better way to configure the Jenkins job to get this task done.
Regards
Raj
First Solution
Install a Jenkins agent on all your Windows machines
Affect the same label on all these Windows nodes
Next, you have to install the Matrix Project plugin and create a multi-configuration job.
You have to configure the matrix to run your job on the specific label:
This job will execute your Powershell maintenance script on all the Windows nodes.
Here is a screen copy of a similar maintenance job I'm running on my CentOS nodes:
Second solution (not tested)
The second solution (using OpenSSL) is to execute your Powershell script remotely:
https://hodgkins.io/automating-with-jenkins-and-powershell-on-windows-part-2

Automate configuration of Jenkins & Sonarqube

I am trying to find a solution to automate installation and configuration of Jenkins & SonarQube. The idea is to provide an easy to use provisioning utility for setting up CI. Ideally I would love to automate the following
Installation
Set up users,Build, Unit testing and Code coverage
Is there an SDK, CLI or similar which can be used from batch script?
Thanks
You can use the Jenkins docker image for the installation part - even if you're not using Docker you can still copy the installation procedure:
https://github.com/jenkinsci/docker
For the setup of jobs I would recommend the Job DSL:
https://github.com/jenkinsci/job-dsl-plugin
For the rest you can use the Jenkins CLI or you can manually configure it once and then extract the corresponding XML file from the Jenkins home and copy it into other installations.

Resources