Cypress interview questions - Multiple choice questions | Cypress mock test



Cypress interview questions, quizzes, and multiple choice questions (MCQs) for interview preparation. This is the fourth test in the Cypress MCQ test series. Evaluate yourself on cypress's basic knowledge through these test series.


MCQ questions and answers on Cypress testing tool

Topic- Cypress

The test consists of 10 questions.

No negative marking for this test.

No Time limit

The pass percentage is 70%

The correct answer with a description will be displayed after the answer has been marked.

Submit the test to calculate your score once you are done with all the questions.

Complexity Level- Moderate





Q1:In cypress the HTTP request can be made using:















Q2: Configuration set using Cypress.config is only in scope for the current spec file. Select True or False.












Q3: We can have multiple cy.visit() in a single test. Select True or False.












Q4: cypress.config.js contains:















Q5: What is wrong with the below cypress test?

1. describe('Actions', () => {

2. it('first test', () => {
3. cy.visit('www.amazon.in')
4. console.log(Cypress.browser.name)
5. cy.get('#nav-link-accountList').click()
6. cy.get('#createAccountSubmit').click()
7. cy.visit('www.google.co.in')
8. })

9. })












Q6: The default directory for cy.readFile('filename') to read the file is the fixtures folder. Select True or False.











Q7: cy.fixture('users.json') will look for the file users.json in the fixtures folder. Select True or False.











Q8: Which of the below command is equivalent to clicking the back navigation button of the browser?
















Q9: Analyze the below cypress tests and determine the execution flow:

1. describe('Actions', () => {

2. it('first test', () => {
3. cy.visit('www.amazon.in')
4. console.log(Cypress.browser.name)
5. cy.get('#nav-link-accountList').click()
6. cy.get('#createAccountSubmit').click()
7. })

8. it.only('second test', () => {
9. cy.visit('www.google.co.in')
10. })

11. })
















Q10: Which cypress command is used to visit multiple domains of different origin in a single test?






























More tests on Cypress:

Cypress MCQ -1
Cypress MCQ -2
Cypress MCQ -3