Giter Site home page Giter Site logo

sample-webapp's Introduction

What
====

A sample webapp

* Jersey
* Jetty Web server
* Maven
* TestNG for UnitTest
* Selenium for Integration Tests
* JMockit Coverage for Coverage Tests

Steps
====

To run unit tests (including code coverage ) and webapp

* mvn package
* mvn jetty:run
* curl http://127.0.0.1:8080/api/hello   ( will point to servlet )
* curl http://127.0.0.1:8080/static/test.html ( will point to static content )
* curl http://127.0.0.1:8080/api/api-docs  ( swagger )

To run integration tests

* make sure that popup blocker is disabled in Safari
* mvn verify

Unit Test results are available in target/surefire-reports/index.html
Coverage results are available in target/my-coverage-report/index.html

Tests
=====

All tests that use selenium ( integration tests ) must end with the **IntegrationTest.java. These
files are configured in the pom to be excluded from unit tests ( by surefire plugin ) and included
in integration tests ( by failsafe plugin )

Tags
====

Run the following command to see list of all the git tags

git tag -n

Running and Debugging from inside IntelliJ
===========================================

Go to Maven Projects tab, then expand Plugins/jetty, right-click jetty:run and select Run /  Debug.

Swagger
=======

* QuickStart https://github.com/wordnik/swagger-core/wiki/Java-JAXRS-Quickstart
* UI https://github.com/wordnik/swagger-ui

Stuff To Do
===========

- Make the swagger UI point to itself without requiring any manual configuration


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.