Skip to content

Conversation

@nabim777
Copy link
Member

@nabim777 nabim777 commented Apr 9, 2025

Added a blog on Running playwright tests in CI using GitHub actions

@nabim777 nabim777 self-assigned this Apr 9, 2025
@nabim777 nabim777 added the blog New blog label Apr 9, 2025
@nabim777 nabim777 force-pushed the blog-on-githubactions branch 2 times, most recently from ce3b94d to f421f49 Compare June 4, 2025 10:56
@nabim777 nabim777 force-pushed the blog-on-githubactions branch 2 times, most recently from 1d05ea0 to 742977a Compare June 13, 2025 09:42
@nabim777 nabim777 marked this pull request as ready for review June 13, 2025 09:43
@nabim777 nabim777 force-pushed the blog-on-githubactions branch from 742977a to 907947e Compare June 13, 2025 09:44
@nabim777 nabim777 changed the title [Blog] add blogs on running playwright tests in CI using github actions [Blog] add blog on running playwright tests in CI using github actions Jun 17, 2025
@nabim777 nabim777 force-pushed the blog-on-githubactions branch from 907947e to 32e6c06 Compare June 26, 2025 06:10
@nabim777 nabim777 force-pushed the blog-on-githubactions branch from 32e6c06 to 9b2648e Compare June 26, 2025 06:15
@nabim777 nabim777 force-pushed the blog-on-githubactions branch from 9b2648e to 183d84e Compare July 2, 2025 06:00
@nabim777 nabim777 force-pushed the blog-on-githubactions branch from 183d84e to e34661c Compare July 2, 2025 06:01
@nabim777 nabim777 requested a review from anon-pradip July 2, 2025 06:01


## 🔍 What this Workflow Does?
This GitHub Actions file runs when you push to the `master` branch or create a pull request to `master`
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
This GitHub Actions file runs when you push to the `master` branch or create a pull request to `master`
This GitHub Actions file runs when you push to the `master` branch or create a pull request to `master`.

Comment on lines +106 to +109
- name: Run the project
run: |
npm run serve &
npm run backend &
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- name: Run the project
run: |
npm run serve &
npm run backend &
- name: Install dependencies
run: npm install
- name: Run the project
run: |
npm run serve &
npm run backend &

Copy link
Member

@individual-it individual-it left a comment

Choose a reason for hiding this comment

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

nice short blog post, but not much new value added on top of https://blog.jankaritech.com/#/blog/Introduction%20to%20GitHub%20Actions%20-%20CI%20%26%20CD
It's basically the same thing just very specific to playwright tests.
Any idea how you could add more value for the reader?

Regular running tests in CI ensures existing functionality does not become unusable if changes are made.

**5. Reduced integration issues:**
By regularly integrating and testing the code in CI, you reduce the risk of conflicts when merging large patches of code.
Copy link
Member

Choose a reason for hiding this comment

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

how does running the tests in CI help with merge conflicts?
Bob writes some code and adjusts tests => CI is green for him
Alice changes some code in a similar area and adjusts tests => CI is green for her
whoever merges first wins and the second one has to fix the merge-conflict. How does CI help with that?


In this blog, I have taken simple applications built using Vue.js. The GitHub repository is available at: https://github.com/nabim777/momo-restro-list.git

This is a basic application that includes login and logout functionality. E2E test is written using Playwright to verify the login feature.
Copy link
Member

Choose a reason for hiding this comment

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

is there only one test or multiple?

**1. Early bug detection:**
By automatically running tests after every code commit, you can quickly identify issues as they arise, preventing them from accumulating and causing larger problems later on.

**2. Fast feedback loop:**
Copy link
Member

Choose a reason for hiding this comment

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

how is that different from point 1?

Developers get immediate notification for failing tests. That way they can fix bugs immediately and iterate quickly.

**3. Consistent testing environment:**
The CI servers run tests in an uniform environment. Therefore, there is no correlation between the developer configurations.
Copy link
Member

Choose a reason for hiding this comment

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

I don't understand that point.
correlation between what and what?

Comment on lines +25 to +26
**4. Improved code quality:**
Regular running tests in CI ensures existing functionality does not become unusable if changes are made.
Copy link
Member

Choose a reason for hiding this comment

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

for me code quality and functionality are two different things.
Code quality is about having nice structured code, following formatting rules, principles like SOLID etc. Running UI tests in CI will not help with that.
Functionality can be achieved even with bad code quality (even harder and more difficult to maintain). UI tests will only check the functionality, not the code quality.

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

Labels

blog New blog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants