Skip to content

Commit

Permalink
Release Posters 2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jowerner committed Aug 25, 2023
2 parents 1f14a7d + ba31c9e commit 151186d
Show file tree
Hide file tree
Showing 373 changed files with 30,196 additions and 375,731 deletions.
10 changes: 8 additions & 2 deletions .classpath
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="optional" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
Expand All @@ -17,15 +23,15 @@
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
<attribute name="optional" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
Expand Down
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/data/
/logs/
/conf/*.conf
/conf/*.xml
/db/
/log/
/target/
/samples/testsuite-poster-store/results/
/samples/testsuite-poster-store/classes/
/*.sql
3 changes: 3 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions .idea/aws.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions .idea/jarRepositories.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 12 additions & 20 deletions .project
Original file line number Diff line number Diff line change
@@ -1,42 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>the-demo-poster-store</name>
<name>posters-demo-store</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.common.project.facet.core.builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.validation.validationbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
</natures>
<filteredResources>
<filter>
<id>1680755969575</id>
<name></name>
<type>30</type>
<matcher>
<id>org.eclipse.core.resources.regexFilterMatcher</id>
<arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
</matcher>
</filter>
</filteredResources>
</projectDescription>
1 change: 1 addition & 0 deletions .settings/org.eclipse.core.resources.prefs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
eclipse.preferences.version=1
encoding//src/main/java=UTF-8
encoding//src/main/resources=UTF-8
encoding//src/test/java=UTF-8
encoding//src/test/resources=UTF-8
encoding/<project>=UTF-8
8 changes: 4 additions & 4 deletions .settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes=
org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes=
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
Expand All @@ -21,8 +21,8 @@ org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=1.8
org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=17
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_additive_operator=18
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=18
Expand Down
9 changes: 0 additions & 9 deletions .settings/org.eclipse.wst.common.component

This file was deleted.

7 changes: 0 additions & 7 deletions .settings/org.eclipse.wst.common.project.facet.core.xml

This file was deleted.

1 change: 0 additions & 1 deletion .settings/org.eclipse.wst.jsdt.ui.superType.container

This file was deleted.

1 change: 0 additions & 1 deletion .settings/org.eclipse.wst.jsdt.ui.superType.name

This file was deleted.

41 changes: 41 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Contributing to the Posters Demo Store Project

You want to be part of the Posters community? Report bugs or suggest improvements in the [issue tracker](https://github.com/Xceptance/posters-demo-store/issues).

If you are a developer and want to contribute fixes or extensions, create pull requests with your changes. See below for more information on what needs to be installed and how the code is developed.


## Prerequisites

Before you can start developing Posters, you will need to:

* Install JDK 17.
* Install the latest Maven.
* Clone this repository to your local disk (or fork the repository).
* Import the Posters Maven project into your favorite IDE.


## Documentation

Posters is built with the [Ninja Framework](https://www.ninjaframework.org/). See their excellent documentation if you need more information on how the application is developed and configured.


## Development Cycle

1. Open a terminal window in the root of the Posters repository on your disk.
1. Clean the project:
```
mvn clean
```
1. Compile the project and enhance the database model classes:
```
mvn process-classes
```
1. Run the Posters application in Ninja's "SuperDevMode" (hot-reloading of modified classes and templates):
```
mvn ninja:run
```
1. Open http://localhost:8080/ in a Web browser.
1. Start changing classes or templates in your IDE. Watch the terminal to see the application being reloaded.
1. Test your changes to the application in the Web browser.

111 changes: 108 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,109 @@
Posters Demo Store
==================
# Posters Demo Store

*Posters Demo Store*, or just *Posters*, is a simple e-commerce application for demoing load testing as well as test automation.


## Features

Posters comes with the basic functionality that you would expect from a typical online shop. This includes:

* A product catalog with categories and products, in our case, posters.
* Customers may register with the shop.
* Customers can manage their account, including shipping and billing addresses as well as credit cards.
* There is a shopping cart.
* Customers may place orders as guests or as registered customers.

See these screenshots to get an impression of what the Posters Demo Store looks like.

WIP: Insert some screenshots here.

Please note that this application is for demo purposes only.


## Implementation Details

Posters is written in Java. It is built with the [Ninja Framework](https://www.ninjaframework.org/). See their excellent documentation if you need more information on how the application is developed and configured.

Posters uses [H2](https://www.h2database.com/) as a simple file-based database and [EBean](https://ebean.io/) to map Java model classes to relational tables in the database.


## Getting the Posters Application

The latest version of Posters can be downloaded at the [Releases](https://github.com/Xceptance/posters-demo-store/releases) page. Place the JAR file `posters-demo-store-<version>.jar` anywhere on your local disk.


## Building Posters

As an alternative to downloading a prepackaged JAR file, you can build the JAR yourself. You will need to have Maven and JDK 17 installed on your machine.

To build the project, clone this repository to your local disk and run:

```
mvn clean package
```

If all went well, you will find several build artifacts in the `target` subdirectory, but the most important one is `posters-demo-store-<version>.jar`. This file contains the Posters code and all required libraries (including a Web application server) in a single, ready-to-run JAR file.


## Running Posters as a Console Application

If you have successfully downloaded or built the Posters JAR file, you can now run Posters with the default settings as follows:

```
java -jar posters-demo-store-<version>.jar # downloaded
java -jar target/posters-demo-store-<version>.jar # built yourself
```

By default, the shop is available at [http://localhost:8080/](http://localhost:8080/) and [https://localhost:8443/](https://localhost:8443/). When opening the homepage via HTTPS, expect your browser to complain about the certificate since Posters comes with a self-signed certificate. See below for how to change that.

Posters stores its database and log files to the subdirectories `db` and `log`in the current directory.

When Posters is started for the first time, it will populate its database with a basic product catalog and a default customer (email: `john@doe.com` / password: `topsecret`). With more and more customers registering with the shop and placing orders, the database will grow over time.

If you want to start over with a clean database, simply stop the app and delete the subdirectory `db`. On the next start, Posters will recreate the directory and the database.


## Customizing Posters

If the default settings do not suit you, you can adjust them as needed. See below for the most important settings.

| Property | Default | Description |
| -------- | ------- | ----------- |
| ninja.mode | prod | The application mode, one of `prod`, `test`, and `dev`. |
| ninja.port | 8080 | The HTTP port. Use -1 to disable HTTP. |
| ninja.ssl.port | 8443 | The HTTPS port. Use -1 to disable HTTPS. |
| ninja.ssl.keystore.uri | classpath:/ninja/standalone/ninja-development.p12 | The URI to a key store with a custom server certificate. You will need to create and populate the key store. |
| ninja.ssl.keystore.password | password | The password to open the key store/the key. |
| ninja.context | (empty) | The context path where Posters will live, such as `/posters`. |
| logback.configurationFile | (none) | The path to a custom configuration file for the [Logback logging framework](https://logback.qos.ch/manual/configuration.html), such as `conf/logback.xml`. |

See [here](https://www.ninjaframework.org/documentation/configuration_and_modes.html) for more information on what else can be configured. Also see [application.conf](./src/main/java/conf/application.conf) for all Posters-specific settings and their defaults.

To run Posters with some custom properties:

```
java \
-Dninja.port=-1 \
-Dninja.ssl.port=443 \
-Dninja.ssl.keystore.uri=conf/keystore.jks \
-Dninja.ssl.keystore.password=topsecret \
-jar posters-demo-store-<version>.jar
```

Alternatively, you can put all these properties in a file, for example `conf/posters.conf`:

```
ninja.port = -1
ninja.ssl.port = 443
ninja.ssl.keystore.uri = conf/keystore.jks
ninja.ssl.keystore.password = topsecret
```

To run Posters with this custom configuration file:

```
java \
-Dninja.external.configuration=conf/posters.conf \
-jar posters-demo-store-<version>.jar
```

A simple e-commerce application for demoing load testing as well as test automation.
Loading

0 comments on commit 151186d

Please sign in to comment.