Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

grunt-protractor-webdriver active standby #30

Open
GuillaumeUnice opened this issue Apr 29, 2016 · 2 comments
Open

grunt-protractor-webdriver active standby #30

GuillaumeUnice opened this issue Apr 29, 2016 · 2 comments

Comments

@GuillaumeUnice
Copy link

Hi, I use like lot of persons grunt-protractor-webdriver with grunt-protractor-runner.

But when I register Task when the protractor_webdriver is executed it block other task.
This is my gruntFile :

protractor: {
      options: {
        keepAlive: false,
        configFile: 'test/protractor.conf.js'
      },
      run: {

         options: {
                    args: {
                        specs: ['test/e2e/**.spec.js']
                    }
                }
      }
    },
    /*jshint camelcase: false */
    protractor_webdriver: {
      start: {
        options: {
          command: 'webdriver-manager start'
        }
      }
    }
  grunt.loadNpmTasks('grunt-protractor-runner');
  grunt.registerTask('test', [
    'clean:server',
    'concurrent:test',
    'autoprefixer',
    //'karma:unit',
    'protractor_webdriver',
    'protractor:run'
  ]);

And the console display that

ic01@ic01-laptop:~/cloudunit/cu-manager/src/main/webapp$ grunt test
Running "clean:server" (clean) task
Cleaning .tmp...OK

Running "concurrent:test" (concurrent) task

    Running "compass:dist" (compass) task
    directory .tmp/styles
        write .tmp/styles/main.css (1.597s)

    Running "compass:server" (compass) task

    Done, without errors.


    Execution Time (2016-04-29 13:39:44 UTC)
    compass:dist       2s  ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 73%
    compass:server  745ms  ▇▇▇▇▇▇▇▇▇▇▇▇▇ 27%
    Total 2.8s

Running "autoprefixer:dist" (autoprefixer) task
File .tmp/styles/main.css created.

Running "protractor_webdriver:start" (protractor_webdriver) task
Starting Selenium server


Anybody have an idea?
Thanks for help

@lreindl
Copy link

lreindl commented Aug 8, 2016

@GuillaumeUnice did you ever figure this out?

@GuillaumeUnice
Copy link
Author

@lreindl Finally, I have this grunt task :

  grunt.registerTask('test', [
    'clean:server',
    'concurrent:test',
    'autoprefixer',
    'run:selenium',
    'protractor:run'
  ]);

And in the protractor file :

  capabilities: {
    browserName: 'chrome',
    shardTestFiles: true
  },

that allow to reload a new instance of selenium for each test.

If you have any questions don't hesitate ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants