Skip to content

Test file names exceed Windows file name limits when using Data Providers  #6

@HammidFunsho

Description

@HammidFunsho

We're encountering Windows file length issues when running tests which utilize Data Providers.
As you know, when a Data Provider is used, each test gets named according to the data option used, so when we feed in large data sets, the result files created from these tests exceed the Windows filename limits.

Is it possible for a tester to change the way the framework generates file names for Data Provider tests?

One suggestion is to implement conditional logic which evaluates file name length, and uses an alternate naming convention IF it exceeds our defined limit.
We'd of course need to come up with this new schema, but one idea is setting the 1st element in a Data Provider as a counter, then appending that to a shorter file name. This way we use an abbreviated name which would always be unique.

An example using the Sample tests :
new Object[] {“1”, "python", method, test }
new Object[] {“2”, "java", method, test }
new Object[] {“3”, "ruby", method, test }

The resulting file names could be something like googleLanguageSearch1, googleLanguageSearch2, googleLanguageSearch3 (test method name + iteration flag). The Data Provider options used for each test could then be passed into the results file itself for a tester to view (along with other test info).

Another suggestion could be appending time stamps into the file names.

We're of course open to any other solutions you can suggest, as we understand that these changes could impact other areas of the framework.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions