# Testing component content

**URL:** <https://discuss.emberjs.com/t/testing-component-content/17388>\
**Category:** Testing\
**Created:** [December 31, 2019, 2:24am UTC](https://discuss.emberjs.com/t/testing-component-content/17388 "2019-12-31T02:24:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bmurphy](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/bmurphy/32/16807_2.png) [@bmurphy](https://discuss.emberjs.com/u/bmurphy)\
**Post date:** [December 31, 2019, 2:24am UTC](https://discuss.emberjs.com/t/testing-component-content/17388/1 "2019-12-31T02:24:05Z")

</div>

Hi all,

I’m trying to get some basic Integration tests going for some of my components. Looking at the docs and other examples it would seem that generally you want to not make things too complicated for yourself and assert against the rendered text content, for example. That’s all fine for basic small examples but my component renders an entire table of content. Looking at the string output it would appear my tests would get kinda messy. What do others do when doing component content rendering tests?

Thanks!

---

<div class="post-metadata">

**Author:** ![ef4](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/ef4/32/13470_2.png) [@ef4](https://discuss.emberjs.com/u/ef4)\
**Post date:** [December 31, 2019, 4:52am UTC](https://discuss.emberjs.com/t/testing-component-content/17388/2 "2019-12-31T04:52:31Z")

</div>

You don’t need to grab the whole output as a string. You can select individual DOM elements and make fine-grained assertions about them.

All of [qunit-dom’s assertions](https://github.com/simplabs/qunit-dom/blob/master/API.md) are included in the default Ember app blueprint.

---

<div class="post-metadata">

**Author:** ![bmurphy](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/bmurphy/32/16807_2.png) [@bmurphy](https://discuss.emberjs.com/u/bmurphy)\
**Post date:** [December 31, 2019, 5:25pm UTC](https://discuss.emberjs.com/t/testing-component-content/17388/3 "2019-12-31T17:25:42Z")

</div>

Makes sense. Thanks 🙂
