GithubHelp home page GithubHelp logo

mystery1841 / arquillian-addon Goto Github PK

View Code? Open in Web Editor NEW

This project forked from forge/arquillian-addon

0.0 0.0 0.0 477 KB

JBoss Forge Arquillian Addon

Home Page: http://www.arquillian.org

Java 99.03% FreeMarker 0.97%

arquillian-addon's Introduction

Arquillian Forge Addon

Build Status

Setting up an Arquillian profile & Test Framework

Arquillian supports testing in multiple containers. This is done by using a Maven profile for each container. This makes it possible to have multiple containers configured side-by-side too. To add a new profile you use the arquillian setup command:

arquillian-setup

This command will prompt for which testframework to use, do you want to use standalone mode, if not then which container to use.

If you need to install an additional container profile, run command:

arquillian-add-container

In above command if selected container is supported by chameleon then it is configured using chameleon, otherwise it will add required container adapter to setup container.

If container is not supported by chameleon, Forge will download it for you. There is no need to download container manually.

Note: We are no longer supporting container prior to JBoss AS 7 in forge.

Tomcat Container Configuration

In case of Tomcat container, if you are trying to set it up in managed mode. Forge will create custom server.xml depending on tomcat version, tomcat-users.xml which contains users with manager-script role. So after successful execution of command, chameleon is configured with required resources & properties, Tomcat is ready to use. No worries about configuration.

It will only work if catalina.home is nested in the target folder.(For chameleon default download folder for container distributions is target/ for Maven).

Generating tests

Writing Arquillian tests is trivial, and is documented well: https://docs.jboss.org/author/display/ARQ/Reference+Guide

Forge can help you get started however.

arquillian-create-test --targets demo.CoolBean --archiveType JAR

Of course you can use the TAB key to navigate to the class that you want to test.

Arquillian Cube

Setup:

To add Arquillian Cube dependencies configuration options in arquillian.xml, run command:

arquillian-cube-setup --type docker-compose --file-path docker-compose.yml

Before running above command make sure that file provided with file-path is exists.

Create Test:

To create a test class, run command:

arquillian-create-test --named MyDockerComposeTest --target-package org.arquillian.cube.

Add Cube Test & Enrichers:

To enrich a given Arquillian test with respective annotations depending on selected type, run command:

arquillian-cube-add-test --test-class org.cube.docker.MyDockerComposeTest

Same way you can create a test for Kubernetes, Docker, Openshift.

All Available Commands

Name

Usage

arquillian-setup

To setup container, and add test framework dependency.

arquillian-add

To add arquillian universe bom dependency

arquillian-add-testframework

To add testframework dependency.

arquillian-container-setup

To add required dependency for container to setup.

arquillian-container-configuration

To configure container configuration.

arquillian-create-test

To create a test inside package.

arquillian-cube-setup

To add arquillian cube dependency & updates arquillian configuration.

arquillian-cube-add-test

To add a test method in selected class with required test enricher depending on selected type.

For more details about options have a look into integration tests at: integration tests

arquillian-addon's People

Contributors

paulbakker avatar gastaldi avatar bartoszmajsak avatar aslakknutsen avatar dipak-pawar avatar lordofthejars avatar mojavelinux avatar lincolnthree avatar rafabene avatar pmuir avatar agoncal 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.