# Can I run Setup, Test and Teardown separately?

**URL:** <https://forum.robotframework.org/t/can-i-run-setup-test-and-teardown-separately/3878>\
**Category:** Python\
**Created:** [25 May 2022 10:27 UTC](https://forum.robotframework.org/t/can-i-run-setup-test-and-teardown-separately/3878 "2022-05-25T10:27:50Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![pekkaklarck](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/pekkaklarck/32/1019_2.png) [@pekkaklarck](https://forum.robotframework.org/u/pekkaklarck)\
**Post date:** [27 May 2022 13:06 UTC](https://forum.robotframework.org/t/can-i-run-setup-test-and-teardown-separately/3878/12 "2022-05-27T13:06:47Z")

</div>

You need to use v3 listeners for this. In the `end_test` method you ought to be able to use something like this to create a new test:

```python
new = test.parent.tests.create(name='New test')
new.body.create_keyword(name='Log', args=['Example'])

```

Or something like this to copy an existing test:

```python
copy = test.copy(name='New name')
test.parent.tests.append(copy)

```

Same stuff works also with modifiers. You are working with same model objects in both cases.

---

_[View the full topic](https://forum.robotframework.org/t/can-i-run-setup-test-and-teardown-separately/3878)._
