Angular

End-to-End Testing

Protractor, Cypress, Playwright, selectors, page objects, async handling, test strategies

18 interview questionsยท
Mid-Level
1

What is Cypress?

Answer

Cypress is a modern JavaScript-based E2E testing framework running directly in the browser. It provides an intuitive API, automatic command retries, and visual debugging. Unlike Protractor (deprecated since 2021), Cypress offers a superior developer experience for testing modern Angular applications.

2

Why is Protractor no longer maintained since 2021?

Answer

The Angular team stopped maintaining Protractor in 2021 because it relied on Selenium WebDriver, an increasingly outdated technology. Cypress and Playwright offer modern, more performant architectures for E2E testing. Migration to these tools is recommended for new projects.

3

What is the main difference between Cypress and Playwright?

Answer

Cypress runs in the browser with a single architecture, offering optimal integration but supporting one browser per session. Playwright uses an out-of-browser architecture enabling cross-browser testing in one session (Chrome, Firefox, Safari). Choose Cypress for single-browser Angular or Playwright for complex multi-browser testing.

4

What is the role of a selector in E2E testing?

5

Which HTML attribute to prefer for test selectors in Angular?

+15 interview questions

Master Angular for your next interview

Access all questions, flashcards, technical tests, code review exercises and interview simulators.

Start for free