Testing Polymer

108 views
Skip to first unread message

kpga...@gmail.com

unread,
Jul 16, 2014, 1:38:14 PM7/16/14
to polym...@googlegroups.com
I recently watched the talks from Google I/O on Polymer. In one of those tallks (can't remember which), the presenter spoke about testing Polymers "based on html rather than javascript". I have been trying to find the tool he was talking about, with no success. Is this a future, a dream or something real?

Rob Dodson

unread,
Jul 16, 2014, 2:19:08 PM7/16/14
to kpga...@gmail.com, polymer-dev
Take a look at the seed-element. It has example tests


On Wed, Jul 16, 2014 at 10:38 AM, <kpga...@gmail.com> wrote:
I recently watched the talks from Google I/O on Polymer. In one of those tallks (can't remember which), the presenter spoke about testing Polymers "based on html rather than javascript". I have been trying to find the tool he was talking about, with no success. Is this a future, a dream or something real?

Follow Polymer on Google+: plus.google.com/107187849809354688692
---
You received this message because you are subscribed to the Google Groups "Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to polymer-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/3ddf253a-c848-40e0-900f-45a3f548942a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

kpga...@gmail.com

unread,
Jul 17, 2014, 12:46:14 PM7/17/14
to polym...@googlegroups.com, kpga...@gmail.com
Thanks Rob. I appreciate the help and it's good to know I wasn't dreaming :)

I had a look at the seed-element and was able to get the test-runner running for the seed-element. It looks like an interesting approach. I am unclear about a couple of things though:
  1. I see that Karma is included in the project, but couldn't get it to do anything useful. I tried running it with and without the karma-common.conf.js file.
  2. I understand that the testing code is installed in the parent directory of the elements, so I assume the intention is to be able to run all of the tests for all the elements. I couldn't see how to do that.

Rob Dodson

unread,
Jul 17, 2014, 1:27:48 PM7/17/14
to Keith Garrod, polymer-dev
I believe the only reason polymer-test-tools is included right now is so we can steal the htmlTest plugin from it instead of duplicating it in the seed-element repo. To my knowledge, we haven't hooked up the karma stuff (I think that's what the Polymer team uses to test their elements but we haven't connected it with seed-element yet).

So for now you'll need to run your tests on a per element basis (cd into the element dir and run mocha) or write your own karma.conf file. We're working on improving all of this so stay tuned for updates


Reply all
Reply to author
Forward
0 new messages