-
Notifications
You must be signed in to change notification settings - Fork 3
[Blog] add blog on running playwright tests in CI using github actions #162
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
base: master
Are you sure you want to change the base?
Conversation
ce3b94d to
f421f49
Compare
1d05ea0 to
742977a
Compare
742977a to
907947e
Compare
907947e to
32e6c06
Compare
32e6c06 to
9b2648e
Compare
9b2648e to
183d84e
Compare
Signed-off-by: nabim777 <[email protected]>
183d84e to
e34661c
Compare
|
|
||
|
|
||
| ## 🔍 What this Workflow Does? | ||
| This GitHub Actions file runs when you push to the `master` branch or create a pull request to `master` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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`. |
| - name: Run the project | ||
| run: | | ||
| npm run serve & | ||
| npm run backend & |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - 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 & |
individual-it
left a comment
There was a problem hiding this 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. |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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:** |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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?
| **4. Improved code quality:** | ||
| Regular running tests in CI ensures existing functionality does not become unusable if changes are made. |
There was a problem hiding this comment.
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.
Added a blog on
Running playwright tests in CI using GitHub actions