Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Archive screenshots in GHA #465

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

gilbysunil14
Copy link
Contributor

Created a new step in the workflow to archive screenshots.

Fixes #441

@gilbysunil14 gilbysunil14 self-assigned this Jan 13, 2025
@@ -269,6 +270,39 @@ it('attach debugger for start with custom parameter event', async () => {

}).timeout(350000);

Copy link
Contributor

@aparnamichael aparnamichael Jan 16, 2025

Choose a reason for hiding this comment

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

Please add a comment here explaining the purpose of this after hook and reason for adding after hook here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added the comment.

});

function copyFolderContents(sourceFolder: string, destinationFolder: string): void {
console.log('source folder', sourceFolder);
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove unneccessary logs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed.


# Archive screenshots
- name: Archive screenshots
if: always()
Copy link
Contributor

Choose a reason for hiding this comment

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

This means screenshot will capture even if tests are success?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It means that the screenshot will be captured even if the tests are failed. In GHA, the following steps after a failure are skipped. if always() ensures that the screenshots are archived even if the steps above are failing which means the screenshots will be archived even after a test failure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Investigate how to get videos/screenshots of failed tests in GHA using VScode extension tester
2 participants