Hi! I've been looking for a framework that does exactly this - looks good!
I tried creating a test, but one that inherits from a subclass of your TestCase, e.g. called BaseTestCase. I do this as I want several of my test cases all to use the same setup_all method. Now, when my test runs, the BaseTestCase also gets discovered, and its setup_all method runs. (Since I'm using setup_all to setup my Selenium driver, it means that the browser instance is started twice.)
This could easily be resolved with some kind of naming convention. But I assume a better way would be to discover all the test cases like before, then skip the ones that are superclasses of any of the other test cases.
So in my case, if what gets discovered is [BaseTestCase(TestCase), SomeRealTestCase(BaseTestCase)], the framework would see that BaseTestCase is actually a superclass of SomeRealTestCase, and would finally return only [SomeRealTestCase(BaseTestCase)]. If that sounds good to you I can throw in a PR.
Hi! I've been looking for a framework that does exactly this - looks good!
I tried creating a test, but one that inherits from a subclass of your
TestCase
, e.g. calledBaseTestCase
. I do this as I want several of my test cases all to use the samesetup_all
method. Now, when my test runs, theBaseTestCase
also gets discovered, and itssetup_all
method runs. (Since I'm usingsetup_all
to setup my Selenium driver, it means that the browser instance is started twice.)This could easily be resolved with some kind of naming convention. But I assume a better way would be to discover all the test cases like before, then skip the ones that are superclasses of any of the other test cases.
So in my case, if what gets discovered is
[BaseTestCase(TestCase), SomeRealTestCase(BaseTestCase)]
, the framework would see thatBaseTestCase
is actually a superclass ofSomeRealTestCase
, and would finally return only[SomeRealTestCase(BaseTestCase)]
. If that sounds good to you I can throw in a PR.Have a good day.