Giter Site home page Giter Site logo

roadshow's Introduction

Calculator web app demo project

Calculator web application demo project, used for various training classes around continuous delivery by Praqma.

The project was earlier called Praqma training RoadShow, so there is a bit legacy and some hack, leaving room for exercises :-)

Short summary

  • Uses Gradle to build

  • Can deploy web app t Tomcat server

  • Can run Selenium tests against deployed web app

  • Release and publishing of artifacts are supported

  • You only need a JVM to run Gradle for playing with the basic setup on your own machine.

Gradle as build tool

The project uses Gradle as build tool, and as such only requires you have JVM to run gradle.

To use gradle in the project, run the gradle wrapper script (which is checked into the repository):

  • Linux: ./gradlew (this will be used in examples below)
  • Windows: ./gradlew.bat

It will list a short help.

Gradle uses the concept of a task for what to do, like build, run tests etc.

The Gradle wrapper script (gradlew and gradlew.bat) is part of the project to ensure only a JVM is needed as dependency for building. Gradle will take care of the rest.

Build howto

This could some of the things you would like to do in your Jenkins jobs.

Build and test

Build source, compile unit test and run unit test:

./gradlew war test

Build war file that can be deployed to Tomcat, and reports unit test results to build/test-results/.

To enable manual build support on a Jenkins job, use the special jenkinstest task instead of test to ensure new timestamps on junit outpu files that the Jenkins JUnit plugin requires.

./gradlew war jenkinstest

Cleaning

Cleaning, doing every gradle tasks from scratch:

./gradlew clean

Coverage of unit test

./gradlew jacocoTestReport tasks measures and reports coverage on unit tests.

Static analysis

You can run all supported static analysis checks with:

./gradlew staticanalysis

It will check on both main and test sources and report to xml files.

There are different analysis available:

  • PMD
  • checkstyle
  • Fingbugs
  • jdepend

They all have both a Main and Test task, that analysis respectively main sources or test sources. For example pmdMain or findbugsTest.

Checking

The built in gradle tasks check will also run all of the static analysis tools goals, including the test tasks which is unit test.

./gradlew check

Code documentation

You can generate javadoc on the sources with:

./gradlew javadoc

Customize the project

For training classes, that uses shared artifact- and web-server, you need to make sure both webapp and artifact have a unique name.

Patch the following line in build.gradle replacing mytrainingusername with your own name, initial or Github account id.

    ext.trainingUserName = 'mytrainingusername' // it is a good idea to chose the same as your github id

roadshow's People

Contributors

andrius-ordojan avatar inky84 avatar jkrag avatar madsnielsen avatar saadhashim avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.