Giter VIP home page Giter VIP logo

bakery-app-starter-fw8-spring's Introduction

Running the project

mvn spring-boot:run

Wait for the application to start

Open http://localhost:8080/ to view the application.

Default credentials are [email protected]/admin for admin access and [email protected]/barista for normal user access.

Running the project as an executable jar

The project is configured to automatically make the build artifact runnable using java -jar. By default you can thus also run the project by executing the war file:

java -jar target/###artifactId###-1.0-SNAPSHOT.war

If you want to produce a jar file instead of a war file, change the packaging type in pom.xml to <packaging>jar</packaging>.

You also need to configure Vaadin resources and Designer templates to be included into the jar:

<build>
 ...
    <resources>
        <resource>
            <directory>src/main/webapp</directory>
                <filtering>false</filtering>
        </resource>
        <resource>
            <directory>src/main/resources</directory>
                <filtering>false</filtering>
        </resource>
    </resources>
 ...
</build>

Running integration tests

Integration tests are implemented using TestBench. The tests take tens of minutes to run and are therefore included in a separate profile. To run the tests, execute

mvn verify -Pit

and make sure you have a valid TestBench license installed.

Running scalability tests

Scalability tests can be run as follows

  1. Configure the number of concurrent users and a suitable ramp up time in the end of the src/test/scala/*.scala files, e.g.: setUp(scn.inject( rampUsers(50) over (60 seconds)) ).protocols(httpProtocol)

  2. If you are not running on localhost, configure the baseUrl in the beginning of the src/test/scala/*.scala files, e.g.:

    val baseUrl = "http://my.server.com"

  3. Make sure the server is running at the given URL. To run the local server, use mvn spring-boot:run

  4. Start a test from the command line, e.g.: mvn -Pscalability gatling:execute -Dgatling.simulationClass=com.vaadin.starter.bakery.Barista

  5. Test results are stored into target folder, e.g.: target/gatling/Barista-1487784042461/index.html

Developing the project

The project can be imported into the IDE of your choice as a Maven project

The views are created using Vaadin Designer. To edit the views visually, you need to install the Vaadin Designer plug-in.

In Eclipse, open Marketplace, search for "vaadin" and install Vaadin Designer 2.x

In IntelliJ, go to "Preferences" -> "Plugins" -> "Browse Repositories", search for "Vaadin Designer 2" and install "Vaadin Designer"

License

A paid Pro or Prime subscription is required for creating a new software project from this starter. After its creation, results can be used, developed and distributed freely, but licenses for the used commercial components are required during development. The starter or its parts cannot be redistributed as a code example or template.

For full terms, see LICENSE

bakery-app-starter-fw8-spring's People

Contributors

alvarezguille avatar artur- avatar diegocardoso avatar emarc avatar johannesh2 avatar johannest avatar legioth avatar ollitietavainenvaadin avatar peppe avatar peterl1084 avatar vaadin-bot avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

eoscorp mvysny

bakery-app-starter-fw8-spring's Issues

Document "Setting up continous integration"

How do I setup the project on GitHub + Travis so that each PR is validated and tested automatically.

While the target audience likely does not use Travis, this will still cover the basic requirements for a CI setup. It can be later expanded to cover e.g. GitLab + Jenkins

Implement proper CRUD logic for all admin views

The current one is missing a lot of the details

  • set button caption according to state
  • enabling/disabling buttons according to state (save/add/cancel/delete)
  • navigating away when the form is open (show confirmation dialog)
  • selecting another item when the form is open (show confirmation dialog)

Starting up server takes too long

Setting up server takes about 20s as it sets up a lot of repositories. Every time you make a code change and deploy it, you have to wait 20s for the redeployment. This is a productivity killer.

Document "Architecture overview"

"How does Designer help"
"How are test setup and run"
"How authorization works”
“What are the architectural boundaries and when to cross them

TestBench test

There should be tests that prove all parts of the UI works

Document "Getting started and customizing"

"How do you get the application up and running"
"How do you add a view"
"How do you add an entity"
“Tips for development workflow”
"How should you run things to get changes to show up as quickly as possible in your browser"

Document scalability test

  • How can they be run locally
  • How can they be run on a CI for validation that a patch does not destroy performance

Instructions to everything.

Need documentation on how to get started with it. Also README could be longer.

Running application, Adding to IDE, running tests, what can be found where, etc...

Optimize login page by using inline theme

There is no point in loading the full Valo theme to show the login page. Instead the login page should be stand alone and Valo should be loaded in the background while the user is logging in

Scalability tests

There should be scalability tests and a report proving the scalability

Have an simple execution script in project root.

I keep forgetting that the run command in mvn spring-boot:run. I think we should have a script so that you can only type ./run in root to start up the project. It could directly call spring-boot. I think JHipster had something similar.

Test that an order can be updated

testAddComment()

  1. Storefront -> select order
  2. Add comment
  3. Ensure comment is there and date + author is correct
  4. Refresh
  5. Ensure comment is there and date + author is correct

testUpdateCustomer():

  1. Storefront -> select order
  2. Modify all customer details
  3. Save
  4. Assert customer details were updated
  5. Refresh
  6. Assert customer details were updated

testUpdateProducts()

  1. Storefront -> select order
  2. Update type + quantity for existing
  3. Add new product
  4. Save
  5. Assert product was updated
  6. Refresh
  7. Assert product was updated

testCancelUpdate()

  1. Storefront -> select order
  2. Update customer info
  3. Update product info
  4. Press cancel
  5. Assert nothing changed
  6. Refresh
  7. Assert nothing changed

Problem state with comment

The specs for the order edit page in report mode contains a "Problem..." button with a popup. The button should be added and the same popup should be shown if you select "Problem" in the "Set state" popup

Test that a new order can be added

testNewOrderVisuals():

  1. Storefront -> add
  2. Assert view status, e.g. should not say "#null" like right now
  3. Should not have a "set state" button
  4. Should have enabled "Cancel", "Done", "Add items...", "Add comment" buttons

testAddOrder():

  1. Storefront -> add
  2. Fill data in all fields
  3. Add a couple of items
  4. Save
  5. Assert order was saved

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.