Jenkins
You need to install Jenkins in order to execute offline package using Jenkins.
Jenkins Installation
Follow the below-mentioned steps to install Jenkins.
- Download Jenkins and JRE 6, 7/JDK 1.6, 1.7.
- Install JRE 6, 7/JDK 1.6, 1.7.
- Open the Command Prompt window and browse to the bin folder where JRE 6, 7/JDK 1.6, 1.7 exists.
- Execute command java -Dhudson.model.DirectoryBrowserSupport.CSP="default-src 'self';img-src 'self'; style-src 'self' 'unsafe-inline'; child-src 'self'; frame-src 'self'; script-src 'self' 'unsafe-inline'; frame-ancestors 'self';" -jar jenkins.war.
The default port is 8080.
If Jenkins version is greater than 1.651 then execute the following command:
java -Dhudson.model.DirectoryBrowserSupport.CSP= -jar “<Jenkins installation location>\jenkins.war”.
The reason for the change is Jenkins 1.625.3 introduced the Content-Security-Policy that disables DirectoryBrowserSupport due to which Qualitia HTML report cannot get published.
Please note that Jenkins needs to be started using above command only. If you use Jenkins as service, you won’t be able to see the browser during test case execution.
Post successful execution of the command, a message is displayed confirming Jenkins installations in the Command Prompt window. Open URL:http://localhost:8080.
This launches Jenkins’ home page.
If client and server are two different systems then the client should be run manually using the command prompt with the administrator privileges (i.e. Run as Administrator).
Jenkins Configurations
Once installed successfully, configure Jenkins for execution following below-mentioned steps.
- Navigate to URL:http://localhost:8080.
This launches Jenkins homepage. - Go to Jenkins > Manage Jenkins > Manage Plugins.
- Install HTML Publisher Plugin, Email-Ext Plugin, and EnvInject Plugin.
- On Jenkins home page, go to New Job.
- Enter the job name as per user understanding.
- Select the Build a free-style software project option.
- Click OK.
The user will be directed to New Job configuration page. - Scroll down to Build section and select the first option.
- Click the Add Build Step button and select Execute Windows batch command.
The below screen appears. - Update the commands that lead to the location and execution of QualitiaOffline.exe.
For example: cd C:\Users\localadmin\Desktop\ffline_43818\Qualitia Offline\
QualitiaOffline.exe. - From Add Build Step button, select Inject Environment Variables.
This step has to be followed by step 10, otherwise Qualitia Reports will not be visible through Jenkins. - Update the path for the file qer.properties along with the filename.
This file is generated and saved where offline package is saved during execution of the test cases. For example; <Offline Package location>\qer.properties - Go to Post-build Actions section.
- Click Add Post-build action and select Publish HTML Report.
- Update the values under respective columns as shown below.
- Select Jenkins > Manage Jenkins > Configure System.
- Scroll down to the Email Notification section.
- Click the Advanced tab.
- Enter valid values for the respective fields.
Below is the screenshot for example. - Select the Test Configuration by sending test e-mail check box and enter the valid email address.
- Click Test Configuration button.
You would be notified on the successful execution of step 21. - If there is any error message, recheck the setting values.
- To enable this email notification for a Project/Job, navigate to Project Configuration.
- Scroll down to Post Build Actions section.
- Click Add post-build action and select Email Notification.
- Provide recipient details.
- Click Save.
Execution and Reports
Once the configuration settings are done successfully, you are now ready for test case executions.
- Navigate to the home page of Jenkins.
- Click the Job name.
- Click Build Now.
- Under Build History section user can see the progress of the build.
The user will also see the execution of the Test Cases involved in Offline Package. - Once the build is successfully generated, click Qualitia Report.
Qualitia Offline Package execution report will be displayed in the browser.
The user can view earlier reports by selecting the respective Build and going to Qualitia Report of that build.
The user can click the zip link to download the zip of the Qualitia Reports.