Skip to main content

SeeTestAutomation- Configuring Integration Of Jenkins Reports

info

Please note that this tool is classified as a Legacy tool. We recommend transitioning to our updated solutions to maintain optimal performance and security in your workflows. For more information on this matter, please reach out to technical support .

As part of the SeeTestAutomation's integration with Jenkins, a post-build action is supported which enables loading the generated HTML execution reports.

Prequisities

Jenkins from version 1.625 and later make use of Content-Security-Policy header, which by default set to very restrictive rules. In order to use Experitest plugin the default CSP rules have to be relaxed.

for more information visit https://wiki.jenkins-ci.org/display/JENKINS/Configuring+Content+Security+Policy

Unset Content-Security-Policy header

Step 1: In Jenkins Dashboard click on 'Manage Jenkins'

Step 2: Click on 'Script Console'

Step 3: Copy System.setProperty("hudson.model.DirectoryBrowserSupport.CSP", "") into the Script box and click Run

**

**

Step 4: Clear Cache from your browser.

Installation

Step 1: Download the Experitest_ReportLinks.hpi file HERE.

Step 2: After downloading the .hpi file, place it in your Jenkins plugins folder (directly under the root of the Jenkins installation folder, which is usually - C:\Program Files (x86)\Jenkins\plugins).

Step 3: Restart your Jenkins server.

Configuring Your Build

Step 1: In your project tab, in the Jenkins portal, click on 'Configure'.

Step 2: Click on 'Add post-build action', select 'Report Links' (choose the first option) and click on 'Add'.

Step 3: The following configuration dialog box is now displayed. Make sure to place the build.xml at the same level as the src folder in your Java project.

 The 'report' folder does not exist in the project at this point, that is why the 'No such directory' error is displayed. The first report's generation invokes the folder generation.

Step 4: When entering details into this dialog box, pay particular attention when designating the directory to archive. This directory is relative to the tests project home directory, meaning that you will need to generate the reports to this directory. For example, below is a such a designation in Java:

    @Before
public void setUp(){
client = new Client(host, port, true);
client.setProjectBaseDirectory(projectBaseDirectory);
File reports = newFile(System.getProperty("user.dir"), "reports");
reports.mkdirs();
client.setReporter("xml", reports.getAbsolutePath(), "<Your_Test_Name>");
}
  • In this example, the reports directory is set to the project home directory by contacting the user.dir with the reports directory.

Step 5: Run SeeTestAutomation as an administrator**.**

Step 6: Schedule a build though Jenkins.

Step 7: After executing the project, the summery report will be available as part of your Jenkins project tab under - 'Report Links'.