# How can I run test cases for my plugin

**URL:** <https://forum.shopware.com/t/how-can-i-run-test-cases-for-my-plugin/45455>\
**Category:** Shopware 5\
**Created:** [27. April 2017 um 09:39 UTC](https://forum.shopware.com/t/how-can-i-run-test-cases-for-my-plugin/45455 "2017-04-27T09:39:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rcktn123](https://avatars.discourse-cdn.com/v4/letter/r/858c86/32.png) [@rcktn123](https://forum.shopware.com/u/rcktn123)\
**Post date:** [27. April 2017 um 09:39 UTC](https://forum.shopware.com/t/how-can-i-run-test-cases-for-my-plugin/45455/1 "2017-04-27T09:39:18Z")

</div>

Please provide the solution for run my plugin testcases&nbsp;

---

<div class="post-metadata">

**Author:** ![Michael\_Telgmann](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/michael_telgmann/32/20289_2.png) [@Michael\_Telgmann](https://forum.shopware.com/u/Michael_Telgmann)\
**Post date:** [27. April 2017 um 09:57 UTC](https://forum.shopware.com/t/how-can-i-run-test-cases-for-my-plugin/45455/2 "2017-04-27T09:57:57Z")

</div>

Hi,

if you need an example for PHPunit and how to test a plugin, you can have a look at one of our plugins at GitHub:&nbsp;[GitHub - shopwareLabs/SwagBackendOrder: plugin which allows you to create orders via backend module](https://github.com/shopwareLabs/SwagBackendOrder)

If you have further questions, feel free to ask&nbsp; ![Thumb-Up](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/1X/7fcda44f782696668a3d093569d15e88105769e1.png "Thumb-Up")

Viele Grüße aus Schöppingen

![cool](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/1X/86c57fbace799dd4eb1f1b8a2d3bdc1733f0aea1.png "cool")&nbsp;Michael Telgmann

---

<div class="post-metadata">

**Author:** ![rcktn123](https://avatars.discourse-cdn.com/v4/letter/r/858c86/32.png) [@rcktn123](https://forum.shopware.com/u/rcktn123)\
**Post date:** [27. April 2017 um 11:27 UTC](https://forum.shopware.com/t/how-can-i-run-test-cases-for-my-plugin/45455/3 "2017-04-27T11:27:07Z")

</div>

While run the phpunit in my plugin folder, I got the following error,

PHP Fatal error: &nbsp;require\_once(): Failed opening required ‘PHPUnit/Framework/TestCase.php’ (include\_path=’/var/www/shopware/engine/Library:.:/usr/share/php:/usr/share/pear:’) in /var/www/shopware/engine/Shopware/Components/Test/Plugin/TestCase.php on line 46
