oppia
oppia copied to clipboard
[BUG]: Acceptance and WebDriverIo test Proceeds to ‘it’ Block or another 'it' block/spec Despite Failure in ‘beforeAll’ setup or any other failure in the intial specs.
Describe the bug
In our current testing framework, the execution of an acceptance test is proceeding to the ‘it’ block even when something fails in the setup of the test, (i.e., in the ‘beforeAll’ block). This results in multiple error messages, of which only the last one is relevant and directly related to the initial setup failure.
Also the spec moves into another specs even if something goes wrong in the initial specs.
URL of the page where the issue is observed.
NA
Steps To Reproduce
Introduce a deliberate error in the setup or any specification of a test, execute it, and observe that the execution advances to another ‘it’ block or specs.
Expected Behavior
The test execution should halt upon encountering a failure in the ‘beforeAll’ setup or any error it comes across first. It should not proceed to the ‘it’ block or another 'it' block. Only the first error failure encountered should be displayed.
Screenshots/Videos
Acceptance tests:
WebdriverIo (e2e tests) :
What device are you using?
Desktop
Operating System
MacOS
What browsers are you seeing the problem on?
Chrome
Browser version
No response
Additional context
No response
Tips for developers
Before addressing the bug, please identify which PR caused the issue (you can follow the steps here). If you identify the PR, comment on the issue with a link to it. If not, mention the commit hash of the oldest commit you saw the bug on (and the month and year it was made in).
Then, please leave a comment with details of the approach that you plan to take to fix the issue (see example).
Note: If this is your first Oppia issue, please make sure to follow our guidelines for choosing an issue and setting things up. You will also need to show a demo of the fix working correctly on your local machine. Thanks!
Jasmine already offers a configuration option for this. It can be done by activating the stopOnSpecFailure
flag in the jasmine.json
file.