Hi, AB! The content on this channel is very helpful and practical, you are a great teacher! Could you please, explain to me: how does this approach to parallelism differ from using parallel:true and Cypress Cloud? In which situation would you use one over the other?
Thank you for your time and contributions to the testing community. I’m currently using Cypress ("cypress": "^13.14.2"), and I've encountered an issue. When I push to GitHub Actions, a single spec file doesn’t execute, but when running two spec files, they both work without any problems. Could you kindly advise on what might be causing this behavior?
Really Wonderful Easy to understand explanation madam.Thanks. One query, I have just started learning Automation testing (basically manual tester till now).while searching in online, some people saying cypress won't last long as they have budget constraints and other tools like playwright will run over cypress next year.Is it true, could you please clarify on future of Cypress like next 2-3 years. Thanks.
Few days back Cypress released an new feature ‘Test Replay’, which comes with free of cost if you’re using Dashboard.. If Company has any budget issues, why would they release free products and spend so much time and money in enhancing the products.. I don’t see it shutting down anytime soon. . So, don’t worry and if you are planning to learn it,go ahead.
Hi Anshita, Is it possible to run in order like parallel-build.yml for the first and followed by the other, I guess our code is running in random order. can you please clarify me on this.
@surensura2488 - Yes, we can do it by specifying dependencies between workflows in GitHub Actions. You can use the workflow_run event with the types: completed condition in your workflow configuration to trigger the second workflow when the first one has successfully completed. Example - You can pass the below code in your second workflow file. on: workflow_run: workflows: [parallel-build] types: - completed
Hi Anshita, Thank you for this video, I tried running my script using the same steps you told. but getting error when I push code ( error: Can't run because no spec files were found. We searched for specs matching this glob pattern:) can you please assist. I have my specs in different folder not in e2e by default.
In your case, the first step is to modify the specPattern in the cypress.config.js file (for example, specPattern:"cypress/tests/*.cy.js"). Afterward, you should also update the script specified in the package.json file. For example, under "scripts," pass the script "scripts": { "test": "npx cypress run --spec cypress/tests/screenshot.cy.js" } Once these changes are made, you can verify in the terminal whether the command is functioning correctly by using "npm run " (e.g., npm run test). If everything is set up properly, it should work. Please let me know if you face any further issues.
Hi Anshita, I had created two different jobs one for chrome and other for FF, Both the test cases being executed in electron. When I mentioned chrome for both the jobs still test cases being executed in electron. Is this right approach, Below is the .yml file. Please let me know. name: Parallel Test on: [push,pull_request] jobs: Login-Test: timeout-minutes: 120 runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v3 - name: Chrome Browser uses: cypress-io/github-action@v5 with: command: npm run test:loginTest browser: chrome Update-Test: timeout-minutes: 120 runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v3 - name: Chrome Browser uses: cypress-io/github-action@v5 with: command: npm run test:updateEmailTest browser: chrome
Hi @rekha, if you provide a "command" parameter, the browser selection is ignored. To address this, you have two options: you can either include the browser name in your package.json as a script, or you can run the test without using the "command" parameter. I have created a sample script and executed it using command parameter. You can check this out - github.com/Anshita-Bhasin/Cypress-E2E/blob/main/package.json github.com/Anshita-Bhasin/Cypress-E2E/actions/runs/5811858646/job/15756015129
@@ABAutomationHub Thank you so much for checking :) After gitHub actions configuration mocha awesome html report generation is not working for me do we need to configure report generation also in build file.
Blogs -
www.lambdatest.com/blog/cypress-with-github-actions/
medium.com/tradeling/how-to-achieve-parallel-execution-using-github-actions-d534404702fb
medium.com/tradeling/github-actions-cfeace7ab0c4
medium.com/tradeling/how-to-schedule-jobs-using-github-actions-9f32667706ea
Well done !!
Hi,can you please create a vedio on integration cypress tests run on Gitlab cicd implementation using gitlab yaml file.Thanks!
By far one of the project-ready cypress playlist really appreciate it.
Waiting for integration with Slack video.
Thanks for the feedback @huk104
very informative video
Good explanation!
Hi, AB! The content on this channel is very helpful and practical, you are a great teacher!
Could you please, explain to me: how does this approach to parallelism differ from using parallel:true and Cypress Cloud? In which situation would you use one over the other?
You are really awesome thanks a lot 😊
Really appreciate it
well explained!
Please add BDD framework and its implementation. Your classes are very easy for me to follow. :), Thank you
Thanks! BDD videos would be added soon..
Nice Explanation..! Can you make a video on Bitbucket pipeline for same Cypress
Thanks alot 😊
great video
Thank you for your time and contributions to the testing community. I’m currently using Cypress ("cypress": "^13.14.2"), and I've encountered an issue. When I push to GitHub Actions, a single spec file doesn’t execute, but when running two spec files, they both work without any problems. Could you kindly advise on what might be causing this behavior?
what about using cypress-parallel instead of seperate Jobs in .yml file , would that have the same effect?
Hello Anshita, Thanks for covering the GitHub actions. 🙂
Are you going to cover advanced topics like Jenkins and AWS integration?
Yes, I will cover that as well.
Really Wonderful Easy to understand explanation madam.Thanks. One query, I have just started learning Automation testing (basically manual tester till now).while searching in online, some people saying cypress won't last long as they have budget constraints and other tools like playwright will run over cypress next year.Is it true, could you please clarify on future of Cypress like next 2-3 years. Thanks.
Few days back Cypress released an new feature ‘Test Replay’, which comes with free of cost if you’re using Dashboard.. If Company has any budget issues, why would they release free products and spend so much time and money in enhancing the products.. I don’t see it shutting down anytime soon. . So, don’t worry and if you are planning to learn it,go ahead.
Thanks a lot madam for clarification
We need cypress cloud for this right? For parallel execution?
No, not with this approach.. This will run based on the scripts you have in package.json..
Hi Anshita,
Is it possible to run in order like parallel-build.yml for the first and followed by the other, I guess our code is running in random order.
can you please clarify me on this.
@surensura2488 - Yes, we can do it by specifying dependencies between workflows in GitHub Actions. You can use the workflow_run event with the types: completed condition in your workflow configuration to trigger the second workflow when the first one has successfully completed.
Example - You can pass the below code in your second workflow file.
on:
workflow_run:
workflows: [parallel-build]
types:
- completed
@@ABAutomationHub thanks 😊
Hi Anshita, Thank you for this video, I tried running my script using the same steps you told. but getting error when I push code ( error: Can't run because no spec files were found.
We searched for specs matching this glob pattern:) can you please assist. I have my specs in different folder not in e2e by default.
In your case, the first step is to modify the specPattern in the cypress.config.js file (for example, specPattern:"cypress/tests/*.cy.js"). Afterward, you should also update the script specified in the package.json file. For example, under "scripts," pass the script
"scripts": {
"test": "npx cypress run --spec cypress/tests/screenshot.cy.js"
}
Once these changes are made, you can verify in the terminal whether the command is functioning correctly by using "npm run " (e.g., npm run test). If everything is set up properly, it should work. Please let me know if you face any further issues.
Hi Anshita,
I had created two different jobs one for chrome and other for FF, Both the test cases being executed in electron.
When I mentioned chrome for both the jobs still test cases being executed in electron.
Is this right approach, Below is the .yml file. Please let me know.
name: Parallel Test
on: [push,pull_request]
jobs:
Login-Test:
timeout-minutes: 120
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Chrome Browser
uses: cypress-io/github-action@v5
with:
command: npm run test:loginTest
browser: chrome
Update-Test:
timeout-minutes: 120
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Chrome Browser
uses: cypress-io/github-action@v5
with:
command: npm run test:updateEmailTest
browser: chrome
Hi @rekha, if you provide a "command" parameter, the browser selection is ignored. To address this, you have two options: you can either include the browser name in your package.json as a script, or you can run the test without using the "command" parameter.
I have created a sample script and executed it using command parameter. You can check this out -
github.com/Anshita-Bhasin/Cypress-E2E/blob/main/package.json
github.com/Anshita-Bhasin/Cypress-E2E/actions/runs/5811858646/job/15756015129
@@ABAutomationHub Thank you so much for checking :)
After gitHub actions configuration mocha awesome html report generation is not working for me do we need to configure report generation also in build file.
@@rekhamanappagol1857 : I will cover this topic as part of the series.
@@ABAutomationHub Thank you ☺️