Replies: 1 comment 1 reply
-
Do you a have an example with more details (but hopefully small example without too many details)? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
Is there a way to inherit\extend test cases?
More detailed:
I have a TestBase class which have common functionalities and modules for all the tests that inherit it.
Each inherited test calls “Run” function. The run function (implemented in BaseTest) is calling the test steps: Init, Configure, Run, Analyze and finally Teardown. Each test decide weather to override the
step or not.
I would like to have one .tests file that will get the name of the test and will run its steps.
To solve it I implemented a Factory module that gets the test name and returns the test object.
This object has the same functionalities that BaseTest has so I can have the one .tests file with the steps as test cases.
In general I would like to move BaseTest implementation to a .tests file and inherit it (Is it the correct way?).
What’s the best way to use Pester in that case?
Beta Was this translation helpful? Give feedback.
All reactions