# Testing an Ember app for dummies

**URL:** <https://discuss.emberjs.com/t/testing-an-ember-app-for-dummies/1038>\
**Category:** Uncategorized\
**Created:** [April 19, 2013, 6:17pm UTC](https://discuss.emberjs.com/t/testing-an-ember-app-for-dummies/1038 "2013-04-19T18:17:39Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![rrh](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/rrh/32/11843_2.png) [@rrh](https://discuss.emberjs.com/u/rrh)\
**Post date:** [April 19, 2013, 6:17pm UTC](https://discuss.emberjs.com/t/testing-an-ember-app-for-dummies/1038/1 "2013-04-19T18:17:39Z")

</div>

I’m new to (Javascript) testing and would like to learn how to do it. As I have to write tests with Jasmine for our Ember app, I’d like to ask you for some help.

The first question is about the scope of testing. What should I test? Should it be:

- models
- controllers
- views
- templates
- bindinds
- what else?

Where should I start? Books, online resources, whatever? I have the ‘Testable JavaScript’ book but it makes my head spin because it has a lot of jargon and theory - things that are of not particular interest when you start. It is extremely dull to me to boot!

I’m looking for some materials so that I could get the general idea of BDD. Something for beginners not for pros or ninajs.

Having an existing app, what tests should I write first? It’s our internal app, it’s quite simple and I’d like to write tests for it to learn. I know that for some time my tests will be of poor quality but it takes practice. 🙂

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![quangv](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/quangv/32/14594_2.png) [@quangv](https://discuss.emberjs.com/u/quangv)\
**Post date:** [April 20, 2013, 1:32pm UTC](https://discuss.emberjs.com/t/testing-an-ember-app-for-dummies/1038/2 "2013-04-20T13:32:30Z")

</div>

Ember has good unit tests you can use as examples…

I would test every method on the Routers/Controllers/Models that you added yourself. You should look into mocha, and maybe selenium as well for higher-level acceptance testing.

---

<div class="post-metadata">

**Author:** ![rrh](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/rrh/32/11843_2.png) [@rrh](https://discuss.emberjs.com/u/rrh)\
**Post date:** [April 22, 2013, 8:46am UTC](https://discuss.emberjs.com/t/testing-an-ember-app-for-dummies/1038/3 "2013-04-22T08:46:25Z")

</div>

Could you give me a link to Ember specs? I tried to find them but couldn’t ☹

---

<div class="post-metadata">

**Author:** ![quangv](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/quangv/32/14594_2.png) [@quangv](https://discuss.emberjs.com/u/quangv)\
**Post date:** [April 22, 2013, 5:26pm UTC](https://discuss.emberjs.com/t/testing-an-ember-app-for-dummies/1038/4 "2013-04-22T17:26:03Z")

</div>

it’s all under the project’s `packages/%package%/test` folder

[https://github.com/emberjs/ember.js/tree/master/packages/ember-views/tests/views](https://github.com/emberjs/ember.js/tree/master/packages/ember-views/tests/views) - for example, there’s tons more…

ember-data has nice integrations tests as well.

---

<div class="post-metadata">

**Author:** ![pixelhandler](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/pixelhandler/32/18649_2.png) [@pixelhandler](https://discuss.emberjs.com/u/pixelhandler)\
**Post date:** [April 23, 2013, 4:29pm UTC](https://discuss.emberjs.com/t/testing-an-ember-app-for-dummies/1038/5 "2013-04-23T16:29:34Z")

</div>

A few of the members of the OC Ember meetup put together a repo for exploring integration testing of an ember app. We started with the peepcode ordr app (from their training video) see: [https://github.com/Ember-SC/peepcode-ordr-test](https://github.com/Ember-SC/peepcode-ordr-test)

---

<div class="post-metadata">

**Author:** ![rrh](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/rrh/32/11843_2.png) [@rrh](https://discuss.emberjs.com/u/rrh)\
**Post date:** [April 24, 2013, 7:22am UTC](https://discuss.emberjs.com/t/testing-an-ember-app-for-dummies/1038/6 "2013-04-24T07:22:46Z")

</div>

thanks! I really find such helpers like visit very helpful!
