Allure server for store / aggregate / manage Allure results and generate / manage Allure Reports.
There is simple API with Swagger(OpenAPI) Description.
Just use Spring Boot Jar from Release Page.
Web GUI has been available from Release v2.0.0
Example on allure.iopump.ru
There is a docker image on Docker Hub: allure-server Running as Docker container look at: readme
Get the latest release Releases
Download allure-server.jar
Update your jre(jdk) up to Java 11
Execute command java -jar allure-server.jar
Got to https://localhost:8080
- will redirect to OpenAPI (Swagger UI)
Upload results or use GitHub Actions
Only allure2 supported
Make some allure results and create zip
archive with these results, for example allure-results.zip
in your root dir
curl -X POST 'https://localhost:8080/api/result' \
-H "accept: */*" \
-H "Content-Type: multipart/form-data" \
-F "[email protected];type=application/x-zip-compressed"
Response:
{
"fileName": "allure-results.zip",
"uuid": "1037f8be-68fb-4756-98b6-779637aa4670"
}
Save uuid
Don't forget specify form item Content type as application/zip
. Server works with zip
archives only!
For generate new report execute POST
request with json
body:
curl --location --request POST 'https://localhost:8080/api/report' \
--header 'Content-Type: application/json' \
--data-raw '{
"reportSpec": {
"path": [
"master",
"666"
],
"executorInfo": {
"buildName": "#666"
}
},
"results": [
"1037f8be-68fb-4756-98b6-779637aa4670"
],
"deleteResults": false
}'
Response:
{
"uuid": "c994654d-6d6a-433c-b8e3-90c77d0e8163"
"path": "master/666",
"url": "https://localhost:8080/allure/reports/c994654d-6d6a-433c-b8e3-90c77d0e8163/",
"latest": "https://localhost:8080/reports/master/666",
}
Memorize url
⚠️ Generated Reports, and their History are grouping bypath
key. This key means something likeproject
orjob
orbranch
. The latest report with the samepath
will be active: It is not a real path - it's a logical path. The same situation withpath
column in GUI!
After generating you can access the latest report by https://localhost:8080/allure/reports/master/666/index.html
You may get all reports
curl --location --request GET 'https://localhost:8080/api/report'
Or by path as branch name master
curl --location --request GET 'https://localhost:8080/api/report?path=master'
You may get all uploaded results:
curl --location --request GET 'https://localhost:8080/api/result'
You can clear all results or reports:
curl --location --request DELETE 'https://localhost:8080/api/result'
curl --location --request DELETE 'https://localhost:8080/api/report'
Or clear reports older than date (in epoch seconds):
curl --location --request DELETE 'https://localhost:8080/api/report?seconds=1604693740'
From version 1.2.0
all reports manage with Database and have unic uuids.
Old format is no longer supported, but you can convert reports created before 1.2.0 - just set 'allure.support.old.format' to 'true' in
Spring Configutaion:
- system vars (JVM option)
-Dallure.support.old.format=true
- environment vars
export allure.support.old.format=true
- in docker environment vars
-e allure.support.old.format=true
ENV | TYPE | DEFAULT | DESCRIPTION |
---|---|---|---|
spring.datasource.url | string | jdbc:h2:file:./allure/db | H2 jdbc connection string. By default DB file will be created/read on startup. Postgres driver supported! |
PORT | int | 8080 | Tomcat http port |
allure.results.dir | string | allure/results/ | Unzipped results store |
allure.reports.dir | string | allure/reports/ | Generated results store |
allure.reports.path | string | reports/ | Url path (after base url) to acccess to reports |
allure.reports.history.level | int | 20 | Number of reports in history |
allure.support.old.format | boolean | false | Auto-convert old format reports to new and add to db |
JAVA_OPTS | string | -Xms256m -Xmx2048m | Java memory options for container |
allure.date.format | string | yy/MM/dd HH:mm:ss | Date Time format in grid |
allure.report.url.base | string | Define custom base url for results. If your server behind the proxy or other troubles to get server external hostname. Don't forget about '/' at the end | |
basic.auth.enable | boolean | false | Enable Basic Authentication |
basic.auth.username | string | admin | Username for basic auth |
basic.auth.password | string | admin | Password for basic auth |
Every spring boot setting can be passed through ENV variables with a little changes according to spring boot cfg docs For example:
allure.report.host
transform toALLURE_REPORT_HOST
Postgres database supported!
You can mount external jars to
/ext
folder in the container, and they will be available in app classpath.
For example you may add new jdbc drivers
volumes:
- ./ext:/ext:rw
See docker compose:
docker-compose with Postgres integration
docker-compose with default H2 database
Thx Xotabu4
There is external GitHub Action to sent and generate Allure Reports: send-to-allure-server-action
Compresses allure-results, sends to kochetkov-ma/allure-server , and triggers allure report generation on it. Result of this action - is URL to generated report.
Works for any test project languages (java, .net, js/ts, python, etc), for any testing frameworks (junit, pytest, cucumber, mocha, jest ...) that has allure reporter configured.
Example:
- name: Send Results and Generate Allure Report
uses: Xotabu4/send-to-allure-server-action@1
# always() needed because we want report for failed tests as well
if: ${{ always() }}
with:
allure-server-url: 'https://my-allure-server.com:5001/'
See example on allure.iopump.ru
Allure Server provide WEB UI to access to reports and results.
By default WEB UI is available on path /ui
and there is redirection from /
to /ui
Example: https://localhost:8080/ui
WEB UI provides the same functions as a REST API
WEB UI is implemented with Vaadin 14
⚠️ Generated Reports, and their History are grouping bypath
key. This key means something likeproject
orjob
orbranch
. The latest report with the samepath
will be active: It is not a real path - it's a logical path. The same situation withpath
column in GUI!