Skip to content

[QA] Collect the logs per test case and generate a single log file for each test case #660

Closed

Description

@saw-jan

It's difficult to navigate through the logs from the following list:

+ for f in $logs; do echo "$MC_HOST/$f 
 " | cut -d '/' -f1-3,5-99; done
https://s3.ci.opencloud.eu/public/desktop/148/logs/tst_activity/OpenCloud-1107_06.13.17.504.log.gz
https://s3.ci.opencloud.eu/public/desktop/148/logs/tst_activity/OpenCloud.log
https://s3.ci.opencloud.eu/public/desktop/148/logs/tst_addAccount/OpenCloud-1107_06.15.14.281.log.gz
https://s3.ci.opencloud.eu/public/desktop/148/logs/tst_addAccount/OpenCloud-1107_06.16.29.213.log.gz
https://s3.ci.opencloud.eu/public/desktop/148/logs/tst_addAccount/OpenCloud-1107_06.17.39.169.log.gz
https://s3.ci.opencloud.eu/public/desktop/148/logs/tst_addAccount/OpenCloud-1107_06.17.50.302.log.gz
https://s3.ci.opencloud.eu/public/desktop/148/logs/tst_addAccount/OpenCloud.log
https://s3.ci.opencloud.eu/public/desktop/148/logs/tst_checkAlltabs/OpenCloud-1107_06.18.16.254.log.gz
https://s3.ci.opencloud.eu/public/desktop/148/logs/tst_checkAlltabs/OpenCloud.log
https://s3.ci.opencloud.eu/public/desktop/148/logs/tst_deleteFilesFolders/OpenCloud-1107_06.19.28.170.log.gz
https://s3.ci.opencloud.eu/public/desktop/148/logs/tst_deleteFilesFolders/OpenCloud-1107_06.19.46.206.log.gz
https://s3.ci.opencloud.eu/public/desktop/148/logs/tst_deleteFilesFolders/OpenCloud-1107_06.20.04.362.log.gz
https://s3.ci.opencloud.eu/public/desktop/148/logs/tst_deleteFilesFolders/OpenCloud-1107_06.20.23.290.log.gz
...

Therefore, let's collect the logs per test case in a single file. This way, we won't have multiple log files, including archive files, for a single test case. And it would be easier to find the log file of interest.

TODO:

  • Accumulate the logs of a test case into a single file
  • Separate the scenario logs

Final logs list should look like this:

https://s3.ci.opencloud.eu/public/desktop/148/logs/tst_activity/OpenCloud.log
https://s3.ci.opencloud.eu/public/desktop/148/logs/tst_addAccount/OpenCloud.log
https://s3.ci.opencloud.eu/public/desktop/148/logs/tst_checkAlltabs/OpenCloud.log
...

Example code:

if os.getenv("CI"):
with open(test_report_dir + "/serverlog.log", "a", encoding="utf-8") as f:
f.write(
str((datetime.now()).strftime("%H:%M:%S:%f"))
+ "\tBDD Scenario: "
+ context.title
+ "\n"
)

Activity

  1. github-actions commented on Dec 8, 2025

    @github-actions

    This issue was marked stale because it has been open for 30 days with no activity. Remove the stale label or comment or this will be closed in 7 days.

  2. added this to the Backlog milestone on Dec 8, 2025
  3. saw-jan commented on May 28, 2026

    @saw-jan
    ContributorAuthor

    done in #895

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions