Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Sonar Code Quality Testing Essentials
Sonar Code Quality Testing Essentials

Sonar Code Quality Testing Essentials: Achieve higher levels of Software Quality with Sonar with this book and ebook

Arrow left icon
Profile Icon Charalampos S Arapidis
Arrow right icon
$54.99
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.5 (4 Ratings)
Paperback Aug 2012 318 pages 1st Edition
eBook
$28.99 $32.99
Paperback
$54.99
Subscription
Free Trial
Renews at $19.99p/m
Arrow left icon
Profile Icon Charalampos S Arapidis
Arrow right icon
$54.99
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.5 (4 Ratings)
Paperback Aug 2012 318 pages 1st Edition
eBook
$28.99 $32.99
Paperback
$54.99
Subscription
Free Trial
Renews at $19.99p/m
eBook
$28.99 $32.99
Paperback
$54.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with Print?

Product feature icon Instant access to your digital copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Redeem a companion digital copy on all Print orders
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Table of content icon View table of contents Preview book icon Preview Book

Sonar Code Quality Testing Essentials

Chapter 2. Installing Sonar

In this chapter, we will install Sonar along with required software in either Linux or Windows. We will need to install MySQL, create a new database to store Sonar data, install Maven to import projects easily into Sonar, configure it to run as a service, and finally secure our instance by creating groups and users. Then, we will go through the process of installing plugins, updating Sonar from the update center, and backing up our data.

In this chapter we will cover:

  • Prerequisites for Sonar

  • Installing the Sonar web server

  • Configuring MySQL

  • Starting Sonar as a service

  • Logging in to Sonar for the first time

  • Securing your Sonar instance

  • Creating users and groups

  • Backing up your data

  • Extending Sonar with plugins

  • Upgrading Sonar

Prerequisites for Sonar


Before installing Sonar, it is necessary to check that our host system meets all the requirements.

Sonar comes bundled with the Apache Derby database, but it is highly recommended to use an enterprise database, especially when deploying on to a production environment. A minimum of 512 MB of RAM and sufficient data space to store Sonar's analysis results and historical data are required. The last requirement should not be an issue since the public Nemo instance of Sonar uses 4 GB of RAM to analyze more than 6 million lines of code within a two-year lifespan according to SonarSource. Users will interact with Sonar through web browsers and it is recommended to enable JavaScript if not already enabled. Finally, installing the Maven project builder is highly recommended to make the process of adding new projects for analysis much easier.

The following list presents all supported platforms by Sonar:

  • Java Oracle JDK

    • 1.5

    • 1.6

    • 1.7 (not tested yet)

  • Database

    • Microsoft SQL Server...

Downloading Sonar


Sonar is updated frequently, with each release packing a couple of new features and improvements. Visit http://www.sonarsource.org/downloads/ to get an overview of the releases and download links. From there download the latest version notice that whether you are on Linux or Windows, the download is the same, since Sonar is based on Java and it is compatible with both. All downloads are zip archives named after Sonar's version following this convention:

sonar-x.yy..zip, where x is the major release number and yy is the minor one.

As of October 15, 2011, the latest version was 2.11 and about 60 MB in size. For the needs of this book, we will go with Sonar v. 2.11.

After the download is complete, extract the zip archive into a directory of our choice. It is a good practice to create a servers directory and extract Sonar in there. An exemplary directory setup could be /development/servers/sonar-2.11/.

Note

Do not unzip Sonar into a directory starting with a digit.

Installing the Sonar web server


Place the downloaded file in the directory to which you want to install Sonar, open the terminal window, and enter the following command to unzip it:

$ unzip sonar-2.11.zip

Important Sonar directories to take a note of are:

  • conf: Sonar, database, and logging configuration in the form of XML and property files are stored here.

  • extensions: JDBC drivers and Sonar plugins are located here.

  • logs: All logging goes to this directory; this is the place to check when something goes wrong with our Sonar instance.

  • bin: This directory contains Sonar startup scripts for different Windows and Linux platforms.

To start the Sonar server in Linux, open a terminal, navigate in to the bin directory, and execute the startup script for your platform. For example:

$ bin/linux-x86-32/sonar.sh console

On Windows 32-bit, execute the following command:

$ bin\windows-x86-32\StartSonar.bat

When Sonar starts for the first time, it creates and populates the embedded Apache Derby...

Configuring MySQL


While the embedded Apache Derby database is ideal for tests, in a production development environment it is recommended to switch to an enterprise database.

Creating the database

Sonar comes bundled with an SQL script to create the database and the sonar user with the password sonar. The script is located at @SONAR_HOME/extras/database/mysql/create_database.sql. To execute the script, open up a terminal and execute the following command, (enter your root password or sonar when prompted):

$ mysql -u root -p < create_database.sql

The script creates a new Sonar database with UTF8 encoding and user sonar with password sonar.

Setting up Sonar with MySQL

Having the database up and running, we then must deactivate the embedded Apache Derby and enable MySQL in the conf/sonar.properties configuration file. Stop the server if running, and comment the following lines to disable Apache Derby:

# Comment the following lines to deactivate the default embedded database.
# sonar.jdbc.url...

Starting Sonar as a service


It is most convenient to have the Sonar server start automatically at each boot time. Thus, the final step of the setup is to have it installed as a service.

Run as a service on Linux

Create the file /etc/init.d/sonar with the Vim or Nano editor:

sudo nano /etc/init.d/sonar

Append the following lines and save it:

#! /bin/sh
/usr/bin/sonar $*

Open a terminal and enter the following commands:

sudo ln -s /home/user/development/servers/sonar-2.11/bin/linux-x86-32/sonar.sh /usr/bin/sonar
sudo chmod 755 /etc/init.d/sonar
sudo update-rc.d sonar defaults

Reboot, open a browser, and go to http://localhost:9000/ to verify that the server is running.

Run as a service on Windows

To install or uninstall the Windows service, simply execute one of the following scripts as administrator respectively:

  • To install:

    $ SONAR_HOME/bin/windows-x86-32/InstallNTService.bat
    
  • To uninstall:

    $ SONAR_HOME/bin/windows-x86-32/UninstallNTService.bat
    

You can start/stop the service from Windows Services...

Logging in to Sonar for the first time


After a fresh reboot, it is finally time to log in to Sonar as an administrator. One of the first things that you should do is change the administrator's credentials.

Note

Sonar, by default, creates an Administrator account with username admin and password admin.

Point your browser at http://localhost:9000/. At the top right of the dashboard, click on the Log in link and fill in the form with username as admin and password as admin.

To change the default password, click on the Administrator link on top and then on My Profile on the left. Fill in the Change Password form and click on the Change Password button to save the changes:

Securing your Sonar instance


In an enterprise environment, a good practice would be to limit access to administration settings and project analysis data according to different members' responsibilities. Administrators should have access to everything, project managers and developers to projects they belong to, while public users could be further limited by preventing them from browsing source code.

Apart from Sonar's standard authentication mechanism, delegation to third-party systems is possible with the use of plugins. If a configured Active Directory or Atlassian's JIRA Crowd Single Sign On solution is already available, you might be interested in the following plugins, which leverage authentication functionality of the aforementioned systems:

Sonar authentication and sources visibility

First of all, you have to configure the level of security for your Sonar...

Creating users and groups


Log in as Administrator and click on the Users link, located under SECURITY, to get an overview of existing users. From here you can edit, delete, or add a new user. Group management can be found under SECURITY:Groups.

Browse to the Groups management screen and create a new group named packt-group. Users belonging to this group will be granted access to the code presented in this book. Next, create a user packt with password packt. Now, the user list will be repopulated, including the new user:

From the Groups column, click on select to add packt-group to the user's groups and save.

Managing project roles

Sonar manages security at four standard levels as shown under Configuration | SECURITY:

  • Users

  • Groups

  • Global Roles

  • Project Roles

Global Roles include one default Administrator role that grants a user every administrative right that has to do with the configuration and personalization of the instance. As a global administrator, you may configure every aspect of...

Backing up your data


It is crucial for the administrator to prepare a back up and restore plan in case of data loss or corruption. Sonar offers a backup and restore solution for its configuration data, but filesystem and database backups have to be taken care of manually, by the system's administrator.

Sonar instance configuration backup

Log in to Sonar as administrator, click on the Configuration link on the top of the dashboard, and then click on Backup from the left-hand side menu under the SYSTEM options. Click on the Backup button to download the instance's configuration in XML format. Restore the downloaded XML file in another Sonar instance to duplicate the configuration of a previous install.

Filesystem backup

At filesystem level, keep a backup of the $SONAR_HOME directory at frequent intervals. This can be automated via cron jobs on Linux or by using Windows Backup on Windows.

For more sophisticated backup solutions, have a look at Wikipedia's comprehensive list of backup software...

Extending Sonar with plugins


Sonar features a very streamlined plugin installation process from within the platform's web update center—although a server restart is still mandatory. Next, we will install the Useless Code Tracker plugin by Olivier Gaudin. In short, this plugin calculates and reports on total duplicated lines inside a Java project. After installation, a new Useless Code widget will be available for customizing the Sonar dashboard.

To manage plugins, log in to Sonar as administrator and click on the Update Center link under the SYSTEM section. The Update Center section provides plugins and system information separated on the following four tabs:

  • Installed Plugins: List of currently installed plugins

  • Available Plugins: All available plugins in the Sonar library

  • Plugin Updates: List of plugins that need updating

  • System Updates: Information on new platform updates

Installing the Useless Code Tracker plugin

From the Update Center section, click on the Available Plugins tab and...

Upgrading Sonar from the Update Center section


To check if a new version of the platform has been released, visit the Update Center section and select the System Updates tab. If there is a new version available, an information panel with release information and installation details appears similar to the one depicted in the following screenshot:

Checking compatibility of plugins

It is possible for some plugins to require an update before upgrading to the new Sonar version or to be rendered obsolete and uninstalled. The How to upgrade section under the System Updates tab lists these plugins which should all be updated or uninstalled before proceeding with the platform's upgrade. After updating/uninstalling said plugins, stop the Sonar server or the Sonar service, if you are in Windows:

$ SONAR_HOME/bin/linux-x86-32/sonar.sh stop

Upgrading to latest Sonar version

Next, download the new Sonar version and unzip it in a new separate directory, let's say $NEW_SONAR_HOME.

Note

Before proceeding, make...

Summary


In this chapter, we went through the installation process of the Sonar platform, configured a MySQL database to store Sonar data, and made a backup of our new instance. To meet the needs of an enterprise development environment, we further secured our instance, limited access to configuration and system settings, and created sample groups and users.

Finally, we focused on maintenance tasks such as installing plugins and updating the platform by using Sonar's Update Center.

In the next chapter, we will put our fresh instance to the test by analyzing projects with all available methods, customize the Sonar dashboard, and configure its widgets and interface components.

Left arrow icon Right arrow icon

Key benefits

  • Take full advantage of the Sonar platform and its visual components to track code quality and defects
  • Create step by step software quality profiles that match your needs
  • Real world examples that use Sonar efficiently to assess quality and improve Java code

Description

Sonar is an open source platform used by development teams to manage source code quality. Sonar has been developed with this main objective in mind: make code quality management accessible to everyone with minimal effort. As such, Sonar provides code analyzers, reporting tools, manual reviews, defect-hunting modules, and TimeMachine as core functionalities. It also comes with a plugin mechanism enabling the community to extend the functionality, making Sonar the one-stop-shop for source code quality by addressing not only the developer's requirements, but also the manager's needs.The "Sonar Code Quality Testing Essentials" book will help you understand the different factors that define code quality and how to improve your own or your team's code using Sonar. You will learn to use Sonar effectively and explore the quality of your source code in the following axes: Coding Standards Documentation and Comments Potential Bugs and Defects Unit Testing Coverage Design and Complexity Through practical examples, you will customize Sonar components and widgets to identify areas where your source code is lacking. The book goes down to proposing good practices and common solutions that you can put to use to improve such code.You will start with installing and setting up a Sonar server and performing your first project analysis. Then you will go through the process of creating a custom and balanced quality profile exploring all Sonar components through practical examples. After reading the book, you will be able to analyze any project using Sonar and know how to read and evaluate quality metrics.Hunting potential bugs and eliminating complexity are the hottest topics regarding code quality. The book will guide you through the process of finding such problematic areas, leveraging and customizing the most appropriate components. Knowing the best tool for each task is essential. While you improve code and design through the book, you will notice that metrics go high and alerts turn green. You will use the Time Machine and the Timeline to examine how your changes affected the quality."Sonar Code Quality Testing Essentials" will enable you to perform custom quality analysis on any Java project and quickly gain insight on even large code bases, as well as provide possible solutions to code defects and complexity matters.

Who is this book for?

This book is for you if you are a Java developer or a Team Manager familiar with Java and want to ensure the quality of your code using Sonar.You should have a background with Java and unit testing in general.

What you will learn

  • Understand the different perspectives of quality in software projects
  • Manage code quality and get historical visual feedback directly from your browser with Sonar
  • Drill down your code and easily hunt for potential bugs and defects using Sonar components
  • Take full advantage of custom quality profiles to refine your documentation and apply coding standards
  • Locate duplicate and useless code and assess testing coverage across your projects
  • Analyze design and understand code complexity using Sonar and advanced metrics
  • Learn to configure dashboards and maintain the Sonar platform to match different needs
  • Integrate Sonar with a build server according to the continuous inspection paradigm
Estimated delivery fee Deliver to United States

Economy delivery 10 - 13 business days

Free $6.95

Premium delivery 6 - 9 business days

$21.95
(Includes tracking information)

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Aug 24, 2012
Length: 318 pages
Edition : 1st
Language : English
ISBN-13 : 9781849517867
Category :
Languages :
Tools :

What do you get with Print?

Product feature icon Instant access to your digital copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Redeem a companion digital copy on all Print orders
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Estimated delivery fee Deliver to United States

Economy delivery 10 - 13 business days

Free $6.95

Premium delivery 6 - 9 business days

$21.95
(Includes tracking information)

Product Details

Publication date : Aug 24, 2012
Length: 318 pages
Edition : 1st
Language : English
ISBN-13 : 9781849517867
Category :
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total $ 103.98
Sonar Code Quality Testing Essentials
$54.99
Selenium Testing Tools Cookbook
$48.99
Total $ 103.98 Stars icon

Table of Contents

11 Chapters
An Overview of Sonar Chevron down icon Chevron up icon
Installing Sonar Chevron down icon Chevron up icon
Analyzing your First Project Chevron down icon Chevron up icon
Following Coding Standards Chevron down icon Chevron up icon
Managing Measures and Getting Feedback Chevron down icon Chevron up icon
Hunting Potential Bugs Chevron down icon Chevron up icon
Refining Your Documentation Chevron down icon Chevron up icon
Working with Duplicated Code Chevron down icon Chevron up icon
Analyzing Complexity and Design Chevron down icon Chevron up icon
Code Coverage and Testing Chevron down icon Chevron up icon
Integrating Sonar Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.5
(4 Ratings)
5 star 0%
4 star 75%
3 star 0%
2 star 25%
1 star 0%
Jason Jan 08, 2013
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
I needed to get Sonar up and running for work. The online help was not great. purchased this book which explained the topixc very well and gave a good explanation of how to set up and administer Sonar, including the database, maven, jenkins and others.
Amazon Verified review Amazon
C. Moeller Apr 28, 2013
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
If you are new to Sonar, the book gets you started with an overview of how it is used, what it is capable of, and what makes Sonar valuable for project management. Once you understand what Sonar is capable of, the book then shows you how to install and set it up, so that you can begin using it. You will learn about all the different types of rule violations Sonar checks for, what type of reports you can generate, as well as how to configure Sonar for your coding rules.If you are interested in trying to improve and track the quality of your code base, keep consistent coding rules followed, or are looking for more metrics to document the code complexity, quality, and potential problems, you'll find lots of detailed information contained in this book.
Amazon Verified review Amazon
James Jun 20, 2015
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
Livro bom e prático para quem nunca usou/configurou Sonar. Grande parte do conteúdo você encontra na Internet, mas se não quer ficar pesquisando e prefere seguir um "roteiro" este livro lhe será útil.
Amazon Verified review Amazon
Eduard Wirch Apr 19, 2013
Full star icon Full star icon Empty star icon Empty star icon Empty star icon 2
Handbuch für Leute die gerne "wo muss ich klicken" Anleitungen bevorzugen. Geht sehr in die Breite (Beschreibt Vorgehen bei Installation von SVN, Jenkins, etc.) und sehr wenig in die Tiefe von Sonar.Erhofft habe ich mir Vorschläge für Software-Prüf-Konzepte. Bekommen habe ich Plugin-/Rules-Beschreibungen, die man auch im Internet nachlesen kann. Ein Pluspunkt: das Buch hat uns auf zwei interessante Plugins gebracht.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is the digital copy I get with my Print order? Chevron down icon Chevron up icon

When you buy any Print edition of our Books, you can redeem (for free) the eBook edition of the Print Book you’ve purchased. This gives you instant access to your book when you make an order via PDF, EPUB or our online Reader experience.

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact customercare@packt.com with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at customercare@packt.com using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on customercare@packt.com with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on customercare@packt.com within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on customercare@packt.com who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on customercare@packt.com within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
Modal Close icon
Modal Close icon