Describe the Issue
I've found that if an exception is thrown in the setUpClass or setTestName methods (annotated with @BeforeClass and @BeforeMethod respectively) of UITestRunner, then the subsequent test(s) are skipped, and so the afterMethod method doesn't execute. This meant that the Chrome session didn't get killed.
Adding alwaysRun=true to the @AfterMethod annotation seems to have resolved this issue.
Is there any downside to that which I might be missing? If not, I'm happy to submit a PR with that change in.
To Reproduce
Steps to reproduce the behavior:
- Set up a BDD test project using Chrome as the browser.
- Cause an exception to be thrown during one of the
@Before... methods in UITestRunner.
- Execute the
UITestRunner.
Expected Behaviour
The test(s) should be skipped, and the Chrome session should be closed gracefully.
Versions (please complete the following information):
- Frameworkium-core version: [e.g. 3.0.0]
- OS: CentOS 7.6.1810
- Browser: Chromium
- Version: 71
Additional Context
Add any other context about the problem here.
I originally raised this in the Frameworkium BDD project's issues, but just realised that maybe they don't get much attention. Happy to delete either that one or this one
Describe the Issue
I've found that if an exception is thrown in the
setUpClassorsetTestNamemethods (annotated with@BeforeClassand@BeforeMethodrespectively) ofUITestRunner, then the subsequent test(s) are skipped, and so theafterMethodmethod doesn't execute. This meant that the Chrome session didn't get killed.Adding
alwaysRun=trueto the@AfterMethodannotation seems to have resolved this issue.Is there any downside to that which I might be missing? If not, I'm happy to submit a PR with that change in.
To Reproduce
Steps to reproduce the behavior:
@Before...methods inUITestRunner.UITestRunner.Expected Behaviour
The test(s) should be skipped, and the Chrome session should be closed gracefully.
Versions (please complete the following information):
Additional Context
Add any other context about the problem here.
I originally raised this in the Frameworkium BDD project's issues, but just realised that maybe they don't get much attention. Happy to delete either that one or this one