Skip to content

Zucchini UI - Record and analyze your Cucumber results

License

Notifications You must be signed in to change notification settings

pgentile/zucchini-ui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Repository files navigation

Build status Docker stars

Zucchini UI

Record and analyze your Cucumber results.

Screenshot

Requirements

Runtime

Development

Zucchini is built withGradle.The Gradle wrapper is provided, no extra download is required.

Build

First time, install Javascript dependencies:

npm install --global yarn
./gradlew yarnInstall

Build application with Gradle:

./gradlew build

Warning:when Gradle is launched with Intellij, the PATH environment variable doesn't always contain path to Webpack command. If this is the case, relaunch Gradle daemon:

./gradlew --stop
./gradlew build

Develop

Run Mongo database server:

mongod &

Run Mongo migrations to build database:

(cd zucchini-ui-mongo &&./migrate.sh MONGO_HOST/MONGO_DATABASE)

Import project (on IntelliJ)

  • Install gradle plugin
  • Restart IntelliJ
  • You will see "Import gradle project" message on the right bottom (Event log). Click on it.
  • Select "Use default gradle wrapper". Not "Use local gradle distribution".

Start Java backend:

./gradlew runBackend

Start frontend:

(cd zucchini-ui-frontend && yarn start)

Open your browser to (although theyarn startshould open Zucchini home page):

http://localhost:9000

You can build sample Cucumber reports from thezucchini-ui-example-features:

./gradlew runCucumber

Generated reports can be found inbuilddirectory.

The development UI server runs on port 9000, the backend server runs on ports 8080 (Zucchini API) and 8081 (Dropwizard admin API).

Start Java backend in debug mode

  • Open the view "Gradle" > zucchini-ui > other
  • Right-click on runBackend
  • Debug

Deploy

The sub-projectzucchini-ui-appbuilds a fat JAR that contains backend and UI in one JAR. This JAR contains everything needed to run the Zucchini UI app.

You can run it with the following Gradle command:

./gradlew runShadow

The fat JAR is namedzucchini-ui-app-VERSION-all.jar.You will find it inzucchini-ui-app/build/libs. Run it with this command:

java -jar zucchini-ui-app-VERSION-all.jar server CONFIG.yml

Don't forget to init your Mongo database!

(cd zucchini-ui-mongo &&./migrate.sh MONGO_HOST/MONGO_DATABASE)

Build and deploy a Docker image

You can build a Docker image:

./gradlew dockerBuild

The Docker image will be located atpgentile/zucchini-ui.After that, you can run the Docker image and its dependencies with the following command:

docker compose up

You can find some pre-built images inDocker Hub.

Cypress E2E tests

You can launch some E2E Cypress tests:

(cd zucchini-ui-e2e-tests && yarn cypress:open)

This test suite is useful to validate basic Zucchini functionalities.

Configuration

The configuration file used by the application is aDropwizard YAML file.

You can use in your file environment variable, like${HOME}or${USER}. View thesample configuration filefor more information.

Architecture

Used frameworks:

Contributing

See thecontributing guide