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

Initial steps into E2E testing #51

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

rajbos
Copy link
Contributor

@rajbos rajbos commented Mar 29, 2023

I used this workflow to test my changes, so I could visually see the results of the report. You can see it as an integration test to validate if the changes actually work. Unit testing is level 1, and then this is one level up. This saved me time, since I didn't have to trigger another workflow that uses my version of the action (and then trigger it with every change I made).

Copy link
Member

@UlisesGascon UlisesGascon left a comment

Choose a reason for hiding this comment

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

Hey @rajbos! I think is a great idea. I have been thinking for a while how to manage the tests for this project as this can be a tricky think soon if more people want to collaborate (#10).

Thank you so much for take the initiative in this matter! The unit testing in this scenario is quite limited as there are many things that we can't control or mock in terms of execution and so on, so E2E tests this way seems like a good approach.

I will love to add some Jest tests that can be executed as an step in each scenario that we want to cover, to avoid the need to manually review the artifacts that we are creating when we run the gh action. But I can work on that in a separate PR to don't block your changes.

Comment on lines +2 to +3
on:
push:
Copy link
Member

Choose a reason for hiding this comment

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

I think we can define the scope this way, but maybe we can leave the pull_request open to all scenarios and not only against main branch

Suggested change
on:
push:
on:
pull_request:
branches:
- main
push:
branches:
- main

@@ -0,0 +1,162 @@
name: Test the action
Copy link
Member

Choose a reason for hiding this comment

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

I will love to have more descriptive name and emoji if possible 🤣

Suggested change
name: Test the action
name: ☕️ E2E Tests

@UlisesGascon UlisesGascon changed the title Add workflow to make testing easier Initial steps into E2E testing Mar 31, 2023
@UlisesGascon UlisesGascon mentioned this pull request Mar 31, 2023
3 tasks
@UlisesGascon UlisesGascon added this to the v2.0.0-beta milestone Mar 31, 2023
@UlisesGascon UlisesGascon self-assigned this Mar 31, 2023
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.

2 participants