facebook

Support for Protractor

  1. CodeMix & Angular IDE
  2.  > 
  3. Webclipse 1.x Help
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #461942 Reply

    Angelo ZERR
    Participant

    Hi,

    I have played with Webclipse to try to debug protractor tests and it works! But I find it’s a little complex to customize it. I have seen an interesting demo with WebStorm https://www.youtube.com/watch?v=VLMyI7QKcwg and I find it’s more easy to do it.

    At first let’s me explain you how I have done :

    1. I have started with http://angular.github.io/protractor/#/tutorial and install protractor with npm (it is installed at C:\Users\XXX\AppData\Roaming\npm\node_modules\protractor)
    2. I have created a simple Eclipse Project (that I have named with protractor) linked to my C:\XXX\azerr\AppData\Roaming\npm\node_modules\protractor
    3. I have created a second simple project test-protractor with my conf.js & spec.js like explained at http://angular.github.io/protractor/#/tutorial
    4. I have created a “Standalone JavScript Application” launch with:
      • Main/Script path : /protractor/lib/cli.js
      • Arguments/Program arguments : conf.js
      • Arguments/Working directory : ${workspace_loc:test-protractor}
    5. And it works like a charm, but I find it’s a little complex. Here my suggestion:

      • gives the capability to select Script path outside the workspace to avoid creating a protractor project (if you see Webstorm demo it works like this). I understand that you need that Script path must be an Eclipse Project but perhaps you could add a dialog : “do you want to import it as project?”
      • Program arguments could add a new button File… to select the conf.js if you see Webstorm demo it works like this)

      An another idea is that AngularJS Eclipse provides a Run Protractor which creates the well Webclipse launch for protractor (I like this idea too) like you have done to debug tern plugin. If you like this idea with AngularJS Eclipse, please create an issue.

    #461951 Reply

    Angelo ZERR
    Participant

    Just for your information, I have created an issue to debug protrator at https://github.com/angelozerr/angularjs-eclipse/issues/178

    #464012 Reply

    support-piotr
    Participant

    Angelo, thanks for your input. I have filed a bug for enhancements and I’ll keep you posted on the progress.

    #464877 Reply

    Angelo ZERR
    Participant

    Thanks a lot Piotr for your support.

    In my side, I have soon finished Run/Debug Protractor inside AngularJS Eclipse. Now I can generate Webclipse launch just with Run/Debug protractor after selecting a JS file. I hav etried to clean launch to use workspace_loc instead of using file system path.

    I have tried to generate Webclipse launch like ${workspace_loc:/test-protractor/spec.js} in the Program arguments but it seems Webclipse doesn’t support this feature (Eclipse Program launch support it).

    #464881 Reply

    support-piotr
    Participant

    Angelo,

    Thanks for the information, does JDT launch support it? If so, than I will definitely add support for that in the next release. Doesn’t look like a lot of work 🙂 I guess, that together with other changes it will make the nodejs launch more usable.

    I have seen that you were mentioning the Grunt task debugging in the wtp-dev group. We hope to have a look into Grunt support in the near future and possibly add the debug support in Webclipse. It doesn’t sound like a big deal.

    Thanks for all your feedback!

    #464888 Reply

    Angelo ZERR
    Participant

    > Thanks for the information, does JDT launch support it?

    I don’t know.

    > If so, than I will definitely add support for that in the next release. Doesn’t look like a lot of work 🙂 I guess, that together with other changes it will make the nodejs launch more usable.

    Yes sure!

    > I have seen that you were mentioning the Grunt task debugging in the wtp-dev group. We hope to have a look into Grunt support in the near future and possibly add the debug support in Webclipse. It doesn’t sound like a big deal.

    > are you interest to integrate https://github.com/angelozerr/jsbuild-eclipse or create your own Grunt/Gulp plugins?

    > Thanks for all your feedback!

    Thanks for your help:)

    #528012 Reply

    mgarber
    Participant

    Following Angelo ZERR’s lead I was able to run Protractor on an Eclipse Neon.3 on Ubuntu 16.04. My settings were:

    `Goto Run/Debug Configurations…/Main (Tab)
    Script path: <Your Angular 2 Project Directory>/node_modules/protractor/bin/protractor
    Goto Arguments (Tab)
    Program Arguments : <Your Angular 2 Project Directory>/protractor.conf.js
    Working Directory : Other : <Your Angular 2 Project Directory>`

    Make sure that all directories have a terminating ‘/’.

    Hope this saves someone some work.

Viewing 7 posts - 1 through 7 (of 7 total)
Reply To: Support for Protractor

You must be logged in to post in the forum log in