# Using fprof with unit test - getting FunctionClauseError

**URL:** <https://forum.elixirforum.com/t/using-fprof-with-unit-test-getting-functionclauseerror/14146>\
**Category:** Questions\
**Tags:** testing, troubleshooting, fprof\
**Created:** [May 11, 2018, 8:11am UTC](https://forum.elixirforum.com/t/using-fprof-with-unit-test-getting-functionclauseerror/14146 "2018-05-11T08:11:24Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![NobbZ](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/nobbz/32/27235_2.png) [@NobbZ](https://forum.elixirforum.com/u/NobbZ)\
**Post date:** [May 11, 2018, 8:18am UTC](https://forum.elixirforum.com/t/using-fprof-with-unit-test-getting-functionclauseerror/14146/2 "2018-05-11T08:18:33Z")

</div>

You need to specify the list of arguments as if you were giving it at the command line:

`Mix.Tasks.Test.run(["--only", "test/test_only_profile_trest.exs"])`

Aside of that, `--only` filters based on `@tag`s, you probably want to pass only the file to run tests from:

`Mix.Tasks.Test.run(["test/test_only_profile_trest.exs"])`

Finally, I do think you have a typo in the filename 😉

---

_[View the full topic](https://forum.elixirforum.com/t/using-fprof-with-unit-test-getting-functionclauseerror/14146)._
