Hi, I’m performing automation and using pytest with selenium and was wondering when would you want to use setUpModule()
instead of setUpClass()
?
Hi Helen,
If you want to initialize a database connection or something similar before running any tests in a module, then you would use setUpModule()
.
If you want to set up a class for testing purposes, then you would use setUpClass()
.