Skip to content

Should the UITestRunner have alwaysRun set on afterMethod? #151

@davecpayne

Description

@davecpayne

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:

  1. Set up a BDD test project using Chrome as the browser.
  2. Cause an exception to be thrown during one of the @Before... methods in UITestRunner.
  3. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions