-
Notifications
You must be signed in to change notification settings - Fork 181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple failures in testsuite for failures under single testcase #209
Comments
sayantansls
changed the title
Multiple failures recorded for failures under single testcase
Multiple failures in testsuite for failures under single testcase
Feb 19, 2022
It’s not intentional. I’d need to go re read the spec again, but I suspect
failures is supposed to represent the number of specs (it) that failed, not
the number of expectations.
There is also a good chance this behavior is similarly flawed in the other
reporters. If you make a pull request to address this, please consider each
of the reporters in turn.
This project is in heavy maintenance mode, so a pull request is the best
option to ensure timely resolution for your use case.
…On Sat, Feb 19, 2022 at 12:43 PM Sayantan Ghosh ***@***.***> wrote:
Hi all,
I am using jasmine-reporters for generating XML reports for protractor E2E
tests which are then being used to create HTML reports. There seems to be a
bug in the implementation. So, I have a test suite with 3 test cases, of
which 2 test cases are success and 1 test case fails. On running the tests
with the JUnitXmlReporter, I am getting the following XML node for the
particular testsuite.
<testsuite name="Ingestion" timestamp="2022-02-20T02:59:46" hostname="localhost" time="98.866" errors="0" tests="3" skipped="0" disabled="0" failures="3">
<testcase classname="Ingestion" name="should ingest file type 1" time="25.266"/>
<testcase classname="Ingestion" name="should ingest file type 2" time="26.258"/>
<testcase classname="Ingestion" name="should ingest file type 3" time="13.548">
<failure type="toBeTruthy" message="Expected false to be truthy."><![CDATA[
]]></failure>
<failure type="exception" message="Failed: No element found using locator: By(xpath, ***@***.***="sample-classification"]//mat-select//div//span)"><![CDATA[
]]></failure>
<failure type="exception" message="Failed: element click intercepted: Element <button _ngcontent-keo-c276="" data-test="close-dialog" mat-icon-button="" class="mat-focus-indicator mat-icon-button mat-button-base" style="margin-bottom: 5px;">...</button> is not clickable at point (1366, 102). Other element would receive the click: <section _ngcontent-keo-c276="" class="wrapper active ng-star-inserted" style=""></section>
(Session info: chrome=97.0.4692.71)
(Driver info: chromedriver=97.0.4692.71 (adefa7837d02a07a604c1e6eff0b3a09422ab88d-refs/branch-heads/4692@{#1247}),platform=Linux 3.10.0-1160.49.1.el7.x86_64 x86_64)"><![CDATA[
]]></failure>
</testcase>
</testsuite>
So, as visible, two of the three tests have succeeded, however, since the
failed test case has 3 failure nodes under it, so the testsuite tag shows
the failures attribute as 3, which is an incorrect representation, that
gets carried on to my HTML report. I think this line 279 in the file
junit_reporter.js is causing this bug.
if (isFailed(spec)) { spec._suite._failures +=
spec.failedExpectations.length; }
Do let me know if this is by design or is an issue that could potentially
be fixed, thanks.
—
Reply to this email directly, view it on GitHub
<#209>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACRTNXETKKI2T3CYZNCE6DU37XFTANCNFSM5O3K3AKQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi all,
I am using jasmine-reporters for generating XML reports for protractor E2E tests which are then being used to create HTML reports. There seems to be a bug in the implementation. So, I have a test suite with 3 test cases, of which 2 test cases are success and 1 test case fails. On running the tests with the
JUnitXmlReporter
, I am getting the following XML node for the particular testsuite.So, as visible, two of the three tests have succeeded, however, since the failed test case has 3 failure nodes under it, so the
testsuite
tag shows thefailures
attribute as 3, which is an incorrect representation, that gets carried on to my HTML report. I think this line 279 in the filejunit_reporter.js
is causing this bug.if (isFailed(spec)) { spec._suite._failures += spec.failedExpectations.length; }
Do let me know if this is by design or is an issue that could potentially be fixed, thanks.
The text was updated successfully, but these errors were encountered: