GithubHelp home page GithubHelp logo

yuwenmemon / javaee7-samples Goto Github PK

View Code? Open in Web Editor NEW

This project forked from javaee-samples/javaee7-samples

0.0 2.0 0.0 5.2 MB

Java EE 7 Samples

Home Page: https://arungupta.ci.cloudbees.com/

License: Other

javaee7-samples's Introduction

Java EE 7 Samples

This workspace consists of Java EE 7 Samples and unit tests. They are categorized in different directories, one for each Technology/JSR.

Some samples/tests have documentataion otherwise read the code. The Java EE 7 Essentials book refer to most these samples and provide an explanation. Feel free to add docs and send a pull request.

How to run ?

Samples are tested on Wildfly and GlassFish using the Arquillian ecosystem.

Only one container profile and one profile for browser can be active at a given time otherwise there will be dependency conflicts.

There are 4 available container profiles:

  • wildfly-managed-arquillian

    The default profile and it will install a Wildfly server and start up the server per sample. Useful for CI servers.

  • wildfly-remote-arquillian

    This profile requires you to start up a Wildfly server outside of the build. Each sample will then reuse this instance to run the tests. Useful for development to avoid the server start up cost per sample.

  • glassfish-embedded-arquillian

    This profile uses the GlassFish embedded server and runs in the same JVM as the TestClass. Useful for development, but has the downside of server startup per sample.

  • glassfish-remote-arquillian

    This profile requires you to start up a GlassFish server outside of the build. Each sample will then reuse this instance to run the tests. Useful for development to avoid the server start up cost per sample.

Similarly, there are 6 profiles to choose a browser to test on:

  • browser-firefox

    To run tests on Mozilla Firefox. If its binary is installed in the usual place, no additional information is required.

  • browser-chrome

    To run tests on Google Chrome. Need to pass a -Darq.extension.webdriver.chromeDriverBinary property pointing to a chromedriver binary.

  • browser-ie

    To run tests on Internet Explorer. Need to pass a -Darq.extension.webdriver.ieDriverBinary property pointing to a IEDriverServer.exe.

  • browser-safari

    To run tests on Safari. If its binary is installed in the usual place, no additional information is required.

  • browser-opera

    To run tests on Opera. Need to pass a -Darq.extension.webdriver.opera.binary property pointing to a Opera executable.

  • browser-phantomjs

    To run tests on headless browser PhantomJS. If you do not specify the path of phantomjs binary via -Dphantomjs.binary.path property, it will be downloaded automatically.

To run them in the console do:

  1. In the terminal, mvn -Pwildfly-managed-arquillian,browser-firefox test at the top-level directory to start the tests

When developing and runing them from IDE, remember to activate the profile before running the test.

To learn more about Arquillian please refer to the Arquillian Guides

How to contribute

With your help we can improve this set of samples, learn from each other and grow the community full of passionate people who care about the technology, innovation and code quality. Every contribution matters!

There is just a bunch of things you should keep in mind before sending a pull request, so we can easily get all the new things incorporated into the master branch.

Standard tests are jUnit based - for example this commit. Test classes naming must comply with surefire naming standards **/*Test.java, **/*Test*.java or **/*TestCase.java.

However, if you fancy something new, hip and fashionable we also accept Spock specifications - like here. The spec files are included in the maven test phase if and only if you follow Spock naming convention and give your Specification suffix the magic will happen.

Some coding principles

  • When creating new source file do not put (or copy) any license header, as we use top-level license (MIT) for each and every file in this repository.
  • Please follow JBoss Community code formatting profile as defined in the jboss/ide-config repository. The details are explained there, as well as configurations for Eclipse, IntelliJ and NetBeans.

Small Git tips

  • Make sure your fork is always up-to-date. Simply run git pull upstream master and you are ready to hack.
  • When developing new features please create a feature branch so that we incorporate your changes smoothly. It's also convenient for you as you could work on few things in parallel ;) In order to create a feature branch and switch to it in one swoop you can use git checkout -b my_new_cool_feature

That's it! Welcome in the community!

CI Job

javaee7-samples's People

Contributors

abhirockzz avatar aheusingfeld avatar airborn avatar arjantijms avatar arun-gupta avatar aslakknutsen avatar bartoszmajsak avatar cedriclevasseur avatar cheptsov avatar cirix avatar dagguh avatar fegalo avatar gscheibel avatar hasalex avatar jfarcand avatar kornelrabczak avatar kubamarchwicki avatar marschall avatar mgreau avatar ondrazizka avatar openwms avatar pdudits avatar psakar avatar radcortez avatar rafos avatar rhanus avatar sguilhen avatar tremes avatar xcoulon 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.