The Explorer panel allows you to view and manage files in your test directory.
The panel shows the directory's content as a tree of subdirectories, files, and tests. See Organize Tests for more information.
You can manage test directories, files, fixtures, and tests using context menu commands. The available commands depend on the selected item in the panel.
The panel also has buttons for frequently-used actions: Record a New Test and Create a New Fixture.
Create a Directory #
To create a new directory, invoke the context menu for a directory where you want to create it and select New Directory. Specify the directory name in the invoked dialog and click Create.
The new directory appears in the Explorer panel.
Create a Fixture #
To create a new fixture, select a directory where you want to create it and click Create a New Fixture or select the New Fixture command from the context menu. This invokes the Fixture Properties dialog.
Specify the fixture's properties and click Create. The new fixture appears in the Explorer panel.
Create a Test #
You can create a new test in one of the following ways:
Record a test - Select the fixture where you want to create a test and click the Record a New Test button. This automatically creates a new test, adds it to the fixture and starts recording.
Create an empty test - Select the fixture where you want to create a test and select New Test from the context menu to open the New Test dialog.
Specify the test name and click Create. TestCafe Studio creates an empty test and opens it in the Test Editor.
Create a File #
To create a new file, invoke the context menu in the directory where you want to create a file and select New File from the context menu. Specify the file name and extension in the invoked dialog and click Create.
The created file appears in the Explorer panel and opens in the Code Editor.
Run Tests #
To run any runnable item (test, fixture or directory), hover the mouse over it and click the Run test or Run all tests button next to this item.
To run several tests from different fixtures and directories, select the tests using Shift-click, Ctrl-click, or Command-click, then click the Run Tests button next to any selected item.
You can also use the context menu's Run Test command to run tests.
Modify a Fixture's Properties #
To edit a fixture's properties, open its context menu and select Edit to invoke the Fixture Propeties dialog. You can change the fixture name, file name, target webpage and authentication credentials in this dialog. To save the changes, click OK.
Rename Tests #
To rename a test, invoke its context menu and select Rename. The Rename Test dialog appears. Specify the new test name and click Rename.
TestCafe Studio creates the test file in the same test directory and displays it in the Explorer panel.
View Test Code #
Show Files in Windows Explorer/MacOS Finder #
To view a fixture or directory in Windows Explorer and macOS Finder, invoke the context menu for the fixture or directory and select Show in Explorer/Finder.
Delete Directories, Fixtures and Tests #
To delete a directory, fixture or test, invoke its context menu and select Delete. A confirmation dialog appears. Click Yes to delete the selected item.
To delete several tests from different fixtures and directories, select the tests with Shift-click, Ctrl-click, or Command-click, then select Delete from the context menu.