Chapter 2. Developing with PerfCake

Table of Contents

2.1. Building from source
2.2. Using PerfCake from a Maven project
2.3. Maven Project
2.3.1. Project Structure
2.3.2. Maven Profiles
2.3.3. Standard Maven Goals
2.3.4. Documentation
2.3.5. Code Style with Checkstyle
2.3.6. License
2.3.7. JaCoCo Code Coverage
2.3.8. FindBugs Report
2.3.9. Digital Signatures
2.3.10. Distribution
2.3.11. Transformation of Scenarios
2.4. Coding Standards
2.4.1. Source file basics
File name
File encoding: UTF-8
Special characters
2.4.2. Source file structure
License or copyright information, if present
Package statement
Import statements
Class declaration
2.4.3. Formating
Braces
Block indentation: +3 spaces
One statement per line
Column limit: 400
Line-wrapping
Whitespace
Grouping parentheses: recommended
Specific constructs
2.4.4. Naming
Rules common to all identifiers
Rules by identifier type
Camel case: defined
2.4.5. Programming practices
@Override: always used
Caught exceptions: not ignored
Static members: qualified using class
Finalizers: not used
2.4.6. JavaDoc
Formatting
The summary fragment
Where JavaDoc is used
2.5. Test Development
2.6. Writing Guides

This chapter describes various useful information for using PerfCake as a dependency in your own project. It further provides guidance for possible project contributors.

2.1. Building from source

After cloning the GitHub repository with PerfCake, you can easily build it using Maven supposing you have latest JDK and Maven installe.

To build the project, you can use:

$ mvn clean install -DskipTests

You can smoothly import PerfCake parent pom.xml as a project in most modern IDEs. We use JetBrains IntelliJ Idea.