Skip to content
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

TestNG method parameters are being cleared from test results #121

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

TestNG method parameters are being cleared from test results #121

katedreaper opened this issue Jan 8, 2015 · 1 comment
Assignees
Labels
bug

Comments

@katedreaper
Copy link

@katedreaper katedreaper commented Jan 8, 2015

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.

Copy link
Member

@rliesenfeld 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
2 participants
You can’t perform that action at this time.