Prepare for Angular Interviews with real-life questions. Utilize quizzes and examples to deepen understanding and enhance your skills. Gear up to ace your interview!

Each practice test/flash card set has 50 randomly selected questions from a bank of over 500. You'll get a new set of questions each time!

Practice this question and more.


Which command is used to run end-to-end tests in Angular?

  1. ng test e2e

  2. ng e2e

  3. e2e ng run

  4. npm run e2e

The correct answer is: ng e2e

The command to run end-to-end tests in Angular is "ng e2e." This command is specifically designed to execute end-to-end tests configured for an Angular application. It utilizes Protractor under the hood, which is the standard testing framework for Angular applications to perform end-to-end testing. When you run "ng e2e," Angular CLI compiles the application and then initializes Protractor, which runs the specified tests in a real browser, simulating user interactions. This capability is essential for ensuring that the entire application workflow works as intended in a production-like environment. Other options, while they may seem plausible, do not align with Angular's command structure for executing end-to-end tests.