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

Hide/abbreviate test method arguments #157

Open
C-Otto opened this issue Jul 25, 2020 · 0 comments
Open

Hide/abbreviate test method arguments #157

C-Otto opened this issue Jul 25, 2020 · 0 comments
Assignees
Labels

Comments

@C-Otto
Copy link

C-Otto commented Jul 25, 2020

Description

If a test method uses the "data provider" feature from TestNG, the provided arguments are shown in the testlogger output. This is undesirable for large inputs:

com.foo.web.CoreTranslationsTest ✔ testNoDuplicatePropertyKeys[0]([/foo/project/project-web/src/main/webapp/resources/i18n/messages_ru.properties, [...], /foo/project/project-web/src/main/webapp/resources/i18n/messages_pl.properties])

This single line spans about half the height of my big screen. Instead of having the full output, I'd like to:

  • have no output for the arguments
  • have it abbreviated (abcdef...) after a few characters
  • have everything configurable :)

Additional information

    @Test(dataProvider = "translationFilesProvider")
    public void testNoDuplicatePropertyKeys(final Set<File> translationFiles) throws Exception
    {
       ...
    }

    @DataProvider(name = "translationFilesProvider")
    protected Object[][] translationFileProvider() throws Exception
    {
        final DataProviderBuilder dataProviderBuilder = new DataProviderBuilder();
        dataProviderBuilder.append(/* some set */);
        return dataProviderBuilder.toArray();
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants