# Difference between python tests and scenarios

**URL:** <https://discuss.tryton.org/t/difference-between-python-tests-and-scenarios/6613>\
**Category:** Developer\
**Created:** [October 24, 2023, 10:55am UTC](https://discuss.tryton.org/t/difference-between-python-tests-and-scenarios/6613 "2023-10-24T10:55:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Xavi](https://discuss-cdn.tryton.org/letter_avatar_proxy/v4/letter/x/8e8cbc/32.png) [@Xavi](https://discuss.tryton.org/u/Xavi)\
**Post date:** [October 24, 2023, 10:55am UTC](https://discuss.tryton.org/t/difference-between-python-tests-and-scenarios/6613/1 "2023-10-24T10:55:31Z")

</div>

Im starting with testing in tryton and I found about Scenarios, I’ve seen that running scenarios is slower than python tests.  
I’ve been searching but I haven’t found anything about why I should use Scenarios instead of python tests, or in which cases one is better than the other,  
so, is there any difference between using Scenarios or not?

---

<div class="post-metadata">

**Author:** ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)\
**Post date:** [October 24, 2023, 11:47am UTC](https://discuss.tryton.org/t/difference-between-python-tests-and-scenarios/6613/2 "2023-10-24T11:47:10Z")

</div>

Normally we use scenarios to test full workflow of a user interacting with your module.  
For this reason we use [proteus](https://pypi.org/project/proteus/), the commandline client available on tryton

On the other hand, python tests are usually used for running unittest which are used to test small features of your code, for example some computation or some complex function you’ve developed.

---

<div class="post-metadata">

**Author:** ![system](https://discuss-cdn.tryton.org/uploads/default/original/1X/c6f8ec0a40525cdcd50058c734283450a4b3d38b.png) [@system](https://discuss.tryton.org/u/system)\
**Post date:** [October 24, 2023, 11:47pm UTC](https://discuss.tryton.org/t/difference-between-python-tests-and-scenarios/6613/3 "2023-10-24T23:47:17Z")

</div>

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.
