in AngularJS Packaging and Testing by (32.2k points)
What is Protractor?

1 Answer

0 votes
by (32.2k points)

Protractor is an end-to-end test framework for Angular. It runs your tests inside a real browser, interacting with it as real person would. Unlike unit tests, where we test individual functions, here we test the entire logic. Protractor is able to fill in forms, click buttons and confirm that the expected data and styling is displayed in the HTML document. Just like Karma, Protractor has its own configuration file at the root of your Angular project, protractor.conf:

const { SpecReporter } = require('jasmine-spec-reporter');

exports.config = {

  allScriptsTimeout: 11000,

  specs: [



  capabilities: {

    'browserName': 'chrome'


  directConnect: true,

  baseUrl: 'http://localhost:4200/',

  framework: 'jasmine',

  jasmineNodeOpts: {

    showColors: true,

    defaultTimeoutInterval: 30000,

    print: function() {}


  onPrepare() {


      project: 'e2e/tsconfig.e2e.json'


    jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));



Related questions

0 votes
asked Apr 5, 2021 in Protractor by Robindeniel (20.8k points)