This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 249378 - Cannot run protractor tests with custom configuration
Summary: Cannot run protractor tests with custom configuration
Status: VERIFIED FIXED
Alias: None
Product: javascript
Classification: Unclassified
Component: Testing (show other bugs)
Version: 8.1
Hardware: PC Linux
: P1 normal (vote)
Assignee: Theofanis Oikonomou
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-16 09:01 UTC by Vladimir Riha
Modified: 2015-01-06 08:48 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Riha 2014-12-16 09:01:27 UTC
There is no way to use custom configuration for Protractor tests. Please have a look at AngularPhoneCatalog sample project in NetBeans. There is a file called protractor-conf.js but I can't use it with NetBeans as they use custom configuration. Which means I cannot run tests in other browser then specified in netbeans-configuration.js which users probably won't want to use as it is not part of their project and thus e.g. "hidden" in VCS.

The config file from the sample project contains also other configuration that are "ignored".

Would it be possible to:
 - let user specify configuration file, protractor path and any other required field
 - start/stop selenium server with "webdriver-manager start"
 - run Protractor tests with this config file
 - kill the selenium server process after protractor is finished

I don't know about the JAR file location (btw is it needed? I installed Protractor as described [1] and it downloads the JAR by itself) but I guess if it is needed you can "load" user configuration in NodeJS and override necessary fields based on IDE settings

I hope I'm not missing something as Protractor is a new to me.

Thank you


[1] http://angular.github.io/protractor/#/tutorial
Comment 1 Theofanis Oikonomou 2014-12-16 22:39:42 UTC
good point. I will work on modifying current support in a way that the user would only need to specify protractor's executable and configuration file. 

I will use the properties set by the user in this configuration file to populate the needed properties in netbeans-configuration.js. This way all user specified configurations will be taken into consideration.

In this scenario user would have to specify either full path to the selenium standalone server jar or the url of an already running selenium server (local or remote) in his configuration file. This is needed by protractor itself.

I will also add a configuration template file with comments on what is expected to make things easier for the user.

Thank you
Comment 2 Vladimir Riha 2014-12-17 12:49:02 UTC
Thank you in advance :)
Comment 3 Theofanis Oikonomou 2014-12-17 22:38:22 UTC
Changeset: c42fae3424cc
Author:    Theofanis Oikonomou <theofanis@netbeans.org>
Date:      2014-12-17 23:37
Message:
Comment 4 Theofanis Oikonomou 2014-12-17 22:41:25 UTC
You should be now be able to specify a configuration file and set whatever options you choose in there and they should be picked up by the netbeans configuration when passed to protractor. The new conf file template under Selenium Tests category should make startup with protractor easier.
Comment 5 Quality Engineering 2014-12-19 04:35:40 UTC
Integrated into 'main-silver', will be available in build *201412190001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/c42fae3424cc
User: Theofanis Oikonomou <theofanis@netbeans.org>
Log: Task #249378 - Cannot run protractor tests with custom configuration
Comment 6 Vladimir Riha 2015-01-06 08:48:59 UTC
Thanks a lot, verified.



Product Version: NetBeans IDE Dev (Build 201501060001)
Java: 1.7.0_71; Java HotSpot(TM) Client VM 24.71-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_71-b14
System: Linux version 3.13.0-35-generic running on i386; UTF-8; en_US (nb)