Skip to content

Ability to configure different folders to different tests #296

@cebidanesrsi

Description

@cebidanesrsi

I'm using the approvals to test images generated.
Today is possible to use PackageSettings on the same level on the test to define a different folder.

public class PackageSettings {
    public static String ApprovalBaseDirectory = "../resources";
}

When used this approach happen other issue. It is necessary to create the complete package name to the image be saved.

Scenario:
My test was created on ... test/java/{MY WHOLE PACKAGE NAME}/mytest.java and I'm using the PackageSettings. The expected is the image be created under ... test/resources/myimage.png, but no. Will happen a error complain about folder doesn't exist.

Is necessary to create ... test/resources/{MY WHOLE PACKAGE NAME}/ and my image will be saved correctly.

Resume
1 - I'm can have two or more test on the same level to different folder
2 - The PackageSettings just define partial baseDirectory and not the real baseDirectory

Related:
Ability to store approval files under different folder #2

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions