Search icon
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Sonar Code Quality Testing Essentials

You're reading from  Sonar Code Quality Testing Essentials

Product type Book
Published in Aug 2012
Publisher Packt
ISBN-13 9781849517867
Pages 318 pages
Edition 1st Edition
Languages
Author (1):
Charalampos S Arapidis Charalampos S Arapidis
Profile icon Charalampos S Arapidis

Table of Contents (18) Chapters

Sonar Code Quality Testing Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
1. Preface
1. An Overview of Sonar 2. Installing Sonar 3. Analyzing your First Project 4. Following Coding Standards 5. Managing Measures and Getting Feedback 6. Hunting Potential Bugs 7. Refining Your Documentation 8. Working with Duplicated Code 9. Analyzing Complexity and Design 10. Code Coverage and Testing 11. Integrating Sonar Sonar Metrics Index

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...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}