Why does Angular use Selenium WebDriver to test its own sites instead of Scenario Runner?

4,317 views
Skip to first unread message

Georgios Diamantopoulos

unread,
Jun 24, 2013, 11:17:02 AM6/24/13
to ang...@googlegroups.com
I've been struggling to find a "perfect" solution for real E2E testing Angular and had problems
- There seems to be no good published way (other than waiting on a specific element) to wait for the page to finish rendering before making assertions with Selenium
- On the other hand, no one talks about how to do real (against a live, local server) E2E testing with the scenario runner and in this case, how to control the consistency of the data when a test starts

In my searches, trying to find E2E scenario best practices, I thought I'd see how Angular tests their own web properties.

To my amazement, I found that they use WebDriver! e.g. https://github.com/angular/angular-sites/blob/master/test/docs.angularjs.org.spec.js

I'm wondering - what drove this decision?

Thanks
Georgios

Joshwa Fugett

unread,
Jun 24, 2013, 12:21:14 PM6/24/13
to ang...@googlegroups.com
As part of the 1.2 release angular is switching out the e2e test runner. Its already available on github. Unfortunately im not at my computer and cant remember the name, but theres a new video posted by the angular team that talks about the 1.2 changes.

Kijana Woodard

unread,
Jun 24, 2013, 12:38:53 PM6/24/13
to ang...@googlegroups.com
Thanks. New here. Didn't see anything obvious on google. What the rough target date for 1.2? Weeks/Months/Q1 2014?


On Mon, Jun 24, 2013 at 11:21 AM, Joshwa Fugett <jfug...@gmail.com> wrote:
As part of the 1.2 release angular is switching out the e2e test runner. Its already available on github. Unfortunately im not at my computer and cant remember the name, but theres a new video posted by the angular team that talks about the 1.2 changes.

--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular+u...@googlegroups.com.
To post to this group, send email to ang...@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/groups/opt_out.



Georgios Diamantopoulos

unread,
Jun 24, 2013, 1:23:49 PM6/24/13
to ang...@googlegroups.com
Oh wow, I guess that solves my dilemma! 
I haven't watched the whole thing but I'm guessing it's a reference to this video:

+1 on a rough (weeks/months/next year) ETA


Date: Mon, 24 Jun 2013 11:38:53 -0500
Subject: Re: [AngularJS] Why does Angular use Selenium WebDriver to test its own sites instead of Scenario Runner?
From: kijana....@gmail.com
To: ang...@googlegroups.com
You received this message because you are subscribed to a topic in the Google Groups "AngularJS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/angular/whi_GyAyVg0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to angular+u...@googlegroups.com.

Georgios Diamantopoulos

unread,
Jun 24, 2013, 1:49:59 PM6/24/13
to ang...@googlegroups.com
By the way, how is this now supported in Karma?

> Date: Mon, 24 Jun 2013 09:21:14 -0700
> From: jfug...@gmail.com
> To: ang...@googlegroups.com
> Subject: [AngularJS] Why does Angular use Selenium WebDriver to test its own sites instead of Scenario Runner?

>
> As part of the 1.2 release angular is switching out the e2e test runner. Its already available on github. Unfortunately im not at my computer and cant remember the name, but theres a new video posted by the angular team that talks about the 1.2 changes.
>

Ryan Zec

unread,
Jun 24, 2013, 2:11:42 PM6/24/13
to ang...@googlegroups.com
For those interested, the new E2E test runner is here : 

https://github.com/juliemr/protractor



--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular+u...@googlegroups.com.

Georgios Diamantopoulos

unread,
Jun 24, 2013, 2:14:08 PM6/24/13
to ang...@googlegroups.com
Does this work with Karma? Any pointers on how to configure it?


Date: Mon, 24 Jun 2013 14:11:42 -0400
Subject: Re: [AngularJS] Why does Angular use Selenium WebDriver to test its own sites instead of Scenario Runner?
From: bas...@gmail.com
To: ang...@googlegroups.com

Joshwa Fugett

unread,
Jun 24, 2013, 10:49:19 PM6/24/13
to ang...@googlegroups.com
You should be able to use protractor with karma as karma just runs the tests that you write.

I know there is setup for the selenium server but I haven't tried it it so I'm afraid I can't give much more detail than that.

I'm hoping to give it a run over the weekend, and will post my results back if I make it to it, if anybody else has given it a test run yet hopefully they'll post their experience with it here.

Georgios Diamantopoulos

unread,
Jun 25, 2013, 2:20:12 AM6/25/13
to ang...@googlegroups.com
It doesnt look like Karma is gonna be able to do protractor - see https://github.com/juliemr/protractor/issues/9


Date: Mon, 24 Jun 2013 19:49:19 -0700
From: jfug...@gmail.com
To: ang...@googlegroups.com

Brandon R

unread,
Nov 7, 2013, 8:38:46 AM11/7/13
to ang...@googlegroups.com
It is incredibly frustrating, the need to keep changing stuff. I get wanting to improve things, but with every release the entire suite changes. Ugg!

Georgios Diamantopoulos

unread,
Nov 7, 2013, 9:24:18 AM11/7/13
to ang...@googlegroups.com
I'll agree it's frustrating but also necessary - protractor is a much better direction than angular scenario was - I'm sure it's a case of "it seemed like a good idea at the time"

I've opted out of doing E2E testing JS though and going with Selenium from C#

Georgios



Date: Thu, 7 Nov 2013 05:38:46 -0800
From: vesi...@gmail.com
To: ang...@googlegroups.com
Subject: [AngularJS] Re: Why does Angular use Selenium WebDriver to test its own sites instead of Scenario Runner?

flav...@gmail.com

unread,
Apr 7, 2014, 10:21:01 AM4/7/14
to ang...@googlegroups.com
I realize this is an older thread, but I had found it in the search resluts.  It is also worth noting on https://www.exratione.com/2013/12/angularjs-headless-end-to-end-testing-with-protractor-and-selenium/
            Either way, this framework for end to end testing is now obsolete and is in the process of being replaced by Protractor. So don't put any time into it.
"this framework" referencing karma.

Jeff Hubbard

unread,
Apr 8, 2014, 2:17:19 AM4/8/14
to ang...@googlegroups.com
Karma is still used for sure--it's the unit test runner. Protractor is replacing Angular Scenario Runner, which is the end-to-end browser testing tool.
Reply all
Reply to author
Forward
0 new messages