0% found this document useful (0 votes)
1K views1 page

Jenkins Cheat Sheet PDF

Jenkins is a tool for continuous integration that allows automated testing of software projects. It can be configured to run unit tests and generate JUnit reports on test results. Notifications can be configured to alert users of broken or unstable builds via email. Plugins allow additional functionality like running Selenium tests for automated web testing and code analysis tools. The build pipeline plugin creates a visual representation of the entire build and test process across projects. Remote testing can be set up by configuring Jenkins master and slave nodes to run Selenium tests on multiple machines.

Uploaded by

siva_relax
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1K views1 page

Jenkins Cheat Sheet PDF

Jenkins is a tool for continuous integration that allows automated testing of software projects. It can be configured to run unit tests and generate JUnit reports on test results. Notifications can be configured to alert users of broken or unstable builds via email. Plugins allow additional functionality like running Selenium tests for automated web testing and code analysis tools. The build pipeline plugin creates a visual representation of the entire build and test process across projects. Remote testing can be set up by configuring Jenkins master and slave nodes to run Selenium tests on multiple machines.

Uploaded by

siva_relax
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

JENKINS Unit Testing

Testing unit in Jenkins: •


Notifications
Jenkins comes with a feature to add email notifications to the
Server
Maintenance

CHEAT SHEET
Commands in Jenkins: (URLs)
• Step 1 : Go to the dashboard and choose an existing project and build project • http://localhost:8080/jenkins/exit − shutdown Jenkins
click configure • Go-to Manage Jenkins → Configure System. In the email • http://localhost:8080/jenkins/restart − restart Jenkins
• Step 2 : browse to add a build step and invoke Ant notification space enter the require STMP server and use email • http://localhost:8080/jenkins/reload − to reload
• Step 3: Click on advanced suffixes. To backup Jenkins Home:
• Step 4 : in the build file section enter the location of build.xml
Jenkins • Configure the recipients so that they would receive notification • Go to configure system in manage Jenkins
• Step 5: add post build option and click Publish Junit test result about broken or unstable builds • Select a partition that has to most free space.
report • Notification plugins such as Tikal Knowledge allows job status
Jenkins is a software which allows you to do the continuous integration • Perform automated clean-up options to avoid this.
• Step 6 : ensure the report is in the folder of the project workspace notification for JSON and XML formats.
on your application/software lifecycle. It gets installed on the server
where the central build will take place. Now let’s understand its The “*.xml” basically tells Jenkins to pick up the result xml files • Options :
workflow. which are produced by the running of the Junit test cases. Click Save • Format - either Json or XML types Build Pipeline
after done. • Protocol- TCP, UDP or HTTP
• Step 7 : Click on build and check logs to see if successful or not with • First go-to manage plugin and install build pipeline plugin.
• Event - job event that triggers the notification
Management applications. • To see a build pipeline click the (+) on the dashboard
• URL- destination to send notifications to.
• Enter any name and click on the view. Choose build pipeline
• Timeout - default timeout 30ms
Configure system: view.
• Can be used to manage paths to various tools to use in builds. Automated Testing • Accept the default settings and add the name of the
• Jenkins dynamically adds the config fields after the plugins are project.
Manage Plugins
installed. • Step 1: go to plugins and choose selenium plugins and click to install. • A view of entire pipeline with statuses will be visible.
Manage Plugins: • Step 2: go to configure system and select on selenium jar and save
• Plugins can be removed, updated and installed by manage plugin • To uninstall plugins , go-to manage plugins and click on the
• Step 3: Go to dashboard and select the config option for the project
screen. installed tab and click on uninstall for the plugin Remote Testing
at hand
System info: • In Case of need to install an older version of the plugin, download
• Step 4: Click on add build step and choose SeleniumHQ htmlSuite Selenium tests can be run on remote slave machines via master
• List all the current java properties and system environment from the site and click on Upload option to do it manually.
Run” slave and selenium suite plugin installation
variables. • Step 5: Add the required details and click on save, execute and build. • Step 1: go-to master Jenkins server and manage nodes
• System log- view Jenkins log in real time. The test is executed, and a report is built. Code Analysis • Step 2: Click on configure for the slave machine
• Script console- lets you run groovy scripts on the server.
• Step 3 : put the launch method as ‘Launch slave agents via
• Manage nodes- configure the number of builds you want. They provide utilities for static code analysis. Some tools are
• Shutdown- click prepare to shutdown link to prevent any new
Automated Deployment Java Web Start’
CheckStyle, FindBugs, PMD etc. • Step 4: open a browser instance of the master Jenkin on
builds from being started. After all current builds are finished,
• Head to the manage plugins and install the respective plugins Provides details like : the slave machine, then manage nodes and select the
Jenkins will shut down cleanly. • Total warning in a job
• It takes the war ear file and deploys that to the running remote DXBMEM30
application build • Showing of new and fixed warning of a build • Step 5 : Scroll down and select the launch option and hit
• Go-to build and configure and click on ‘deploy to war/ear to • Trend reports showing warnings per build run
container’ • Warnings per module, package or category • Step 6: Configure tests to run on the slave
• In the war container section save details about the destination server • Detailed reports of found warnings. • Step 7 : make sure the selenium part of the job is
and click save. configured. Make sure that the Sample.html file and the
selenium-server.jar\
Security
Backup Plugin
• Ability to have secure config for different users in place.
• To tweak backup settings via setup • Click on manage Jenkins and Configure global security
• To backup Jenkins config • Set parameters in the enable security section
• To restore config from a previous backup. • Add the users and go-to ‘manage users’ for permissions
• Alternatively you can use SCM( sync config plugin) or • To set authorizations, go-to configure global security, and click on
ThinBackup for global and job configurations. FURTHERMORE:
matrix based security JenkinsTraining

You might also like