If you need to prepare your AUT workspace you use a Workspace context which places files on a workspace before a
test execution. But sometimes you may need to put data somewhere outside your AUT workspace - anywhere on your disc
space. Folder Context was coined for this purpose. When it is applied it puts files into a selected root folder.
Move a mouse over highlighted areas on a screenshot below to get a documentation regarding UI elements
Above is a Folder Context which puts img1.jpg and img2.jpg files in a TestData folder on a C disc.
You can also add a folder with files:
TestImages folder with 2 files will be added to a root location when the context above is applied.
Folder context can use a relative path to a current User Directory or to AUT workspace.
Let's say you need to place img1 and img2 files into C://CurrentUserDirectory/TestData/.
When you select it as a root path you will see that RCPTT replaces it with home://TestData/
Which means that a folder context will pass regardless of the Current User Directory name.
Likewise, AUT workspace path is replaced with workspace:// which makes Folder Context act almost
like a Workspace context:
If there is no TestData folder - it will be created.
If there already is TestData folder - its content will be merged with a context
content (only if Clear root folder
option is disabled).
Like in a Workspace context there is an option - Clear root
folder before context application (disabled when the context is created).
Been enabled it leads to clearing a root folder before the context is applied.
When the context above is applied all TestData content is deleted and then TestImages folder with img1, img2 files are placed there.
Let's say you need to test that file import works correctly.
To do this you're going to import two files from a //Desktop/TestData into your Project1 using a Resource Perspective.
You need the following contexts for your test: