🌍 Front-end Web Development · flashcards

Front-end Web Development Testing Flashcards

50 question-and-answer cards covering Testing as it is examined in Front-end Web Development. 24 of them are printed below, taken from across the deck — no signup, no paywall on the preview.

50Cards in deck
24Free preview
4Syllabus topics
~176Chars per answer
FreePrice

24 sample cards from the Testing deck

Sampled from the end of the deck, so these are different cards from the ones shown on the syllabus page.

  1. What is Cypress?

    Cypress is a JavaScript end-to-end (E2E) testing framework that runs tests directly inside the browser alongside the application, providing fast, reliable testing of web UIs with automatic waiting and time-travel debugging.

  2. How does Cypress's architecture differ fundamentally from Selenium's?

    Cypress runs in the same run-loop as the application inside the browser (no network/WebDriver protocol), giving native access to the DOM. Selenium drives the browser externally via the WebDriver protocol over HTTP.

  3. What is the main Cypress command to visit a page and to select an element?

    `cy.visit(url)` loads a page; `cy.get(selector)` queries DOM elements (and `cy.contains(text)` selects by text).

  4. What is 'automatic waiting' (retry-ability) in Cypress?

    Cypress automatically retries commands and assertions until they pass or a timeout is reached, eliminating the need for manual `sleep`/explicit waits for elements to appear.

  5. How do you make assertions in Cypress?

    Chain `.should()` or `.and()` onto a command, e.g., `cy.get('.btn').should('be.visible').and('contain', 'Save')`. Cypress bundles Chai, Sinon-Chai, and Chai-jQuery assertions.

  6. What does `cy.intercept()` do in Cypress?

    It spies on, stubs, or modifies network requests/responses, allowing you to mock API calls and assert that requests were made.

  7. How do you reference a stored value or alias in Cypress?

    Create an alias with `.as('name')` and retrieve it later with `cy.get('@name')`; this is commonly used with `cy.intercept()` to wait on network requests via `cy.wait('@name')`.

  8. What two test types does Cypress support?

    End-to-end (E2E) tests that drive the full application in a browser, and component tests that mount and test individual UI components in isolation.

  9. What command opens Cypress's interactive Test Runner, and which runs headlessly?

    `cypress open` launches the interactive GUI Test Runner; `cypress run` executes tests headlessly in the terminal/CI.

  10. What is the default folder where Cypress E2E tests live, and what is the config file?

    E2E spec files live in `cypress/e2e/` and configuration is in `cypress.config.js` (older versions used `cypress.json` and `cypress/integration/`).

  11. What is a key limitation of Cypress regarding browsers and tabs?

    Cypress runs only in browser engines it supports (Chromium-family, Firefox, WebKit; historically no Safari) and cannot control multiple browser tabs or multiple simultaneous browsers in one test.

  12. What is Selenium?

    Selenium is an open-source suite for automating web browsers across many languages and browsers. Its core, Selenium WebDriver, programmatically drives a real browser to simulate user interactions for testing.

  13. What are the main components of the Selenium suite?

    Selenium WebDriver (browser automation API), Selenium IDE (record-and-playback browser extension), and Selenium Grid (parallel/distributed test execution across machines and browsers).

  14. What protocol does Selenium WebDriver use to communicate with browsers?

    The W3C WebDriver protocol, sending JSON commands over HTTP to a browser-specific driver (e.g., ChromeDriver, GeckoDriver) that controls the browser.

  15. Name four common Selenium locator strategies.

    `By.id`, `By.name`, `By.className`, `By.cssSelector`, `By.xpath`, `By.linkText`, and `By.tagName` are the standard `By` locators for finding elements.

  16. In Selenium, what is the difference between implicit and explicit waits?

    An implicit wait sets a global polling timeout applied to all element lookups. An explicit wait (`WebDriverWait` + `ExpectedConditions`) waits for a specific condition on a specific element, which is more precise and recommended.

  17. What is the Page Object Model (POM) in Selenium testing?

    A design pattern where each page is represented by a class encapsulating its element locators and actions, separating test logic from UI structure to improve maintainability and reduce duplication.

  18. What is Selenium Grid used for?

    Selenium Grid distributes tests across multiple machines and browsers in parallel using a hub-and-node (or modern router/distributor) architecture, reducing total execution time and enabling cross-browser/cross-platform testing.

  19. What method launches a browser session and navigates to a URL in Selenium WebDriver?

    Instantiate a driver (e.g., `new ChromeDriver()`) then call `driver.get(url)` (or `driver.navigate().to(url)`) to load the page.

  20. What is the role of GeckoDriver and ChromeDriver in Selenium?

    They are the browser-specific driver executables that translate WebDriver commands into actions in Firefox (GeckoDriver) and Chrome (ChromeDriver) respectively.

  21. Compare Cypress and Selenium on language support and execution model.

    Selenium supports many languages (Java, Python, C#, Ruby, JS) and runs outside the browser via WebDriver. Cypress is JavaScript/TypeScript-only and runs inside the browser, giving faster execution but less cross-browser/language breadth.

  22. Which testing tools are unit/integration frameworks versus end-to-end/UI tools, among Jest, Mocha, Cypress, Selenium?

    Jest and Mocha are primarily unit/integration test frameworks (run in Node/jsdom). Cypress and Selenium are end-to-end/UI automation tools that drive real browsers.

  23. What is the difference between unit testing and end-to-end (E2E) testing?

    Unit testing verifies an individual function/module in isolation (often with mocks), running fast. E2E testing verifies the entire application flow through the UI as a real user would, exercising all integrated layers.

  24. In the testing pyramid, how do unit, integration, and E2E tests compare in quantity and speed?

    The pyramid prescribes many fast, cheap unit tests at the base, fewer integration tests in the middle, and the fewest slow, expensive E2E (UI) tests at the top.

What this deck covers

The Testing deck follows the Front-end Web Development Testing syllabus — 2 chapters and 4 topics — so questions land on material that is genuinely examinable rather than trivia around it. That works out to roughly 25.0 cards per chapter.

Answers are written to be recallable, not just readable — averaging about 176 characters, which is long enough to carry the reasoning and short enough to say out loud.

A deck like this earns its keep on the second and third pass. Read the syllabus first so you know the shape of the subject, then use the cards to find the specific facts that have not stuck.

Testing flashcards FAQ

How many Testing flashcards are in this Front-end Web Development deck?

50 cards. This page previews 24 of them, sampled evenly across the deck so you can judge the difficulty before installing anything.

Are these Front-end Web Development flashcards free?

Yes. The preview here is free to read with no signup, and the full 50-card deck is free inside the Examius app.

What do the Testing cards cover?

They follow the Front-end Web Development Testing syllabus — 2 chapters and 4 topics — so the questions track what is actually examinable.

How should I use these flashcards?

Read the syllabus first so you know the shape of the subject, then drill the deck. Examius schedules each card with spaced repetition, so cards you keep missing come back sooner and ones you know drift further apart.