TestNG method parameters are being cleared from test results #121

Closed
katedreaper opened this Issue Jan 8, 2015 · 1 comment

Comments

2 participants
@katedreaper

If I run the a test that uses a DataProvider with JMockit the parameters aren't included in the test results:

import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;

public class MyTest
{
    @DataProvider( name = "dataProvider" )
    public Object[][] dataProvider()
    {
        return new Object[][]
        {
            { 1, "A" }, { 2, "B" }, { 3, "C" },
        };
    }

    @Test( dataProvider = "dataProvider" )
    public void test( final int i, final String str )
    {
    }
}
PASSED: test
PASSED: test
PASSED: test

===============================================
    Default test
    Tests run: 3, Failures: 0, Skips: 0
===============================================

But when I run the same test without JMockit the parameters are displayed correctly:

PASSED: test(1, "A")
PASSED: test(2, "B")
PASSED: test(3, "C")

===============================================
    Default test
    Tests run: 3, Failures: 0, Skips: 0
===============================================

@rliesenfeld rliesenfeld added the bug label Jan 8, 2015

@rliesenfeld rliesenfeld self-assigned this Jan 8, 2015

@rliesenfeld

This comment has been minimized.

Show comment
Hide comment
@rliesenfeld

rliesenfeld Jan 8, 2015

Member

Thanks for reporting! Apparently, it's a bug in the JMockit/TestNG integration. I had only tested it with TestNG's @parameters, not @dataProvider. The problem should be fixed for the next release.

Member

rliesenfeld commented Jan 8, 2015

Thanks for reporting! Apparently, it's a bug in the JMockit/TestNG integration. I had only tested it with TestNG's @parameters, not @dataProvider. The problem should be fixed for the next release.

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