Updated: Mar 1, 2021
1. How to link Fixtures in actual code- Please share any example?
A. For fixture we can call using cy.fixture() ` e.g const data = require(‘../fixtures/login.json’); And suppose we want to access user_name we can do like data.user_name
2. Can you put some words on how POM can be implemented to reuse the functions and common web elements?
A. Regarding POM we can create a Test class (*Where all my Test cases) and for Each Test, we can create a Method and In the Test case, we have to Import the class where I have written the alley method.
3. Is it support all browsers like Firefox, IE, and safari?
A. Cypress currently supports chrome, firefox, Edge canary, and electron.
4. Could you please explain, what exactly should be inside the “it” block? Should we separate each assertion into the different “it” blocks? If yes, don’t you think that in complicated projects it will get troublesome.
A. it() block is similar to TestNG @Test annotation, in a simplified way. And, tests should be atomic instead of adding multiple assertions in single Test. We should follow standard automation practice, irrespective of the mocha or TestNg framework.
5. Is Parallel execution possible?
A. Yes, Parallel execution is possible using Cypress commercial version.
6. Is there any source where I can read more about advanced end2end structure?
A. Cypress.io team has done great documentation, can start from their website. Or can use “cypress-cookbook” for all code-snippets for e2e testing.
7. Is it comfortable With iframe?
A. Yes, using the cypress iframe module or custom commands, we can handle iframes.
8. As cypress is working under a proxy will we face an issue running it using VPN?
A. Using the cypress binary file we can handle VPN access.
Cypress Binary Install
Install a version different than the default npm package.
CYPRESS_INSTALL_BINARY=2.0.1 npm install firstname.lastname@example.org
Specify an external URL (to bypass a corporate firewall).
CYPRESS_INSTALL_BINARY=https://company.domain.com/cypress.zip npm install cypress
Specify a file to install locally instead of using the internet.
CYPRESS_INSTALL_BINARY=/local/path/to/cypress.zip npm install cypress
Got it to work…by setting UNIX like a path on windows cmd
9. Can we use Cypress for BDD?
A. Yes, cypress can be integrated with cucumber for BDD testing.
10. can we perform mobile testing through it?
A. Yes, we can do mobile responsive testing in different View Port using cy.viewport() command.
11. Can we do API Automation using Cypress?
A. Yes, we can do API testing using cy.request() function.
13. cmd and browser based testing can be done?
A. Yes, we can execute node commands using cy.task() function.
14. Can we run cypress in distributed mode? like hub node architecture?
A. Yes, using cypress parallelization interactions we can execute on multiple CI machines.
15. what frameworks cypress support?
A. Cypress by default comes with mocha framework, and we can use cucumber for BDD testing.