You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -750,6 +750,49 @@ If you use this option, the only way to generate a new report up to date it's us
750
750
CHECK_RESULTS_EVERY_SECONDS: NONE
751
751
```
752
752
753
+
-`CHECK_RESULTS_EVERY_SECONDS=3` It's only useful for executions in your`LOCAL` machine. With this option ENABLED the container detects any changes in the `allure-results` directory. Every time detects a new file, the container will generate a new report. The workflow will be the next:
754
+
755
+
1. Start `allure-docker-service` via docker-compose mounting the `allure-results` volume that your project will use to storage the results files. It's recommended to use this configuration [SINGLE PROJECT - LOCAL REPORTS](#SINGLE-PROJECT---LOCAL-REPORTS)
756
+
2. Generate your allure results with any Allure Framework according technology (Allure/Cucumber/Java, Allure/Specflow/C#, Allure/CucumberJS/NodeJS, etc). Your results will be stored in a directory named `allure-results` in any directory inside your project. Remember to use the same location that you are mounting when you start the docker container in the previous step. Also, never remove that `allure-results` directory, otherwise docker will lose the reference to that volume.
757
+
3. Every time new results files are generated during every test execution, automatically the containers will detects those changes and it will generate a new report.
758
+
4. You will see the report generated
759
+
5. If you see multiple reports that it doesn't represent the real quantity of executions it's because the report is generated each time detects changes in the `allure-results` directory including existing previous results files in that directory. That's the reason is only useful locally.
760
+
761
+
-`CHECK_RESULTS_EVERY_SECONDS=NONE`. This option is useful when you deploy `allure-docker-service` in a server and you are planning to feed results from any CI tool. With this option DISABLED the container won't detect any changes in the `allure-results` directory (Otherwise, it's higly cost if you handle multiple projects in terms of processor comsuption). The report won't be generated until you generate the report on demand using the API `GET /generate-report`. This will be the workflow:
762
+
763
+
From any server machine:
764
+
1. Deploy `allure-docker-service` using [Kubernetes](#deploy-using-kubernetes) or any other tool in any server. It's recommended to use this configuration [MULTIPLE PROJECTS - REMOTE REPORTS](#MULTIPLE-PROJECTS---REMOTE-REPORTS).
765
+
2. Make sure the server is accessible from where your scripts are requesting the API.
766
+
767
+
From your automation tests project:
768
+
1. Request endpoint `GET /clean-results` (specify project if it's needed) to clean all existing results. This will be `BEFORE` starting any test execution.
769
+
2. Execute your tests and generate your allure results with any Allure Framework according technology (Allure/Cucumber/Java, Allure/Specflow/C#, Allure/CucumberJS/NodeJS, etc).
770
+
3. Once all your tests were executed, send all your results generated recently using the endpoint `POST /send-results` (specify project if it's needed).
771
+
4. You won't see any report generated because at the moment you have only your results stored in the container.
772
+
5. Now that you have all the info (allure results files) in the server, you can request the endpoint `GET /generate-report`. This action will build the report to be show.
773
+
774
+
775
+
NOTE:
776
+
- Scripts to interact with the API: [Send results through API](#send-results-through-api) (Check commented code in the scripts).
777
+
778
+
- If you execute `GET /generate-report` endpoint after every test execution, you will see multiple reports that doesn't represent your executions, that is because the container is building the report taking in count existing results files. For that reason, we use the `GET /clean-results` endpoint before starting any new execution to delete all results not related the current execution.
779
+
780
+
Resume:
781
+
```sh
782
+
---EXECUTION 1---
783
+
1. Clean results files to avoid data from previous results files - GET /clean-results
784
+
2. Execute Suite1
785
+
3. Execute Suite2
786
+
4. Execute Suite3
787
+
5. Wait for all suites to finish
788
+
6. Send results using endpoints - POST /send-results
789
+
7. Generate report using endpoint - GET /generate-report
790
+
Report will include all suites results from this execution.
791
+
792
+
---EXECUTION 2---
793
+
Same steps from previous execution (don't forget to clean results first)
794
+
```
795
+
753
796
#### Keep History and Trends
754
797
`Available from Allure Docker Service version 2.12.1`
755
798
@@ -1338,9 +1381,13 @@ If you want to use docker without sudo, read following links:
0 commit comments