Book Image

Hudson 3 Essentials

By : Lloyd H. Meinholz
Book Image

Hudson 3 Essentials

By: Lloyd H. Meinholz

Overview of this book

Continuous integration (CI) with automated test execution has been widely adopted in recent years. The concept behind CI has changed how companies look at Build Management, Release Management, Deployment Automation, and Test Orchestration. Hudson is a CI solution that provides executives, business managers, software developers, and architects with a better sense of the development progress and code quality of projects throughout their development life cycle.A fast-paced and hands-on introduction to the key features of Hudson 3. You will be introduced to tools that can be used to improve the quality of software development projects. You will also learn how to install and secure Hudson in a variety of IT environments. Staring with a brief introduction to Hudson and how it helps many IT organizations deliver high quality software, Hudson 3 Essentials will show you how Hudson can be installed and deployed in various environments. You will also be guided through the different methods of securing your Hudson installation. Moving on from the basics, you will be introduced to several important Hudson plugins and learn how to extend its functionality by developing your own plugins. You will be shown how Hudson can be used to build different types of applications and how it can deploy a web application to an application server. Finally, you will discover how Hudson can be used to perform automated testing on software applications, and how to generate reports that describe the results.
Table of Contents (15 chapters)
Hudson 3 Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Running and publishing JUnit test reports


In the following sections, we will use Gradle tasks that will execute projects tests and then publish the test results with a Hudson 3 post-build action.

Updating the Gradle build step for the hudsonDemoProject job

In the Build section of the Job Configurations page, update the Tasks in the Invoke Gradle script build step by adding the text test to the Tasks text box. The Build section of the page should look similar to the following screenshot:

Note

The cleanTest task is required to force Gradle to run the tests even if it isn't necessary. If this is not done, the Hudson job will fail as it believes the test results are outdated.

This build step will run the test for the project, which will generate test reports in the directory build/test-results.

Configuring a post-build action

The test results have now been created by the Gradle build script. To publish the test results on the project home page, we need to configure a post-build action.

  1. In the Post-build...