Skip to content

WDIOService logs to file and upload to server#11580

Merged
christian-bromann merged 9 commits intowebdriverio:mainfrom
kamal-kaur04:wdio-service-logs-to-file
Nov 6, 2023
Merged

WDIOService logs to file and upload to server#11580
christian-bromann merged 9 commits intowebdriverio:mainfrom
kamal-kaur04:wdio-service-logs-to-file

Conversation

@kamal-kaur04
Copy link
Contributor

Proposed changes

Writing all the WDIOService logs to File and upload to the server.

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Checklist

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • I have added proper type definitions for new commands (if appropriate)

Further comments

Reviewers: @webdriverio/project-committers

@kamal-kaur04 kamal-kaur04 marked this pull request as draft November 3, 2023 05:09
@kamal-kaur04 kamal-kaur04 marked this pull request as ready for review November 3, 2023 09:41

export const sleep = (ms = 100) => new Promise((resolve) => setTimeout(resolve, ms))

export async function uploadLogs(user: string | undefined, key: string | undefined, clientBuildUuid: string) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the request actually succeeding if no user and key is provided? if you only allow undefined so it doesn't throw a type issue I recommend to have something like:

if (user && key) {
    uploadLogs(...)
}

Copy link
Member

@christian-bromann christian-bromann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍
Thanks a lot!

@christian-bromann christian-bromann added the PR: New Feature 🚀 PRs that contain new features label Nov 6, 2023
@christian-bromann christian-bromann merged commit 7ed8367 into webdriverio:main Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: New Feature 🚀 PRs that contain new features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants