Skip to content

Commit 151186d

Browse files
committed
Release Posters 2.0.0
2 parents 1f14a7d + ba31c9e commit 151186d

File tree

373 files changed

+30196
-375731
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

373 files changed

+30196
-375731
lines changed

.classpath

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66
<attribute name="maven.pomderived" value="true"/>
77
</attributes>
88
</classpathentry>
9+
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
10+
<attributes>
11+
<attribute name="maven.pomderived" value="true"/>
12+
<attribute name="optional" value="true"/>
13+
</attributes>
14+
</classpathentry>
915
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
1016
<attributes>
1117
<attribute name="optional" value="true"/>
@@ -17,15 +23,15 @@
1723
<attributes>
1824
<attribute name="maven.pomderived" value="true"/>
1925
<attribute name="test" value="true"/>
26+
<attribute name="optional" value="true"/>
2027
</attributes>
2128
</classpathentry>
2229
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
2330
<attributes>
2431
<attribute name="maven.pomderived" value="true"/>
25-
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
2632
</attributes>
2733
</classpathentry>
28-
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
34+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17">
2935
<attributes>
3036
<attribute name="maven.pomderived" value="true"/>
3137
</attributes>

.gitignore

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
/data/
2-
/logs/
1+
/conf/*.conf
2+
/conf/*.xml
3+
/db/
4+
/log/
35
/target/
4-
/samples/testsuite-poster-store/results/
5-
/samples/testsuite-poster-store/classes/
66
/*.sql

.idea/.gitignore

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/aws.xml

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/compiler.xml

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/encodings.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/jarRepositories.xml

Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.project

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,34 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<projectDescription>
3-
<name>the-demo-poster-store</name>
3+
<name>posters-demo-store</name>
44
<comment></comment>
55
<projects>
66
</projects>
77
<buildSpec>
8-
<buildCommand>
9-
<name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
10-
<arguments>
11-
</arguments>
12-
</buildCommand>
138
<buildCommand>
149
<name>org.eclipse.jdt.core.javabuilder</name>
1510
<arguments>
1611
</arguments>
1712
</buildCommand>
18-
<buildCommand>
19-
<name>org.eclipse.wst.common.project.facet.core.builder</name>
20-
<arguments>
21-
</arguments>
22-
</buildCommand>
23-
<buildCommand>
24-
<name>org.eclipse.wst.validation.validationbuilder</name>
25-
<arguments>
26-
</arguments>
27-
</buildCommand>
2813
<buildCommand>
2914
<name>org.eclipse.m2e.core.maven2Builder</name>
3015
<arguments>
3116
</arguments>
3217
</buildCommand>
3318
</buildSpec>
3419
<natures>
35-
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
36-
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
3720
<nature>org.eclipse.jdt.core.javanature</nature>
3821
<nature>org.eclipse.m2e.core.maven2Nature</nature>
39-
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
40-
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
4122
</natures>
23+
<filteredResources>
24+
<filter>
25+
<id>1680755969575</id>
26+
<name></name>
27+
<type>30</type>
28+
<matcher>
29+
<id>org.eclipse.core.resources.regexFilterMatcher</id>
30+
<arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
31+
</matcher>
32+
</filter>
33+
</filteredResources>
4234
</projectDescription>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
eclipse.preferences.version=1
22
encoding//src/main/java=UTF-8
3+
encoding//src/main/resources=UTF-8
34
encoding//src/test/java=UTF-8
45
encoding//src/test/resources=UTF-8
56
encoding/<project>=UTF-8

.settings/org.eclipse.jdt.core.prefs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
1010
org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes=
1111
org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes=
1212
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
13-
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
13+
org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
1414
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
15-
org.eclipse.jdt.core.compiler.compliance=1.8
15+
org.eclipse.jdt.core.compiler.compliance=17
1616
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
1717
org.eclipse.jdt.core.compiler.debug.localVariable=generate
1818
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
@@ -21,8 +21,8 @@ org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
2121
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
2222
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
2323
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
24-
org.eclipse.jdt.core.compiler.release=disabled
25-
org.eclipse.jdt.core.compiler.source=1.8
24+
org.eclipse.jdt.core.compiler.release=enabled
25+
org.eclipse.jdt.core.compiler.source=17
2626
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
2727
org.eclipse.jdt.core.formatter.alignment_for_additive_operator=18
2828
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=18

.settings/org.eclipse.wst.common.component

Lines changed: 0 additions & 9 deletions
This file was deleted.

.settings/org.eclipse.wst.common.project.facet.core.xml

Lines changed: 0 additions & 7 deletions
This file was deleted.

.settings/org.eclipse.wst.jsdt.ui.superType.container

Lines changed: 0 additions & 1 deletion
This file was deleted.

.settings/org.eclipse.wst.jsdt.ui.superType.name

Lines changed: 0 additions & 1 deletion
This file was deleted.

CONTRIBUTING.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Contributing to the Posters Demo Store Project
2+
3+
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).
4+
5+
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.
6+
7+
8+
## Prerequisites
9+
10+
Before you can start developing Posters, you will need to:
11+
12+
* Install JDK 17.
13+
* Install the latest Maven.
14+
* Clone this repository to your local disk (or fork the repository).
15+
* Import the Posters Maven project into your favorite IDE.
16+
17+
18+
## Documentation
19+
20+
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.
21+
22+
23+
## Development Cycle
24+
25+
1. Open a terminal window in the root of the Posters repository on your disk.
26+
1. Clean the project:
27+
```
28+
mvn clean
29+
```
30+
1. Compile the project and enhance the database model classes:
31+
```
32+
mvn process-classes
33+
```
34+
1. Run the Posters application in Ninja's "SuperDevMode" (hot-reloading of modified classes and templates):
35+
```
36+
mvn ninja:run
37+
```
38+
1. Open http://localhost:8080/ in a Web browser.
39+
1. Start changing classes or templates in your IDE. Watch the terminal to see the application being reloaded.
40+
1. Test your changes to the application in the Web browser.
41+

README.md

Lines changed: 108 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,109 @@
1-
Posters Demo Store
2-
==================
1+
# Posters Demo Store
2+
3+
*Posters Demo Store*, or just *Posters*, is a simple e-commerce application for demoing load testing as well as test automation.
4+
5+
6+
## Features
7+
8+
Posters comes with the basic functionality that you would expect from a typical online shop. This includes:
9+
10+
* A product catalog with categories and products, in our case, posters.
11+
* Customers may register with the shop.
12+
* Customers can manage their account, including shipping and billing addresses as well as credit cards.
13+
* There is a shopping cart.
14+
* Customers may place orders as guests or as registered customers.
15+
16+
See these screenshots to get an impression of what the Posters Demo Store looks like.
17+
18+
WIP: Insert some screenshots here.
19+
20+
Please note that this application is for demo purposes only.
21+
22+
23+
## Implementation Details
24+
25+
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.
26+
27+
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.
28+
29+
30+
## Getting the Posters Application
31+
32+
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.
33+
34+
35+
## Building Posters
36+
37+
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.
38+
39+
To build the project, clone this repository to your local disk and run:
40+
41+
```
42+
mvn clean package
43+
```
44+
45+
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.
46+
47+
48+
## Running Posters as a Console Application
49+
50+
If you have successfully downloaded or built the Posters JAR file, you can now run Posters with the default settings as follows:
51+
52+
```
53+
java -jar posters-demo-store-<version>.jar # downloaded
54+
java -jar target/posters-demo-store-<version>.jar # built yourself
55+
```
56+
57+
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.
58+
59+
Posters stores its database and log files to the subdirectories `db` and `log`in the current directory.
60+
61+
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.
62+
63+
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.
64+
65+
66+
## Customizing Posters
67+
68+
If the default settings do not suit you, you can adjust them as needed. See below for the most important settings.
69+
70+
| Property | Default | Description |
71+
| -------- | ------- | ----------- |
72+
| ninja.mode | prod | The application mode, one of `prod`, `test`, and `dev`. |
73+
| ninja.port | 8080 | The HTTP port. Use -1 to disable HTTP. |
74+
| ninja.ssl.port | 8443 | The HTTPS port. Use -1 to disable HTTPS. |
75+
| 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. |
76+
| ninja.ssl.keystore.password | password | The password to open the key store/the key. |
77+
| ninja.context | (empty) | The context path where Posters will live, such as `/posters`. |
78+
| 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`. |
79+
80+
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.
81+
82+
To run Posters with some custom properties:
83+
84+
```
85+
java \
86+
-Dninja.port=-1 \
87+
-Dninja.ssl.port=443 \
88+
-Dninja.ssl.keystore.uri=conf/keystore.jks \
89+
-Dninja.ssl.keystore.password=topsecret \
90+
-jar posters-demo-store-<version>.jar
91+
```
92+
93+
Alternatively, you can put all these properties in a file, for example `conf/posters.conf`:
94+
95+
```
96+
ninja.port = -1
97+
ninja.ssl.port = 443
98+
ninja.ssl.keystore.uri = conf/keystore.jks
99+
ninja.ssl.keystore.password = topsecret
100+
```
101+
102+
To run Posters with this custom configuration file:
103+
104+
```
105+
java \
106+
-Dninja.external.configuration=conf/posters.conf \
107+
-jar posters-demo-store-<version>.jar
108+
```
3109

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

0 commit comments

Comments
 (0)