Teardown is the process that occurs after a test has been run to reverse all the things that the test setup. This might include stopping processes that were started, deleting data that was created, uninstalling components that were installed etc.
Questions tagged [teardown]
104 questions
2
votes
0 answers
docker-compose command is unable to stop gracefully
My custom docker-compose command won't stop gracefully. Why isn't the below working and how can I fix it properly (i.e. no SIGKILL)?
This is mentioned in the docs: https://docs.docker.com/compose/faq
Similar questions (none have helped - see test…

jozxyqk
- 16,424
- 12
- 91
- 180
2
votes
2 answers
pytest: Assigning attribute in a fixture not visible to test cases
Why am I unable to set a self.param value in a pytest fixture?
class TestClass:
@pytest.fixture(scope='class', autouse=True)
def setup_class(self, test_env):
self.param = 2
def teardown_method(self):
…

Eugene Huang
- 43
- 8
2
votes
0 answers
how to skip teardown upon assertion in pytest
How to skip teardown when assertion occured in pytest
import logging
import pytest
log = logging.getLogger(__name__)
@pytest.fixture()
def myfixture(request):
self = request.node.cls
setup(self)
yield
teardown()
def setup(self):
…

user10600681
- 41
- 6
2
votes
1 answer
Python unittest tearDownClass() for the instance, how to have it?
I need a tearDownClass(cls) method for the instance.
I mean one where I can refer to self (the instance), not to cls (the class).
A sort of tearDownTestCase(self).
My intention is to cleanup the database after ALL the test cases have been…

Alex 75
- 2,798
- 1
- 31
- 48
2
votes
1 answer
How to set multi-level test setup/teardown in robot framework
I have some robot test cases separated in directories. The directory hierarchy is:
ParentTestDirectory
|__ ChidTestDirectoryOne
|__ TestOne.robot
|__ ChidTestDirectoryTwo
|__ TestTwo.robot
|__ __init__.robot
Content of…

Zeinab Abbasimazar
- 9,835
- 23
- 82
- 131
2
votes
1 answer
Braintree javascript client - Teardown call does not remove the existing integration - gettings error on my hosted fields
I am currently trying to integrate braintree to my angularJS web app and I face the below issue.
When the user selects to perform a payment, I have a modal that opens to display my payment form. In the modal's controller, I run at the beginning the…

babis21
- 1,515
- 1
- 16
- 29
2
votes
1 answer
Is it possible to pass a parameter to a teardown fixture in python?
I have bunch of test methods that i need to run and then after each test i want to update my results somewhere else.
This is what i have:
@pytest.mark.testcasename('1234')
@pytest.mark.parametrize('lang',
["EN", "FR"])
def…

Froodo
- 573
- 1
- 6
- 16
2
votes
1 answer
python Taking screenshot on test failure in tearDown() method
I'm trying to take a screenshot at the end of a failed test
I've done something that works, but there's a problem:
It takes screenshot of every test that happens after one that failed - for example:
1. Test passed: no screenshot
2. Test failed:…

jedrek cienicki
- 153
- 1
- 14
2
votes
1 answer
What's wrong with my robot framework teardown?
I'm new to using robot framework and I'm struggling to get my teardown to work.
It currently looks like:
[Teardown] run keyword if any tests failed KeyFail
When I run the program with code like this, I get the error: Keyword 'Run Keyword If Any…

Geaorge
- 37
- 1
- 6
2
votes
0 answers
Removing Cast.Listener in teardown
Working on a chromecast sender app, I am having hard time to find api for unregistering com.google.android.gms.cast.Cast.Listener in teardown implementation.
this is how api client is being constructed:
CastListener castListener = new…

Yoz
- 707
- 6
- 20
1
vote
1 answer
selenium.UnsupportedCommandException: the requested resource could not be found, or a request
getting exception
FAILED CONFIGURATION: @AfterClass tearDown
"org.openqa.selenium.UnsupportedCommandException: The requested resource could not be found, or a request was received using an HTTP method that is not supported by the mapped…

mittalri
- 21
- 3
- 7
1
vote
1 answer
Jmeter CSV DATA set config when stop thread on EOF is true. The tearDown group is not executed
Jmeter CSV DATA set config when stop thread on EOF is true. The tearDown group is not executed.
Log error:
Stop Thread seen for thread tearDown Thread Group 1-1, reason: org.apache.jorphan.util.JMeterStopThreadException: End of…

Vinayak
- 53
- 7
1
vote
1 answer
passing variable to pytest_sessionfinish
I am looking for a way to pass some variable from session start to session end in pytest.
More specifically I am using fixture scooped session where I create a serial-com object eg.:
@pytest.fixture(scope="session")
def init_setup(request):
#…

KapaA
- 165
- 14
1
vote
1 answer
How can I achieve tear down in OpenTest framework
I want to turn off the bluetooth at the end of testcase even if any intermidiate step in testcase get failed, it should turn off the bluetooth (i.e. achieve it as teardown step).
How to achieve teardown in Opentest?

vina
- 19
- 1
1
vote
1 answer
Type 'number' is not assignable to type 'TeardownLogic'
I made a service that returns a time Observable,
time = new Observable(observer =>
setInterval(() => observer.next(new Date().toString()), 1000)
);
However, it gives the following error,
ERROR in src/app/services/date.service.ts(11,5): error…

Krishanu
- 552
- 3
- 21