Xceptance / neodymium-library

A test automation library based on common other best practice open source libraries. It adds missing functionalities but does not reinvent the wheel. Just glues stuff together nicely and adds some sprinkles.
MIT License
80 stars 11 forks source link

Research ways of displaying exceptions in @After functions in Allure #164

Closed occupant23 closed 6 months ago

occupant23 commented 3 years ago

At the moment an exception within an @After annotated method masks errors that came up during the real test method (@Test).

Start with the code below demonstration the issue:

package template.neodymium.tests.smoke;

import org.junit.After;
import org.junit.Assert;
import org.junit.Test;

import template.neodymium.tests.AbstractTest;

public class DemoTest extends AbstractTest
{
    @Test
    public void test() throws Throwable
    {
        Assert.assertFalse("This is another assertion", true);
        throw new RuntimeException("This is another failure");
    }

    @Test
    public void testInstanceOf()
    {
        Assert.assertTrue("This is an assertion", true);
        throw new RuntimeException("This is a failure!");
    }

    @After
    public void after1()
    {
        Assert.fail("after1");
    }

    @After
    public void after2()
    {
        Assert.fail("after2");
    }
}
occupant23 commented 3 years ago

Please test this with the current dev version since we updated Allure.

oomelianchuk commented 3 years ago
wurzelkuchen commented 7 months ago

@kqmpetenz please check if this is still valid. Use the branch with the selenide update and try to upgrade allure. Maybe this issue is already resolved by time.

wurzelkuchen commented 6 months ago

issue is resolved in current allure version, closing issue