Workspace Contexts are responsible for preparing the initial workspace content for your test case. The Workspace Context contains projects and files you need to place in your workspace before running your test. It also has an option to clear the workspace before applying your Context. That is, if the Clear workspace option is turned on, the Workspace context just replaces the entire workspace contents. Otherwise it verifies that all of its items are present in the workspace and have the same properties. If not, it creates missing items or replaces modified items correspondingly.
The Workspace Context editor allows either to manually construct/modify the content of your Context or capture the workspace state from the AUT.
With the Snapshot button in the upper-right corner above the Context name field you can capture the current state of the AUT workspace. With a single click all the project with all their files and subfolders will be added to your Context.
Otherwise, you can manually add/import Projects and Files using the corresponding buttons. There are the following options to edit Cotext data:
- Add Project: adds a new Project in the Workspace defined by your Context
- Add Folder: adds a new Folder within the selected project
- Import Projects: opens a dialog window where you can browse and import any existing Eclipse projects to your workspace:
- Import Files:opens a dialog window where you can browse and import any files to your workspace:
- Open File: opens the selected file in the Test Editor allowing you to edit the file content
The option to clear the workspace is checked by default. You can uncheck it in order to keep data preceding your test.