ng e2e

Builds and serves an Angular app, then runs end-to-end tests using Protractor.

ng e2e <project> [options]
      
      ng e2e <project> [options]
    
ng e <project> [options]
      
      ng e <project> [options]
    

说明

Must be executed from within a workspace directory. When a project name is not supplied, it will execute for all projects.

参数

参数说明
<project>

The name of the project to build. Can be an app or a library.

选项

选项说明
--baseUrl=baseUrl

Base URL for protractor to connect to.

--configuration=configuration

A named build target, as specified in the "configurations" section of angular.json. Each named target is accompanied by a configuration of option defaults for that target.

别名: -c

--devServerTarget=devServerTarget

Dev server target to run tests against.

--elementExplorer=true|false

Start Protractor's Element Explorer for debugging.

默认值: false

--help=
true|false|json|JSON

Shows a help message for this command in the console.

默认值: false

--host=host

Host to listen on.

默认值: localhost

--port

The port to use to serve the application.

--prod=true|false

When true, sets the build configuration to the production target. All builds make use of bundling and limited tree-shaking. A production build also runs limited dead code elimination.

默认值: false

--protractorConfig=
protractorConfig

The name of the Protractor configuration file.

--specs

Override specs in the protractor config.

--suite=suite

Override suite in the protractor config.

--webdriverUpdate=true|false

Try to update webdriver.

默认值: true