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

Bug view not displayed #840

Closed
email2vimalraj opened this Issue Apr 5, 2017 · 6 comments

Comments

Projects
None yet
2 participants
@email2vimalraj
Collaborator

email2vimalraj commented Apr 5, 2017

Summary

From v3.0.4, the Bug View is not displayed even though there is a failure with throwable.

Expected Behavior

If there are any tests failed with throwable, the Bug view should be displayed in the report.

Current Behavior

Currently the Bug view is not displayed from v3.0.4.

Sample

ExtentHtmlReporter htmlReporter = new ExtentHtmlReporter("extent.html");
ExtentReports reporter =  new ExtentReports();
reporter.attachReporter(htmlReporter);
ExtentTest parentSuite = reporter.createTest("Parent Suite");
ExtentTest childTest = parentSuite.createNode("Child Test");
childTest.createNode("Grand Child Test").fail(new RuntimeException("Some exception message"));
reporter.flush();

Environment Details

  • Extent report Version used: v3.0.4
  • Operating System and version: Mac OSx Sierra
  • JDK Version: 8

@email2vimalraj email2vimalraj added the bug label Apr 5, 2017

anshooarora added a commit that referenced this issue Apr 5, 2017

@anshooarora

This comment has been minimized.

Show comment
Hide comment
@anshooarora

anshooarora Apr 5, 2017

Owner

@email2vimalraj - does the latest commit work? I will quickly release this version if your tests also pass, this one is very high priority.

Owner

anshooarora commented Apr 5, 2017

@email2vimalraj - does the latest commit work? I will quickly release this version if your tests also pass, this one is very high priority.

@anshooarora anshooarora added the pri:high label Apr 5, 2017

@email2vimalraj

This comment has been minimized.

Show comment
Hide comment
@email2vimalraj

email2vimalraj Apr 5, 2017

Collaborator

@anshooarora: I'm on it

Collaborator

email2vimalraj commented Apr 5, 2017

@anshooarora: I'm on it

@email2vimalraj

This comment has been minimized.

Show comment
Hide comment
@email2vimalraj

email2vimalraj Apr 5, 2017

Collaborator

@anshooarora : The bug tag is displayed now. However, there are few things which are not correct.

  1. The exception are being displayed even for the parent node

issue_1

  1. If you notice the above screenshot, the message for everything is the same even my test doesn't throw the same message. For example:
// start reporters
        ExtentHtmlReporter htmlReporter = new ExtentHtmlReporter("extent.html");

        // create ExtentReports and attach reporter(s)
        ExtentReports extent = new ExtentReports();
        extent.attachReporter(htmlReporter);

        ExtentTest feature1 = extent.createTest("Feature 1");
        ExtentTest scenario1 = feature1.createNode(Scenario.class, "Scenario 1");
        scenario1.createNode(Given.class, "Step 1").pass("Passed");
        scenario1.createNode(When.class, "Step 2").fail(new IllegalStateException("Second test failed"));

        ExtentTest feature2 = extent.createTest("Feature 2");
        ExtentTest scenario2 = feature2.createNode(Scenario.class, "Scenario 2");
        scenario2.createNode(Given.class, "Step 1").pass("Passed");
        scenario2.createNode(When.class, "Step 2").pass("Passed");

        ExtentTest scenario3 = feature2.createNode(Scenario.class, "Scenario 3");
        scenario3.createNode(Given.class, "Step 1").pass("Passed");
        scenario3.createNode(When.class, "Step 2").fail(new IllegalStateException("Fail message"));

        extent.flush();

The exception type is same, however the message of the exception are different. In this case Second Test Failed and Fail message are two different messages.

Collaborator

email2vimalraj commented Apr 5, 2017

@anshooarora : The bug tag is displayed now. However, there are few things which are not correct.

  1. The exception are being displayed even for the parent node

issue_1

  1. If you notice the above screenshot, the message for everything is the same even my test doesn't throw the same message. For example:
// start reporters
        ExtentHtmlReporter htmlReporter = new ExtentHtmlReporter("extent.html");

        // create ExtentReports and attach reporter(s)
        ExtentReports extent = new ExtentReports();
        extent.attachReporter(htmlReporter);

        ExtentTest feature1 = extent.createTest("Feature 1");
        ExtentTest scenario1 = feature1.createNode(Scenario.class, "Scenario 1");
        scenario1.createNode(Given.class, "Step 1").pass("Passed");
        scenario1.createNode(When.class, "Step 2").fail(new IllegalStateException("Second test failed"));

        ExtentTest feature2 = extent.createTest("Feature 2");
        ExtentTest scenario2 = feature2.createNode(Scenario.class, "Scenario 2");
        scenario2.createNode(Given.class, "Step 1").pass("Passed");
        scenario2.createNode(When.class, "Step 2").pass("Passed");

        ExtentTest scenario3 = feature2.createNode(Scenario.class, "Scenario 3");
        scenario3.createNode(Given.class, "Step 1").pass("Passed");
        scenario3.createNode(When.class, "Step 2").fail(new IllegalStateException("Fail message"));

        extent.flush();

The exception type is same, however the message of the exception are different. In this case Second Test Failed and Fail message are two different messages.

@anshooarora

This comment has been minimized.

Show comment
Hide comment
@anshooarora

anshooarora Apr 5, 2017

Owner

With the latest commit, parentTest will not copy exception info from children..

Owner

anshooarora commented Apr 5, 2017

With the latest commit, parentTest will not copy exception info from children..

@email2vimalraj

This comment has been minimized.

Show comment
Hide comment
@email2vimalraj

email2vimalraj Apr 5, 2017

Collaborator

Yeah saw your commit, I've simplified your previous commit by refactoring few things. Kindly review my PR #841

Collaborator

email2vimalraj commented Apr 5, 2017

Yeah saw your commit, I've simplified your previous commit by refactoring few things. Kindly review my PR #841

@email2vimalraj

This comment has been minimized.

Show comment
Hide comment
@email2vimalraj

email2vimalraj Apr 6, 2017

Collaborator

Fixed in v3.0.5

Collaborator

email2vimalraj commented Apr 6, 2017

Fixed in v3.0.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment