Explorer Panel

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.

Explorer panel

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 icon New Directory. Specify the directory name in the invoked dialog and click Create.

New Directory dialog

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 icon New Fixture command from the context menu. This invokes the Fixture Properties dialog.

Create a fixture

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 button 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 icon New Test from the context menu to open the New Test dialog.

    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 icon New File from the context menu. Specify the file name and extension in the invoked dialog and click Create.

New File dialog

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 The Run test button 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 The Run tests button Run Tests button next to any selected item.

Run multiple items

You can also use the context menu's Run test icon Run Test command to run tests.

Modify a Fixture's Properties

To edit a fixture's properties, open its context menu and select Edit icon 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.

Modify Fixture dialog

Rename Tests

To rename a test, invoke its context menu and select Rename icon Rename. The Rename Test dialog appears. Specify the new test name and click Rename.

Rename Test dialog

Convert Fixtures to JavaScript

To convert a fixture with recorded tests to JavaScript, select the fixture in the Explorer panel, open its context menu and select Convert icon Convert to JavaScript to invoke the Convert to JavaScript dialog. Specify the test file name and extension, then click Create.

Convert to JavaScript Code Dialog

TestCafe Studio creates the test file in the same test directory and displays it in the Explorer panel.

View Test Code

To view JavaScript and TypeScript files in the Code Editor, select a fixture or test in the Explorer panel, then select Show code icon Show Code from the context menu. The fixture code opens in the Code Editor.

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 icon Show in Explorer/Finder.

Delete Directories, Fixtures and Tests

To delete a directory, fixture or test, invoke its context menu and select Delete icon 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 icon Delete from the context menu.

Delete multiple items