Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <ol> <li><p>Install <code>protractor</code> and <code>grunt-protractor-runner</code> from <code>npm</code>:</p> <pre><code>npm install protractor grunt-protractor-runner --save-dev </code></pre></li> <li><p>Create a config file for protractor (<code>protractor.conf.js</code>), change <code>specs</code> and <code>baseUrl</code> to your test files and test server:</p> <pre><code>exports.config = { seleniumAddress: 'http://localhost:4444/wd/hub', specs: ['test/e2e/*_test.js'], baseUrl: 'http://localhost:9001' //default test port with Yeoman } </code></pre></li> <li><p>Update your <code>Gruntfile.js</code>, add the following after the karma task:</p> <pre><code>protractor: { options: { keepAlive: true, configFile: "protractor.conf.js" }, run: {} } </code></pre></li> <li><p>Add the protractor task under test</p> <pre><code>grunt.registerTask('test', [ 'clean:server', 'concurrent:test', 'autoprefixer', 'connect:test', 'karma', 'protractor:run' ]); </code></pre></li> <li><p>Download and start the selenium server:</p> <pre><code>node_modules/protractor/bin/webdriver-manager update node_modules/protractor/bin/webdriver-manager start </code></pre> <p>(In Windows:)</p> <pre><code>node node_modules/protractor/bin/webdriver-manager update node node_modules/protractor/bin/webdriver-manager start </code></pre></li> <li><p>Update your <code>package.json</code>, add the following after <code>"devDependencies"</code>. This will run the command after <code>npm install</code> so you don't need to remember every time.</p> <pre><code>"scripts": { "install": "node node_modules/protractor/bin/webdriver-manager update" } </code></pre></li> <li><p>Run the test using grunt</p> <pre><code>grunt test </code></pre></li> </ol> <p>If you want protractor to start the server for you, remove </p> <pre><code>seleniumAddress: 'http://localhost:4444/wd/hub', </code></pre> <p>from <code>protractor.conf.js</code>, then running <code>grunt test</code> will start a standalone selenium instance during the test and quit it after running the test suite.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload