Tagged: protractor debug angular
- This topic has 6 replies, 3 voices, and was last updated 7 years, 4 months ago by mgarber.
-
AuthorPosts
-
Angelo ZERRParticipantHi,
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 :
- 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)
- 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
- I have created a second simple project test-protractor with my conf.js & spec.js like explained at http://angular.github.io/protractor/#/tutorial
- 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}
- 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)
And it works like a charm, but I find it’s a little complex. Here my suggestion:
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.
Angelo ZERRParticipantJust for your information, I have created an issue to debug protrator at https://github.com/angelozerr/angularjs-eclipse/issues/178
support-piotrParticipantAngelo, thanks for your input. I have filed a bug for enhancements and I’ll keep you posted on the progress.
Angelo ZERRParticipantThanks 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).
support-piotrParticipantAngelo,
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!
Angelo ZERRParticipant> 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:)
mgarberParticipantFollowing 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.
-
AuthorPosts